Skip to content

feat(skills): support root-level SKILL.md single-skill repos#249

Merged
christso merged 1 commit into
mainfrom
feat/243-root-level-skill-md
Mar 14, 2026
Merged

feat(skills): support root-level SKILL.md single-skill repos#249
christso merged 1 commit into
mainfrom
feat/243-root-level-skill-md

Conversation

@christso
Copy link
Copy Markdown
Contributor

Summary

  • Add detection for plugins with SKILL.md at the repo root (the default npx skills init layout)
  • Read skill name from SKILL.md YAML frontmatter name field, falling back to directory name
  • Extend copySkills() in transform.ts to handle flat and root-level layouts (not just skills/ dir)
  • Priority: skills/ directory > flat subdirs with SKILL.md > root-level SKILL.md

Closes #243

Test plan

  • Unit tests added for root-level SKILL.md discovery (3 new tests)
  • All existing tests pass (963 pass, 0 fail)

E2E verification

bun run build

# Create a minimal root-level SKILL.md repo
mkdir /tmp/single-skill-repo
printf '---\nname: my-skill\ndescription: test\n---\n# My skill' > /tmp/single-skill-repo/SKILL.md

# Set up a test workspace
mkdir -p /tmp/test-ws/.allagents
cat > /tmp/test-ws/.allagents/workspace.yaml <<YAML
plugins:
  - /tmp/single-skill-repo
clients:
  - claude
YAML

# Verify skill discovery
cd /tmp/test-ws && /path/to/dist/index.js skills list
# Expected: shows "my-skill" from the installed plugin

# Verify sync copies the SKILL.md
cd /tmp/test-ws && /path/to/dist/index.js workspace sync
ls .claude/skills/my-skill/SKILL.md
# Expected: SKILL.md exists

# Cleanup
rm -rf /tmp/single-skill-repo /tmp/test-ws

🤖 Generated with Claude Code

Add detection for repos where SKILL.md lives at the plugin root
(the default layout created by `npx skills init`). The skill name
is read from SKILL.md frontmatter, falling back to the directory name.

Priority order: skills/ dir > flat subdirs with SKILL.md > root SKILL.md.

Also extends copySkills() in transform.ts to handle flat and root-level
layouts so these skills are actually synced to client paths.

Closes #243
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying allagents with  Cloudflare Pages  Cloudflare Pages

Latest commit: baec2fc
Status: ✅  Deploy successful!
Preview URL: https://1982039e.allagents.pages.dev
Branch Preview URL: https://feat-243-root-level-skill-md.allagents.pages.dev

View logs

@christso christso merged commit f757de2 into main Mar 14, 2026
1 check passed
@christso christso deleted the feat/243-root-level-skill-md branch March 14, 2026 03:03
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.

feat: support single-skill repos with root-level SKILL.md (npx skills init default layout)

1 participant