Skip to content

Make the skill directory self-contained so both install paths work - #10

Merged
alexburan merged 1 commit into
mainfrom
fix/self-contained-skill-dir
Aug 25, 2026
Merged

Make the skill directory self-contained so both install paths work#10
alexburan merged 1 commit into
mainfrom
fix/self-contained-skill-dir

Conversation

@alexburan

Copy link
Copy Markdown
Contributor

Follow-up to #9, fixing a regression it introduced.

What broke

Moving SKILL.md under skills/ broke the plain personal-skill install. A symlink at ~/.claude/skills/claude-translator pointing at the repo root no longer resolved to a SKILL.md, and the skill silently disappeared from Claude's skill list.

#9 assumed a directory in ~/.claude/skills/ carrying a .claude-plugin/plugin.json would be auto-loaded as a plugin instead. That is not true on Claude Code 2.1.126claude plugin list reports nothing installed. The README claim to that effect was wrong and is removed.

The fix

references/ moves into skills/translate-site/references/, making the skill directory self-contained. One copy then serves both install paths:

  • as a plugin, via the marketplace or --plugin-dir
  • as a plain personal skill, by symlinking skills/translate-site directly into ~/.claude/skills/

Reference links in the skill go back to plain relative paths. Only LICENSING.md and i18n.config.example.json, which stay at the repo root, keep ${CLAUDE_PLUGIN_ROOT}. README links and the npm files list follow the move.

Verification

Both paths checked against the final layout:

  • Plugin loads through --plugin-dir as conveythis-translator:<skill>, confirmed with a uniquely renamed copy so no already-installed skill could be mistaken for it
  • The symlinked skill directory is discovered as a personal skill
  • claude plugin validate . passes with no errors and no warnings
  • npm run check and all 39 tests pass; npm pack ships the manifest, the skill and its references

🤖 Generated with Claude Code

Moving SKILL.md under skills/ in the previous commit broke the plain personal-skill
install: a symlink at ~/.claude/skills/claude-translator pointing at the repo root no
longer resolved to a SKILL.md, and the skill silently disappeared.

The previous commit assumed a directory in ~/.claude/skills/ carrying a
.claude-plugin/plugin.json would be auto-loaded as a plugin instead. That is not true
on Claude Code 2.1.126 — claude plugin list reports nothing installed — so the README
claim was wrong and is removed.

references/ now lives inside skills/translate-site/, making the skill directory
self-contained. One copy then serves both paths: as a plugin, and as a plain skill
symlinked directly into ~/.claude/skills/. The reference links go back to plain
relative paths; only LICENSING.md and i18n.config.example.json, which stay at the repo
root, keep ${CLAUDE_PLUGIN_ROOT}. README links and the npm files list follow the move.

Verified both ways against the final layout: the plugin loads through --plugin-dir as
conveythis-translator:<skill>, and the symlinked skill directory is discovered as a
personal skill. claude plugin validate passes clean, npm run check and all 39 tests
pass, and npm pack ships the manifest, the skill and its references.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@alexburan
alexburan merged commit a4201b9 into main Aug 25, 2026
1 check passed
@alexburan
alexburan deleted the fix/self-contained-skill-dir branch August 25, 2026 22: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