Loading...
Loading...
Compare original and translation side by side
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation intended to be loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts, etc.)skill-name/
├── SKILL.md (必填)
│ ├── YAML前置元数据 (必填)
│ │ ├── name: (必填)
│ │ └── description: (必填)
│ └── Markdown指令 (必填)
└── 捆绑资源 (可选)
├── scripts/ - 可执行代码(Python/Bash等)
├── references/ - 按需加载到上下文的文档
└── assets/ - 输出中使用的文件(模板、图标、字体等)namedescriptionnamedescriptionscripts/scripts/scripts/rotate_pdf.pyscripts/rotate_pdf.pyreferences/references/references/finance.mdreferences/mnda.mdreferences/policies.mdreferences/api_docs.mdreferences/finance.mdreferences/mnda.mdreferences/policies.mdreferences/api_docs.mdassets/assets/assets/logo.pngassets/slides.pptxassets/frontend-template/assets/font.ttfassets/logo.pngassets/slides.pptxassets/frontend-template/assets/font.ttfundefinedundefined
Claude loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.
**Pattern 2: Domain-specific organization**
For Skills with multiple domains, organize content by domain to avoid loading irrelevant context:
When a user asks about sales metrics, Claude only reads sales.md.
Similarly, for skills supporting multiple frameworks or variants, organize by variant:
When the user chooses AWS, Claude only reads aws.md.
**Pattern 3: Conditional details**
Show basic content, link to advanced content:
```markdown
Claude仅在需要时才会加载FORMS.md、REFERENCE.md或EXAMPLES.md。
**模式2:按领域组织**
对于包含多个领域的Skill,按领域组织内容以避免加载无关上下文:
当用户询问销售指标时,Claude仅读取sales.md。
类似地,对于支持多个框架或变体的Skill,按变体组织:
当用户选择AWS时,Claude仅读取aws.md。
**模式3:条件式细节**
显示基础内容,链接到高级内容:
```markdown
Claude reads REDLINING.md or OOXML.md only when the user needs those features.
**Important guidelines:**
- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.
- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so Claude can see the full scope when previewing.
Claude仅在用户需要这些功能时才会读取REDLINING.md或OOXML.md。
**重要指南**:
- **避免深层嵌套引用** - 保持引用与SKILL.md处于同一层级。所有参考文件应直接从SKILL.md链接。
- **结构化较长的参考文件** - 对于超过100行的文件,在顶部包含目录,以便Claude在预览时能看到完整范围。SKILL.spec.yamlskill-system-behavior:create-specskill-system-behavior:validate-specskill-system-behavior:verify-structuralskill-system-behavior:generate-contractskill-system-behavior:create-specSKILL.spec.yamlskill-system-behavior:validate-specskill-system-behavior:verify-structuralskill-system-behavior:generate-contractpdf-editorscripts/rotate_pdf.pyfrontend-webapp-builderassets/hello-world/big-queryreferences/schema.mdpdf-editorscripts/rotate_pdf.pyfrontend-webapp-builderassets/hello-world/big-queryreferences/schema.mdinit_skill.pyscripts/init_skill.py <skill-name> --path <output-directory>scripts/references/assets/init_skill.pyscripts/init_skill.py <skill-name> --path <output-directory>scripts/references/assets/SKILL_PGDATABASEPGDATABASESKILL_PGDATABASE<project>-memorySKILL_PGDATABASESKILL_PGDATABASEPGDATABASE<project>-memoryscripts/references/assets/brand-guidelinesassets/references/scripts/references/assets/scripts/references/assets/brand-guidelinesassets/references/scripts/references/assets/namedescriptionnamedescriptiondocxnamedescriptionnamedescriptiondocxscripts/package_skill.py <path/to/skill-folder>scripts/package_skill.py <path/to/skill-folder> ./distmy-skill.skillscripts/package_skill.py <path/to/skill-folder>scripts/package_skill.py <path/to/skill-folder> ./distmy-skill.skill{
"schema_version": "2.0",
"id": "skill-system-creator",
"version": "1.0.0",
"capabilities": ["skill-create", "skill-validate", "skill-package", "artifact-gap-analysis", "artifact-generate", "artifact-brainstorm", "artifact-eval"],
"effects": ["fs.read", "fs.write", "proc.exec"],
"operations": {
"init": {
"description": "Initialize a new skill directory with SKILL.md template and resource folders.",
"input": {
"skill_name": { "type": "string", "required": true, "description": "Name for the new skill" },
"output_dir": { "type": "string", "required": false, "description": "Directory to create skill in" }
},
"output": {
"description": "Path to created skill directory",
"fields": { "path": "string" }
},
"entrypoints": {
"unix": ["python3", "scripts/init_skill.py", "{skill_name}", "--path", "{output_dir}"],
"windows": ["python", "scripts/init_skill.py", "{skill_name}", "--path", "{output_dir}"]
}
},
"package": {
"description": "Validate and package a skill into a distributable .skill file.",
"input": {
"skill_path": { "type": "string", "required": true, "description": "Path to skill folder" }
},
"output": {
"description": "Path to .skill package file",
"fields": { "package_path": "string" }
},
"entrypoints": {
"unix": ["python3", "scripts/package_skill.py", "{skill_path}"],
"windows": ["python", "scripts/package_skill.py", "{skill_path}"]
}
},
"suggest-artifacts": {
"description": "Detect creator artifact gaps by reading behavior graph plus skills-index.json and returning ranked suggestions.",
"input": {
"repo_root": { "type": "string", "required": false, "description": "Repository root" }
},
"output": {
"description": "Ranked artifact suggestions",
"fields": { "suggestions": "array" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "suggest-artifacts"],
"windows": ["python", "scripts/creator_tool.py", "suggest-artifacts"]
}
},
"generate": {
"description": "Generate creator artifacts with deterministic template + validation (currently supports --type script).",
"input": {
"artifact_type": { "type": "string", "required": true, "description": "Artifact type; script supported" },
"name": { "type": "string", "required": true, "description": "Artifact file name" },
"output_dir": { "type": "string", "required": true, "description": "Output directory" },
"force": { "type": "boolean", "required": false, "description": "Overwrite when target exists" }
},
"output": {
"description": "Generation and validation result",
"fields": { "artifact": "object", "validation": "object", "structural_validation": "object" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "generate", "--type", "{artifact_type}", "--name", "{name}", "--output-dir", "{output_dir}"],
"windows": ["python", "scripts/creator_tool.py", "generate", "--type", "{artifact_type}", "--name", "{name}", "--output-dir", "{output_dir}"]
}
},
"brainstorm": {
"description": "Combine memory learnings and graph/spec structure into ranked improvement suggestions.",
"input": {
"limit": { "type": "number", "required": false, "description": "Suggestion limit" },
"memory_limit": { "type": "number", "required": false, "description": "Memory sample limit" }
},
"output": {
"description": "Ranked brainstorm suggestions with rationale",
"fields": { "suggestions": "array" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "brainstorm"],
"windows": ["python", "scripts/creator_tool.py", "brainstorm"]
}
},
"eval": {
"description": "Route artifact evaluation through skill-system-gate and emit pass/fail with improvement suggestions.",
"input": {
"artifact_path": { "type": "string", "required": true, "description": "Artifact path" },
"rules_template": { "type": "string", "required": false, "description": "Optional rules template" }
},
"output": {
"description": "Gate evaluation report",
"fields": { "passed": "boolean", "gate_summary": "object", "improvement_suggestions": "array" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "eval", "--artifact", "{artifact_path}"],
"windows": ["python", "scripts/creator_tool.py", "eval", "--artifact", "{artifact_path}"]
}
}
},
"stdout_contract": {
"last_line_json": true
}
}{
"schema_version": "2.0",
"id": "skill-system-creator",
"version": "1.0.0",
"capabilities": ["skill-create", "skill-validate", "skill-package", "artifact-gap-analysis", "artifact-generate", "artifact-brainstorm", "artifact-eval"],
"effects": ["fs.read", "fs.write", "proc.exec"],
"operations": {
"init": {
"description": "Initialize a new skill directory with SKILL.md template and resource folders.",
"input": {
"skill_name": { "type": "string", "required": true, "description": "Name for the new skill" },
"output_dir": { "type": "string", "required": false, "description": "Directory to create skill in" }
},
"output": {
"description": "Path to created skill directory",
"fields": { "path": "string" }
},
"entrypoints": {
"unix": ["python3", "scripts/init_skill.py", "{skill_name}", "--path", "{output_dir}"],
"windows": ["python", "scripts/init_skill.py", "{skill_name}", "--path", "{output_dir}"]
}
},
"package": {
"description": "Validate and package a skill into a distributable .skill file.",
"input": {
"skill_path": { "type": "string", "required": true, "description": "Path to skill folder" }
},
"output": {
"description": "Path to .skill package file",
"fields": { "package_path": "string" }
},
"entrypoints": {
"unix": ["python3", "scripts/package_skill.py", "{skill_path}"],
"windows": ["python", "scripts/package_skill.py", "{skill_path}"]
}
},
"suggest-artifacts": {
"description": "Detect creator artifact gaps by reading behavior graph plus skills-index.json and returning ranked suggestions.",
"input": {
"repo_root": { "type": "string", "required": false, "description": "Repository root" }
},
"output": {
"description": "Ranked artifact suggestions",
"fields": { "suggestions": "array" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "suggest-artifacts"],
"windows": ["python", "scripts/creator_tool.py", "suggest-artifacts"]
}
},
"generate": {
"description": "Generate creator artifacts with deterministic template + validation (currently supports --type script).",
"input": {
"artifact_type": { "type": "string", "required": true, "description": "Artifact type; script supported" },
"name": { "type": "string", "required": true, "description": "Artifact file name" },
"output_dir": { "type": "string", "required": true, "description": "Output directory" },
"force": { "type": "boolean", "required": false, "description": "Overwrite when target exists" }
},
"output": {
"description": "Generation and validation result",
"fields": { "artifact": "object", "validation": "object", "structural_validation": "object" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "generate", "--type", "{artifact_type}", "--name", "{name}", "--output-dir", "{output_dir}"],
"windows": ["python", "scripts/creator_tool.py", "generate", "--type", "{artifact_type}", "--name", "{name}", "--output-dir", "{output_dir}"]
}
},
"brainstorm": {
"description": "Combine memory learnings and graph/spec structure into ranked improvement suggestions.",
"input": {
"limit": { "type": "number", "required": false, "description": "Suggestion limit" },
"memory_limit": { "type": "number", "required": false, "description": "Memory sample limit" }
},
"output": {
"description": "Ranked brainstorm suggestions with rationale",
"fields": { "suggestions": "array" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "brainstorm"],
"windows": ["python", "scripts/creator_tool.py", "brainstorm"]
}
},
"eval": {
"description": "Route artifact evaluation through skill-system-gate and emit pass/fail with improvement suggestions.",
"input": {
"artifact_path": { "type": "string", "required": true, "description": "Artifact path" },
"rules_template": { "type": "string", "required": false, "description": "Optional rules template" }
},
"output": {
"description": "Gate evaluation report",
"fields": { "passed": "boolean", "gate_summary": "object", "improvement_suggestions": "array" }
},
"entrypoints": {
"unix": ["python3", "scripts/creator_tool.py", "eval", "--artifact", "{artifact_path}"],
"windows": ["python", "scripts/creator_tool.py", "eval", "--artifact", "{artifact_path}"]
}
}
},
"stdout_contract": {
"last_line_json": true
}
}