Skip to content

fix(install): support single-skill repos with SKILL.md at path root#1497

Open
lgaudez wants to merge 2 commits intodyoshikawa:mainfrom
lgaudez:fix/single-skill-repo-root
Open

fix(install): support single-skill repos with SKILL.md at path root#1497
lgaudez wants to merge 2 commits intodyoshikawa:mainfrom
lgaudez:fix/single-skill-repo-root

Conversation

@lgaudez
Copy link
Copy Markdown
Contributor

@lgaudez lgaudez commented Apr 15, 2026

Summary

  • fetchSourceViaGit silently skipped all files when a remote repo exposes a single skill at the root of skillsPath (e.g. SKILL.md directly at path ""), because every file has relativePath.indexOf("/") === -1 and was skipped by the existing loop
  • Added a fallback that groups root-level files under the requested skill name when: skillFileMap is empty after the main loop, skills filter contains exactly one non-wildcard name, and root-level files exist
  • Wildcard (*) is intentionally excluded from the fallback since the skill name would be ambiguous

Note that I opened the PR because I tried to add this skill in mu rylesync.jsonc -> "https://github.com/blader/humanizer.git"

rulesync.jsonc sample :

"sources": [
  {
    "source": "https://github.com/blader/humanizer.git",
    "transport": "git",
    "ref": "8b3a17889fbf12bedae20974a3c9f9de746ed754",
    "path": "",
    "skills": ["humanizer"],
    "outputPath": ".rulesync/skills/.curated"
  },
]

Test plan

  • New test: should install single-skill repo with SKILL.md at path root - verifies the happy path
  • New test: should still handle classic subdirectory skill structure - regression, existing behavior unchanged
  • New test: should not install root-level files when skills filter is wildcard - wildcard stays at 0 skills
  • All 33 existing unit tests pass

When a git source exposes a single skill at the root of skillsPath
(e.g. SKILL.md at path: ""), all files have no "/" in relativePath
and were silently skipped. Add a fallback that maps root-level files
to the single explicit skill name when skills filter is not a wildcard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lgaudez lgaudez marked this pull request as draft April 15, 2026 11:10
@lgaudez lgaudez marked this pull request as ready for review April 15, 2026 11:30
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