Generate npx skills add commands to reproduce installed skills. Use when user wants to export, backup, share, or replicate their skills setup on another machine.
Generate npx skills add commands from current installation.
Copy this checklist and track progress:
Export Skills:
- [ ] Step 1: Collect installation data
- [ ] Step 2: Parse and map agent names
- [ ] Step 3: Group by source and agent-set
- [ ] Step 4: Generate commands
Run these commands:
npx skills ls -g
cat ~/.agents/.skill-lock.json
Parse npx skills ls -g output:
<skill-name> <path>
Agents: <Agent1>, <Agent2>, ...
Extract skill name (first word of non-indented line) and agents (comma-separated after "Agents:").
Map display names to CLI values: See references/agents.md
Lock file path: ~/.agents/.skill-lock.json
{ "<skill-name>": { "source": "<owner/repo>", ... } }
Group skills sharing same source repo AND same agent set into one command.
Command format:
npx skills add <source> -g -y -s <skill1> -s <skill2> -a <agent1> -a <agent2>
npx skills ls -g only; source repo info will be unavailableInput:
docx ~/.agents/skills/docx
Agents: Antigravity, Claude Code
pdf ~/.agents/skills/pdf
Agents: Antigravity, Claude Code
Lock: docx and pdf both have "source": "anthropics/skills"
Output:
npx skills add anthropics/skills -g -y -s docx -s pdf -a antigravity -a claude-code