chore: mirror .claude/skills into .agents/skills via cross-platform links#240
Open
zicjin wants to merge 1 commit into
Open
chore: mirror .claude/skills into .agents/skills via cross-platform links#240zicjin wants to merge 1 commit into
zicjin wants to merge 1 commit into
Conversation
…inks Add scripts/link-agent-skills.mjs to generate links from .claude/skills/ into .agents/skills/ so non-Claude-Code agent tooling sees the same skills without duplicating files. - macOS/Linux: relative symlinks; Windows: directory junctions (no admin needed). Idempotent, prunes stale links, never deletes real dirs. - Generated links are git-ignored (derived artifacts); .gitkeep tracks the dir. Regenerate with `pnpm link:skills`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
For all skill directories in
.claude/skills/, generate matching links in.agents/skills/so non-Claude-Code agent tooling sees the same skills without duplicating any files.Why a script instead of committed symlinks
A symlink committed from macOS checks out as a broken text file on Windows unless the dev enabled git symlinks + Developer Mode/admin — so committed symlinks don't satisfy "support both Windows and Mac." A small Node script is the reliable cross-platform mechanism.
Changes
scripts/link-agent-skills.mjs(new) — generates the links:../../.claude/skills/spot-check)dirsymlink would need elevation, a junction does not)package.json— addspnpm link:skills..gitignore— ignores the generated links (derived artifacts); keeps.gitkeep..agents/skills/.gitkeep(new) — tracks the directory while links stay local.Usage
After clone, or whenever skills are added/removed:
pnpm link:skills # or: node scripts/link-agent-skills.mjsVerification
✓ 36 skill symlinks in .agents/skills/.agents/skills/spot-check/SKILL.mdreads correctly through the link.git check-ignoreconfirms the links are ignored; a dry-rungit add .agents/stages only.gitkeep.🤖 Generated with Claude Code