Usage
Description
Theexperimental_sync command crawls your node_modules directory to discover skills bundled with npm packages, then installs them to agent directories. This is useful for:
- Teams sharing skills via npm packages
- Monorepos with skill packages
- Automatic skill setup from
package.jsondependencies
skills-lock.json) to avoid redundant reinstalls.
How It Works
Scan node_modules
Recursively searches
node_modules for SKILL.md files in:- Package root:
node_modules/pkg/SKILL.md skills/directory:node_modules/pkg/skills/*/SKILL.md.agents/skills/:node_modules/pkg/.agents/skills/*/SKILL.md- Scoped packages:
node_modules/@org/pkg/...
Check Local Lock
Reads
skills-lock.json to see which skills are already installed and up to date.Computes a hash of each discovered skill folder and compares with the lock file:- Match: Skill is up to date (skipped)
- Different: Skill needs installation/update
Select Agents
Prompts to select which agents to install to (unless
-y flag is used).Universal agents (.agents/skills/) are always included.Options
Specify which agents to install to. Accepts multiple agent names or
'*' for all agents.Examples:-a claude-code -a cursor--agent '*'(all agents)
Skip confirmation prompts. Automatically proceeds with sync.Default:
falseForce reinstall of all skills, even if they’re already up to date.Default:
falseExamples
Package Structure
To include skills in your npm package, use one of these structures:- Root SKILL.md
- skills/ Directory
- .agents/skills/
Single skill at package root:The skill name comes from the SKILL.md frontmatter.
Output Example
Local Lock File
The sync command usesskills-lock.json (project-scoped) to track installed skills:
- Location: Project root (committed with your project)
- Scope: Project-scoped skills only
- Hash: Computed from local files (not GitHub tree SHA)
- Purpose: Avoid redundant syncs when
node_moduleshasn’t changed
Workflow Integration
In package.json
Add sync to your setup scripts:npm installnpm ci- Fresh clones
In Monorepos
For monorepos with multiple packages containing skills:Sync vs Add
Comparison with theadd command:
| Feature | experimental_sync | add |
|---|---|---|
| Source | node_modules | GitHub, Git, URLs, local paths |
| Scope | Project only | Project or global |
| Updates | Automatic (via lock file) | Manual |
| Lock file | skills-lock.json (local) | .skill-lock.json (global) |
| Use case | Team dependencies | Individual skills |
- Skills are in
package.jsondependencies - Automated setup for new team members
- CI/CD environments
- Monorepo skill packages
- Installing from GitHub repos
- Global skills for personal use
- One-off skill installations
- Testing skills before packaging
Force Mode
The--force flag reinstalls all skills, ignoring the lock file:
- Lock file is corrupted
- Skills were manually deleted
- Testing skill changes during development
- Resetting to clean state
Troubleshooting
No skills found
No skills found
Message:
No SKILL.md files found in node_modulesCauses:- No packages with skills installed
- Skills not in standard locations
node_modulesmissing (runnpm install)
Skills already up to date
Skills already up to date
Message:
All skills are up to dateCause: Lock file matches current node_modules stateForce reinstall if needed:Symlink failures
Symlink failures
Symptom: Skills installed as copies instead of symlinksCauses:
- Windows without Developer Mode
- Filesystem doesn’t support symlinks
- Permission issues
- Enable Developer Mode (Windows)
- Check filesystem mount options
- Run with appropriate permissions
Lock file conflicts
Lock file conflicts
Symptom: Git conflicts in
skills-lock.jsonCause: Multiple team members syncing different skillsSolution:Related Commands
skills add- Install skills from repositoriesskills list- List installed skillsskills remove- Remove skills