Skip to content

feat(skills): sparse fetch, ls-remote branch detection, prompt polish#23

Merged
rgdevme merged 1 commit into
mainfrom
feat/skills-sparse-fetch-and-prompt-polish
Jun 30, 2026
Merged

feat(skills): sparse fetch, ls-remote branch detection, prompt polish#23
rgdevme merged 1 commit into
mainfrom
feat/skills-sparse-fetch-and-prompt-polish

Conversation

@rgdevme

@rgdevme rgdevme commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Default branch detection: switched from rate-limited GitHub REST API to git ls-remote --symref <url> HEAD (no auth, no quota). Fixes skills add vercel/next.js silently resolving to main instead of canary, causing "no skills found".
  • Smaller downloads: replaced giget full-tarball with a sparse git clone (--no-checkout --depth 1 --filter=blob:none + cone-mode sparse-checkout) scoped to only the needed subtree. Drops the giget dependency.
  • Discovery scoped: findSkillsInRepo now starts from the repo's root skills/ directory only — no full-tree walk.
  • Clearer error: "no skills found" now includes the resolved branch: No skills found in vercel/next.js#canary.
  • Prompt aesthetics: exclusiveCheckbox uses @inquirer/figures (//) and yoctocolors-cjs (green check, cyan description line) to match stock Inquirer look. Origin dimmed without brackets; already-installed skills preselected.
  • skills remove parity: uses the same themed prompt; shows skill description from SKILL.md on its own cyan line; dims the composite ref.

Test plan

  • pnpm lint — 0 errors
  • pnpm typecheck — clean
  • pnpm test — 202/202 pass
  • pnpm build — succeeds
  • Manual: skills add vercel/next.js auto-resolves canary, shows picker with // styling and descriptions
  • Manual: cache dir contains only skills/ subtree (not full repo)
  • Manual: skills remove shows dimmed ref + cyan description

Fix three issues in `skills add`:

- Default branch detection: replace GitHub REST API (rate-limited at
  403 unauthenticated) with `git ls-remote --symref <url> HEAD`, which
  needs no auth and no quota. REST API kept as fallback. Resolves the
  silent fallback to `main` that caused `vercel/next.js` (default branch
  `canary`) to report "no skills found".

- Download size: replace giget full-tarball download with a partial
  sparse git clone (`--no-checkout --depth 1 --filter=blob:none` +
  `sparse-checkout set` in cone mode) scoped to only the needed
  subtree (`skills/` for discovery, `source.subPath` for install).
  Drops the `giget` dependency.

- Discovery scope: `findSkillsInRepo` now walks only from the repo's
  root `skills/` directory instead of the entire tree, making the scan
  fast and predictable.

- Error message: "no skills found" now reports the resolved branch,
  e.g. `No skills found in vercel/next.js#canary`.

- Prompt aesthetics: `exclusiveCheckbox` now uses `@inquirer/figures`
  (`◉`/`◯`/`❯`) and `yoctocolors-cjs` (green check, cyan description
  line) to match stock Inquirer checkbox look. Skill choices show the
  origin repo dimmed without brackets; already-installed skills are
  preselected instead of flagged with `[!]`.

- `skills remove` parity: switched to `multiSelectExclusive` (same
  themed prompt), added skill description from SKILL.md on its own
  cyan line, dimmed composite ref instead of parenthesised plain text.
  Exported `readSkillMeta` from core for reuse.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@rgdevme rgdevme merged commit c858f9a into main Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant