feat(skill): source-positional + nested skill discovery#413
Merged
Conversation
- Add formatPluginSource() helper that shortens GitHub URLs to OWNER/REPO, strips /blob/<default-branch>/, and preserves @<ref> for non-default refs. Used by `workspace status` and `skill list` output (display-only — the workspace.yaml source is preserved verbatim). - Recursively walk skills/ to find every SKILL.md, including nested layouts like skills/research/llm-wiki/SKILL.md. Each discovered skill carries its qualified subpath alongside the bare leaf name; the allowlist now matches either form so users can disambiguate with `category/skill` if needed. As a side effect, `skill add --list` no longer reports container dirs that lack a SKILL.md as fake skills. - Add npx-skills positional shape: when the positional argument to `skill add` looks like a GitHub source AND a selector (--skill, --list, --all) is provided, treat the positional as the source. Adds a --skill flag that accepts a comma-separated list for multi-skill installs. The legacy `--from`/deep-URL forms continue to work unchanged. - Update transform.copySkills() and collectPluginSkills() to use the same recursive walk so sync correctly copies nested skills referenced by the allowlist. Builds on #412.
Deploying allagents with
|
| Latest commit: |
b57ce9b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e235b2fb.allagents.pages.dev |
| Branch Preview URL: | https://feat-skill-add-source-positi.allagents.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
formatPluginSource()helper shortens long source strings forworkspace statusandskill listoutput (e.g.https://github.com/owner/repo/blob/main/skills/foo→owner/repo/skills/foo). Display-only;workspace.yamlkeeps the original string.skills/for anySKILL.md, picking up nested layouts likeskills/research/llm-wiki/SKILL.md. Each skill carries its qualifiedcategory/skillsubpath; the allowlist matches either the bare leaf name or the qualified path. As a side effect,skill add --listno longer reports empty container directories as skills.--skill,--list,--all) is provided, the positional is treated as the source. Adds a--skillflag accepting a comma-separated list for multi-skill installs. Legacyskill add <skill> --from <source>and deep-URL forms keep working.transform.copySkills()andcollectPluginSkills()use the same recursive walk so sync copies and tracks nested skills correctly.Builds on #412.
Before / after
Before
After
Test plan
bun test— 1306 passing, 0 failing (added unit coverage forformatPluginSource, recursive skill discovery, allowlist match by qualified subpath, andclassifySkillAddPositional)bun run typecheck— cleanbun run check— lint count down (119 → 111); pre-push hook passesskill add llm-wiki --from NousResearch/hermes-agent→ enabledskill add NousResearch/hermes-agent --skill llm-wiki→ enabledskill add NousResearch/hermes-agent --skill llm-wiki,dogfood→ both enabled (verified plain text + JSON output)--allwith positional source:skill add NousResearch/hermes-agent --all→ 89 skills enabled, nested skills included--list: shows nested skills asresearch/llm-wiki; no bare container dirs; JSON output includespathfield for nestedskill add https://github.com/NousResearch/hermes-agent/blob/main/skills/research/llm-wikistill resolves to skillllm-wikiworkspace statusshowsNousResearch/hermes-agent/skills/research/llm-wiki;skill listshows qualified path for nested skills.claude/skills/llm-wiki/SKILL.mdafter install--skillwithout a source positional → clear error;positional source + --from→ clear conflict error;skill add --helpshows new--skillflag and examples