export-skills
Export SpecWeave skills to Agent Skills open standard format (agentskills.io). Converts Claude Code plugin skills to portable SKILL.md files compatible with GitHub Copilot, VS Code, Gemini CLI, Cursor, and other Agent Skills-compatible tools. Activates for export skills, agent skills, github skills, skills.md, agentskills, portable skills, convert skills, skill export, cross-platform skills.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Export Skills to Agent Skills Standard
Overview
Export SpecWeave skills to the Agent Skills open standard format. This enables skill portability across:
- GitHub Copilot (VS Code integration)
- Gemini CLI
- Cursor
- Claude Code
- Other Agent Skills-compatible tools
Usage
/sw:export-skills [options]
Options
| Option | Description |
|---|---|
--output <dir> |
Output directory (default: .agent-skills/) |
--plugin <name> |
Export specific plugin (default: all) |
--skill <name> |
Export specific skill (default: all) |
--dry-run |
Preview without writing files |
--validate |
Validate output against Agent Skills spec |
Output Structure
.agent-skills/
├── architect/
│ └── SKILL.md
├── security/
│ └── SKILL.md
├── qa-lead/
│ └── SKILL.md
└── pm/
└── SKILL.md
Field Mapping
| SpecWeave Field | Agent Skills Field | Notes |
|---|---|---|
name |
name |
Direct mapping |
description |
description |
Direct mapping (max 1024 chars) |
allowed-tools |
allowed-tools |
Convert comma to space-delimited |
| N/A | license |
Add Apache-2.0 by default |
| N/A | compatibility |
Add "Designed for Claude Code" |
| N/A | metadata.author |
Use plugin manifest author |
| N/A | metadata.source |
Add "SpecWeave" |
visibility |
(not mapped) | Agent Skills uses file placement |
invocableBy |
(not mapped) | Agent Skills discovery is implicit |
Execution Steps
Step 1: Discover Skills
# Find all SKILL.md files in plugins
find plugins -name "SKILL.md" -type f
Step 2: Convert Each Skill
For each SKILL.md:
- Parse YAML frontmatter
- Extract description (truncate to 1024 chars if needed)
- Convert
allowed-toolsfrom comma to space-delimited - Generate Agent Skills-compliant frontmatter
- Preserve markdown body content
Step 3: Validate Output
Each exported skill must:
- Have
namematching directory name - Have
descriptionbetween 1-1024 characters - Have
nameusing onlya-zand- - Not have
--in name - Not start/end with
-
Step 4: Write Files
Write to output directory with structure:
{output}/{skill-name}/SKILL.md
Conversion Script
interface SpecWeaveSkill {
name: string;
description: string;
'allowed-tools'?: string;
visibility?: string;
invocableBy?: string[];
context?: string;
model?: string;
}
interface AgentSkill {
name: string;
description: string;
license?: string;
compatibility?: string;
metadata?: Record<string, string>;
'allowed-tools'?: string;
}
function convertSkill(specweave: SpecWeaveSkill, pluginName: string): AgentSkill {
return {
name: specweave.name,
description: specweave.description.slice(0, 1024),
license: 'Apache-2.0',
compatibility: 'Designed for Claude Code (or similar products)',
metadata: {
author: 'specweave',
source: 'SpecWeave',
plugin: pluginName
},
'allowed-tools': specweave['allowed-tools']?.replace(/,\s*/g, ' ')
};
}
Example Output
Input (plugins/specweave/skills/architect/SKILL.md):
---
name: architect
description: System Architect expert...
allowed-tools: Read, Write, Edit
context: fork
model: opus
---
Output (.agent-skills/architect/SKILL.md):
---
name: architect
description: System Architect expert...
license: Apache-2.0
compatibility: Designed for Claude Code (or similar products)
metadata:
author: specweave
source: SpecWeave
plugin: sw
allowed-tools: Read Write Edit
---
Post-Export Actions
After exporting:
- Commit to repo: Skills can be discovered from any subdirectory
- Push to GitHub: Enable Copilot skill discovery
- Publish: Consider publishing to skill registries
Limitations
- SpecWeave-specific fields (
context,model,invocableBy) are not exported - Progressive disclosure phases (sub-files) are not included
- Skill memory files are not exported (they're runtime state)
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-28
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!