Skip to content

feat(skills): browse + select nested GitHub-repo skills for a pack#161

Merged
DIodide merged 1 commit into
stagingfrom
feat/nested-skill-repo-import
Jul 4, 2026
Merged

feat(skills): browse + select nested GitHub-repo skills for a pack#161
DIodide merged 1 commit into
stagingfrom
feat/nested-skill-repo-import

Conversation

@DIodide

@DIodide DIodide commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Importing mattpocock/skills (and any nested repo) failed with "no skills found." Fixes that, and upgrades repo import to the same power as npx skills add: browse, preview contents, and pick which skills to add.

The bug

mattpocock/skills nests skills as skills/<category>/<id>/SKILL.md, but discovery only matched a fixed set of top-level bases (skills, .claude/skills, .agents/skills) exactly — anything a folder deeper was invisible. (Content-fetching already resolved nested skills by leaf-dir name — both the Convex viewer and the gateway backfill — so only discovery was broken.)

Backend (convex/skills.ts)

  • discoverRepoSkills finds every SKILL.md at any depth in one git/trees call, derives a display category by stripping a recognized skills-root prefix, and skips node_modules.
  • New listRepoSkills action: discovers + fetches + caches each SKILL.md (so previews are instant) and returns them with category + description + the repo's AGENTS.md/CLAUDE.md — for a choose-what-you-want flow.
  • importSkillRepo (curated templates' add-all) now shares the same discovery, so it gets nested support too. A repo that resolves but has no skills now says "no skills found," not "repo not found."

Frontend

  • New RepoImportDialog — a two-pane browse-and-select modal:
    • Left: discovered skills grouped by category, with per-skill / per-group / select-all checkboxes and an "already added" state (pre-selects everything new).
    • Right: a live SKILL.md preview (rendered markdown, served from the browse cache → instant) so you can see exactly what a skill does before adding.
    • Footer: optionally also pull in AGENTS.md / CLAUDE.md.
  • The pack editor's "Import a GitHub repo" now opens this dialog (Browse) instead of a blind "Import all."

Tests / checks

  • convex/skills.test.ts stubs a nested (mattpocock-shaped) tree and pins discovery-at-depth, category derivation, node_modules exclusion, URL normalization, SKILL.md caching, and the no-skills-vs-repo-not-found messages.
  • convex 239 passed, web production build succeeds, biome clean. (GITHUB_TOKEN is already set on the prod Convex deployment, so rate limits won't bite.)

After merge to staging I'll promote to main.

Importing a repo like mattpocock/skills failed with "no skills found": the repo
nests skills as skills/<category>/<id>/SKILL.md, but discovery only matched a
fixed set of top-level bases (skills, .claude/skills, .agents/skills) exactly,
so anything one folder deeper was invisible. Content-fetching already resolved
nested skills by leaf-dir name (Convex viewer + gateway backfill both do), so
only discovery was broken.

Backend (convex/skills.ts):
- discoverRepoSkills finds every SKILL.md at ANY depth in one git/trees call,
  derives a display "category" by stripping a recognized skills-root prefix
  (skills/.claude/.agents/.github), and skips node_modules. Leaf id must be
  unique within the repo (it's the fetch key) — first wins.
- New listRepoSkills action: discovers + fetches + caches each SKILL.md (so
  previews are instant) and returns them with category + description + the
  repo's AGENTS.md/CLAUDE.md, for a choose-what-you-want flow.
- importSkillRepo (curated templates, add-all) now shares the same discovery,
  so it benefits from nested support too. A repo that resolves but has no
  skills now reports "no skills found", not "repo not found".

Frontend:
- New RepoImportDialog: a two-pane browse-and-select modal — left is the
  discovered skills grouped by category with per-skill / per-group / select-all
  checkboxes and an added-already state; right is a live SKILL.md preview
  (rendered markdown, served from the browse cache so it's instant). Footer
  lets you also pull in AGENTS.md / CLAUDE.md. This brings repo import to
  parity with `npx skills add` (pick individual skills, see their contents).
- The pack editor's "Import a GitHub repo" now opens this dialog (Browse)
  instead of a blind "Import all".

Tests: convex/skills.test.ts stubs a nested (mattpocock-shaped) tree and pins
discovery-at-depth, category derivation, node_modules exclusion, URL
normalization, caching, and the no-skills vs not-found messages. convex 239
passed; web build + biome clean.
@DIodide
DIodide merged commit 109a7a2 into staging Jul 4, 2026
4 checks passed
@DIodide
DIodide deleted the feat/nested-skill-repo-import branch July 4, 2026 03:34
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