skill-exporter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Exporter
Skill Exporter
Generate commands from current installation.
npx skills add从当前安装环境生成命令。
npx skills addWorkflow
工作流程
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复制此检查清单并跟踪进度:
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 commandsStep 1: Collect Installation Data
步骤1:收集安装数据
Run these commands:
bash
npx skills ls -g
cat ~/.agents/.skill-lock.json运行以下命令:
bash
npx skills ls -g
cat ~/.agents/.skill-lock.jsonStep 2: Parse and Map Agent Names
步骤2:解析并映射Agent名称
Parse output:
npx skills ls -g<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
解析的输出:
npx skills ls -g<skill-name> <path>
Agents: <Agent1>, <Agent2>, ...提取技能名称(非缩进行的第一个单词)和Agent(“Agents:”后逗号分隔的内容)。
将显示名称映射为CLI值: 参考references/agents.md
Step 3: Group by Source and Agent-Set
步骤3:按来源和Agent集合分组
Lock file path:
~/.agents/.skill-lock.jsonjson
{ "<skill-name>": { "source": "<owner/repo>", ... } }Group skills sharing same source repo AND same agent set into one command.
锁定文件路径:
~/.agents/.skill-lock.jsonjson
{ "<skill-name>": { "source": "<owner/repo>", ... } }将共享同一来源仓库且Agent集合相同的技能分组到一条命令中。
Step 4: Generate Commands
步骤4:生成命令
Command format:
bash
npx skills add <source> -g -y -s <skill1> -s <skill2> -a <agent1> -a <agent2>命令格式:
bash
npx skills add <source> -g -y -s <skill1> -s <skill2> -a <agent1> -a <agent2>Error Handling
错误处理
- Lock file missing: Use only; source repo info will be unavailable
npx skills ls -g - Skill not in lock file: Skip or prompt user for source repo
- 锁定文件缺失:仅使用;此时将无法获取来源仓库信息
npx skills ls -g - 技能不在锁定文件中:跳过或提示用户输入来源仓库
Example
示例
Input:
docx ~/.agents/skills/docx
Agents: Antigravity, Claude Code
pdf ~/.agents/skills/pdf
Agents: Antigravity, Claude CodeLock: and both have
docxpdf"source": "anthropics/skills"Output:
bash
npx skills add anthropics/skills -g -y -s docx -s pdf -a antigravity -a claude-code输入:
docx ~/.agents/skills/docx
Agents: Antigravity, Claude Code
pdf ~/.agents/skills/pdf
Agents: Antigravity, Claude Code锁定文件: 和的均为
docxpdf"source""anthropics/skills"输出:
bash
npx skills add anthropics/skills -g -y -s docx -s pdf -a antigravity -a claude-code