rulesync/Skill/Declarative Source
Declarative Skill Sources | Rulesync
- Rulesync can fetch skills from external repositories using the rulesync/install command. Instead of manually running
fetchfor each skill source, declare them in yourrulesync.jsoncand runrulesync installto resolve and fetch them. Then rulesync/generate picks them up as local curated skills. Typical workflow:rulesync install && rulesync generate. - This lets you import sources from another repository
Configuration
- Add a
sourcesarray to yourrulesync.jsonc:- json
{ "$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/config-schema.json", "targets": ["copilot", "claudecode"], "features": ["rules", "skills"], "sources": [ // Fetch all skills from a GitHub repository (default transport) { "source": "owner/repo" }, // Fetch only specific skills by name { "source": "anthropics/skills", "skills": ["skill-creator"] }, // With ref pinning and subdirectory path (same syntax as fetch command) { "source": "owner/repo@v1.0.0:path/to/skills" }, // Git transport — works with any git remote (Azure DevOps, Bitbucket, etc.) { "source": "https://dev.azure.com/org/project/_git/repo", "transport": "git", "ref": "main", "path": "exports/skills", }, // Git transport with a local repository { "source": "file:///path/to/local/repo", "transport": "git" }, ], }
- Add a
How it works
rulesync/add
Authentication for private repositories
- The same
source/addsyntax works against a private GitHub repo'sskills/orrulesync/skillsdirectory — the GitHub transport just needs credentials. - It uses the
GITHUB_TOKENorGH_TOKENenvironment variable: - Or pass a token explicitly:
rulesync install --token ghp_xxxx. - Git transport (
transport: "git", e.g. SSH remotes) relies on local git credential configuration instead.
- The same
Using local git auth (e.g. Git Credential Manager) instead of
GITHUB_TOKEN- The plain
owner/reposhorthand always uses the default"github"transport, which reads onlyGITHUB_TOKEN/GH_TOKEN— it never consults local git credentials. - To fetch a private repo's skills via local git auth (SSH keys or an HTTPS credential helper like Git Credential Manager) instead, set the transport to
gitand give a full URL rather than theowner/reposhorthand: - No
rulesync.jsonchand-editing is required —rulesync addexposes this as flags directly:
- The plain
- Rulesync can fetch skills from external repositories using the rulesync/install command. Instead of manually running