@amsterdamdatalabs/enact-extensions 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -21
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +171 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +402 -49
- package/dist/install.js.map +1 -1
- package/dist/internal/codex.d.ts.map +1 -1
- package/dist/internal/codex.js +7 -1
- package/dist/internal/codex.js.map +1 -1
- package/dist/internal/platform.d.ts +8 -0
- package/dist/internal/platform.d.ts.map +1 -1
- package/dist/internal/platform.js +46 -2
- package/dist/internal/platform.js.map +1 -1
- package/dist/provision.d.ts +30 -0
- package/dist/provision.d.ts.map +1 -0
- package/dist/provision.js +202 -0
- package/dist/provision.js.map +1 -0
- package/dist/validate/index.d.ts +44 -0
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +157 -0
- package/dist/validate/index.js.map +1 -1
- package/extensions/cmux/.agents/plugin.json +37 -0
- package/extensions/cmux/skills/cmux/SKILL.md +82 -0
- package/extensions/cmux/skills/cmux/agents/openai.yaml +4 -0
- package/extensions/cmux/skills/cmux/references/handles-and-identify.md +35 -0
- package/extensions/cmux/skills/cmux/references/panes-surfaces.md +37 -0
- package/extensions/cmux/skills/cmux/references/trigger-flash-and-health.md +23 -0
- package/extensions/cmux/skills/cmux/references/windows-workspaces.md +31 -0
- package/extensions/cmux/skills/cmux-vm-monitor/SKILL.md +122 -0
- package/extensions/cmux/skills/cmux-vm-monitor/agents/openai.yaml +4 -0
- package/extensions/cmux/skills/cmux-vm-monitor/references/cmux-commands.md +66 -0
- package/extensions/cmux/skills/cmux-vm-monitor/scripts/codex_vm_monitor.sh +45 -0
- package/extensions/cmux/skills/cmux-workspace/SKILL.md +93 -0
- package/extensions/dev-state/.agents/plugin.json +35 -0
- package/extensions/dev-state/skills/dev-state-plan-graduation/SKILL.md +194 -0
- package/extensions/dev-state/skills/dev-state-plan-graduation/agents/openai.yaml +4 -0
- package/extensions/dev-state/skills/dev-state-plan-graduation/references/reference.md +130 -0
- package/extensions/devops/.agents/plugin.json +36 -0
- package/extensions/devops/skills/azure-devops-cli/SKILL.md +431 -0
- package/extensions/devops/skills/azure-devops-cli/agents/openai.yaml +4 -0
- package/extensions/devops/skills/ci-pipeline-strategy/SKILL.md +217 -0
- package/extensions/devops/skills/ci-pipeline-strategy/agents/openai.yaml +4 -0
- package/extensions/enact-context/.agents/plugin.json +40 -0
- package/extensions/enact-context/.mcp.json +8 -0
- package/extensions/enact-context/README.md +25 -0
- package/extensions/enact-context/assets/icon.png +0 -0
- package/extensions/enact-context/assets/logo.png +0 -0
- package/extensions/enact-context/hooks/hooks.json +115 -0
- package/extensions/enact-context/skills/enact-context/SKILL.md +149 -0
- package/extensions/enact-context/skills/enact-context/scripts/install.sh +69 -0
- package/extensions/enact-factory/.agents/plugin.json +42 -0
- package/extensions/enact-factory/.mcp.json +8 -0
- package/extensions/enact-factory/assets/icon.png +0 -0
- package/extensions/enact-factory/assets/logo.png +0 -0
- package/extensions/enact-factory/hooks/user-prompt-submit.mjs +67 -0
- package/extensions/enact-factory/skills/testing-strategy/SKILL.md +167 -0
- package/extensions/enact-factory/skills/workitem-triage/SKILL.md +22 -0
- package/extensions/enact-operator/.agents/plugin.json +57 -0
- package/extensions/enact-operator/.app.json +3 -0
- package/extensions/enact-operator/.mcp.json +10 -0
- package/extensions/enact-operator/_taxonomy.md +86 -0
- package/extensions/enact-operator/agents/README.md +5 -0
- package/extensions/enact-operator/agents/architect.toml +25 -0
- package/extensions/enact-operator/agents/code-reviewer.toml +24 -0
- package/extensions/enact-operator/agents/critic.toml +30 -0
- package/extensions/enact-operator/agents/executor.toml +24 -0
- package/extensions/enact-operator/agents/explore.toml +23 -0
- package/extensions/enact-operator/agents/planner.toml +24 -0
- package/extensions/enact-operator/agents/verifier.toml +24 -0
- package/extensions/enact-operator/assets/icon.png +0 -0
- package/extensions/enact-operator/assets/logo.png +0 -0
- package/extensions/enact-operator/commands/doctor.md +39 -0
- package/extensions/enact-operator/commands/setup.md +51 -0
- package/extensions/enact-operator/hooks/hooks.json +146 -0
- package/extensions/enact-operator/skills/_variants.md +44 -0
- package/extensions/enact-operator/skills/ai-slop-cleaner/SKILL.md +50 -0
- package/extensions/enact-operator/skills/analyze/SKILL.md +91 -0
- package/extensions/enact-operator/skills/ask/SKILL.md +47 -0
- package/extensions/enact-operator/skills/autopilot/SKILL.md +170 -0
- package/extensions/enact-operator/skills/autoresearch-goal/SKILL.md +79 -0
- package/extensions/enact-operator/skills/cancel/SKILL.md +99 -0
- package/extensions/enact-operator/skills/configure-notifications/SKILL.md +77 -0
- package/extensions/enact-operator/skills/deep-interview/SKILL.md +80 -0
- package/extensions/enact-operator/skills/doctor/SKILL.md +48 -0
- package/extensions/enact-operator/skills/hud/SKILL.md +49 -0
- package/extensions/enact-operator/skills/hyperplan/SKILL.md +47 -0
- package/extensions/enact-operator/skills/plan/SKILL.md +78 -0
- package/extensions/enact-operator/skills/ralph/SKILL.md +201 -0
- package/extensions/enact-operator/skills/ralph/gemini.md +18 -0
- package/extensions/enact-operator/skills/ralplan/SKILL.md +151 -0
- package/extensions/enact-operator/skills/remove-deadcode/SKILL.md +45 -0
- package/extensions/enact-operator/skills/research/SKILL.md +74 -0
- package/extensions/enact-operator/skills/review/SKILL.md +58 -0
- package/extensions/enact-operator/skills/security-research/SKILL.md +54 -0
- package/extensions/enact-operator/skills/setup/SKILL.md +91 -0
- package/extensions/enact-operator/skills/setup/scripts/install.sh +50 -0
- package/extensions/enact-operator/skills/skill/SKILL.md +82 -0
- package/extensions/enact-operator/skills/tdd/SKILL.md +59 -0
- package/extensions/enact-operator/skills/team/SKILL.md +199 -0
- package/extensions/enact-operator/skills/trace/SKILL.md +41 -0
- package/extensions/enact-operator/skills/ultragoal/SKILL.md +99 -0
- package/extensions/enact-operator/skills/ultraqa/SKILL.md +113 -0
- package/extensions/enact-operator/skills/ultrawork/SKILL.md +145 -0
- package/extensions/enact-operator/skills/ultrawork/planner.md +28 -0
- package/extensions/enact-operator/skills/wiki/SKILL.md +41 -0
- package/extensions/enact-operator/skills/work-with-workitem/SKILL.md +51 -0
- package/extensions/enact-wiki/.agents/plugin.json +42 -0
- package/extensions/enact-wiki/.mcp.json +15 -0
- package/extensions/enact-wiki/README.md +44 -0
- package/extensions/enact-wiki/assets/icon.png +0 -0
- package/extensions/enact-wiki/assets/logo.png +0 -0
- package/extensions/enact-wiki/skills/document-parser/SKILL.md +17 -0
- package/extensions/enact-wiki/skills/document-parser/scripts/parse.sh +60 -0
- package/extensions/enact-wiki/skills/document-parser/skill.json +9 -0
- package/extensions/enact-wiki/skills/enact-wiki/SKILL.md +30 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/ingest.md +62 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/manage.md +34 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/query.md +59 -0
- package/extensions/enact-wiki/skills/search-lab/SKILL.md +57 -0
- package/extensions/enact-wiki/skills/search-lab/scripts/analyze.ts +23 -0
- package/{plugins/net-revenue-management/.codex-plugin → extensions/net-revenue-management/.agents}/plugin.json +10 -6
- package/extensions/plugin-dev/.agents/plugin.json +42 -0
- package/extensions/plugin-dev/.mcp.json +3 -0
- package/extensions/plugin-dev/agents/agent-creator.md +199 -0
- package/extensions/plugin-dev/agents/plugin-validator.md +91 -0
- package/extensions/plugin-dev/agents/skill-reviewer.md +212 -0
- package/extensions/plugin-dev/commands/_archive/create-marketplace.md +427 -0
- package/extensions/plugin-dev/commands/_archive/plugin-dev-guide.md +12 -0
- package/extensions/plugin-dev/commands/create-plugin.md +498 -0
- package/extensions/plugin-dev/commands/start.md +81 -0
- package/extensions/plugin-dev/hooks/hooks.json +3 -0
- package/extensions/plugin-dev/skills/agent-development/SKILL.md +641 -0
- package/extensions/plugin-dev/skills/agent-development/examples/agent-creation-prompt.md +250 -0
- package/extensions/plugin-dev/skills/agent-development/examples/complete-agent-examples.md +461 -0
- package/extensions/plugin-dev/skills/agent-development/references/advanced-agent-fields.md +246 -0
- package/extensions/plugin-dev/skills/agent-development/references/agent-creation-system-prompt.md +216 -0
- package/extensions/plugin-dev/skills/agent-development/references/permission-modes-rules.md +226 -0
- package/extensions/plugin-dev/skills/agent-development/references/system-prompt-design.md +464 -0
- package/extensions/plugin-dev/skills/agent-development/references/triggering-examples.md +474 -0
- package/extensions/plugin-dev/skills/agent-development/scripts/create-agent-skeleton.sh +176 -0
- package/extensions/plugin-dev/skills/agent-development/scripts/test-agent-trigger.sh +227 -0
- package/extensions/plugin-dev/skills/agent-development/scripts/validate-agent.sh +227 -0
- package/extensions/plugin-dev/skills/command-development/SKILL.md +763 -0
- package/extensions/plugin-dev/skills/command-development/examples/plugin-commands.md +612 -0
- package/extensions/plugin-dev/skills/command-development/examples/simple-commands.md +527 -0
- package/extensions/plugin-dev/skills/command-development/references/advanced-workflows.md +762 -0
- package/extensions/plugin-dev/skills/command-development/references/documentation-patterns.md +769 -0
- package/extensions/plugin-dev/skills/command-development/references/frontmatter-reference.md +508 -0
- package/extensions/plugin-dev/skills/command-development/references/interactive-commands.md +966 -0
- package/extensions/plugin-dev/skills/command-development/references/marketplace-considerations.md +943 -0
- package/extensions/plugin-dev/skills/command-development/references/plugin-features-reference.md +637 -0
- package/extensions/plugin-dev/skills/command-development/references/plugin-integration.md +191 -0
- package/extensions/plugin-dev/skills/command-development/references/skill-tool.md +447 -0
- package/extensions/plugin-dev/skills/command-development/references/testing-strategies.md +723 -0
- package/extensions/plugin-dev/skills/command-development/scripts/check-frontmatter.sh +234 -0
- package/extensions/plugin-dev/skills/command-development/scripts/validate-command.sh +160 -0
- package/extensions/plugin-dev/skills/hook-development/SKILL.md +861 -0
- package/extensions/plugin-dev/skills/hook-development/examples/load-context.sh +55 -0
- package/extensions/plugin-dev/skills/hook-development/examples/validate-bash.sh +57 -0
- package/extensions/plugin-dev/skills/hook-development/examples/validate-write.sh +48 -0
- package/extensions/plugin-dev/skills/hook-development/references/advanced.md +871 -0
- package/extensions/plugin-dev/skills/hook-development/references/hook-input-schemas.md +145 -0
- package/extensions/plugin-dev/skills/hook-development/references/migration.md +392 -0
- package/extensions/plugin-dev/skills/hook-development/references/patterns.md +430 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/README.md +181 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/hook-linter.sh +153 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/test-hook.sh +276 -0
- package/extensions/plugin-dev/skills/hook-development/scripts/validate-hook-schema.sh +159 -0
- package/extensions/plugin-dev/skills/mcp-integration/SKILL.md +775 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/http-server.json +20 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/sse-server.json +19 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/stdio-server.json +38 -0
- package/extensions/plugin-dev/skills/mcp-integration/examples/ws-server.json +26 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/authentication.md +601 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/server-discovery.md +190 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/server-types.md +572 -0
- package/extensions/plugin-dev/skills/mcp-integration/references/tool-usage.md +623 -0
- package/extensions/plugin-dev/skills/plugin-dev-guide/SKILL.md +222 -0
- package/extensions/plugin-dev/skills/plugin-structure/SKILL.md +705 -0
- package/extensions/plugin-dev/skills/plugin-structure/examples/advanced-plugin.md +774 -0
- package/extensions/plugin-dev/skills/plugin-structure/examples/minimal-plugin.md +83 -0
- package/extensions/plugin-dev/skills/plugin-structure/examples/standard-plugin.md +611 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/advanced-topics.md +289 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/component-patterns.md +592 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/github-actions.md +233 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/headless-ci-mode.md +193 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/manifest-reference.md +625 -0
- package/extensions/plugin-dev/skills/plugin-structure/references/output-styles.md +116 -0
- package/extensions/plugin-dev/skills/skill-development/SKILL.md +564 -0
- package/extensions/plugin-dev/skills/skill-development/examples/complete-skill.md +465 -0
- package/extensions/plugin-dev/skills/skill-development/examples/frontmatter-templates.md +167 -0
- package/extensions/plugin-dev/skills/skill-development/examples/minimal-skill.md +111 -0
- package/extensions/plugin-dev/skills/skill-development/references/advanced-frontmatter.md +225 -0
- package/extensions/plugin-dev/skills/skill-development/references/commands-vs-skills.md +39 -0
- package/extensions/plugin-dev/skills/skill-development/references/skill-creation-workflow.md +379 -0
- package/extensions/plugin-dev/skills/skill-development/references/skill-creator-original.md +210 -0
- package/package.json +8 -11
- package/scripts/enact-extensions.mjs +823 -21
- package/scripts/hooks/session-start-drift-check.mjs +58 -0
- package/scripts/lib/build-index.mjs +50 -0
- package/scripts/lib/bundle-hash.mjs +137 -0
- package/scripts/lib/hooks.mjs +741 -0
- package/scripts/lib/ledger.mjs +163 -0
- package/scripts/lib/list-bundles.mjs +70 -0
- package/scripts/lib/outdated.mjs +144 -0
- package/scripts/lib/provision-mcp.mjs +16 -0
- package/scripts/lib/resolve-bundle.mjs +121 -0
- package/scripts/lib/run-install.mjs +402 -38
- package/scripts/lib/run-prune.mjs +73 -0
- package/scripts/lib/run-sync.mjs +9 -1
- package/scripts/lib/run-uninstall.mjs +244 -0
- package/scripts/lib/run-update.mjs +152 -0
- package/scripts/lib/run-validate.mjs +21 -18
- package/scripts/lib/serve.mjs +472 -0
- package/scripts/postinstall.mjs +63 -0
- package/scripts/setup-enact-context.sh +2 -2
- package/scripts/version-bump.sh +463 -0
- package/spec/codex.json +1 -11
- package/spec/index.json +59 -0
- package/web/assets/README.md +111 -0
- package/web/assets/logo-full.png +0 -0
- package/web/assets/logo-slim.png +0 -0
- package/web/assets/tokens/base.css +45 -0
- package/web/assets/tokens/colors.css +248 -0
- package/web/assets/tokens/effects.css +24 -0
- package/web/assets/tokens/fonts.css +8 -0
- package/web/assets/tokens/index.css +18 -0
- package/web/assets/tokens/spacing.css +50 -0
- package/web/index.html +1188 -0
- package/.agents/plugins/marketplace.json +0 -20
- package/catalog/enact-context.json +0 -9
- package/catalog/enact-factory.json +0 -7
- package/catalog/enact-operator.json +0 -7
- package/catalog/enact-wiki.json +0 -7
- package/catalog/net-revenue-management.json +0 -8
- package/scripts/rename-supervisor-to-operator.pl +0 -66
- package/scripts/sync-manifests.mjs +0 -23
- package/scripts/validate-catalog.mjs +0 -37
- package/scripts/validate-plugin.mjs +0 -10
- /package/{plugins → extensions}/net-revenue-management/.mcp.json +0 -0
- /package/{plugins → extensions}/net-revenue-management/skills/net-revenue-risks/SKILL.md +0 -0
- /package/{plugins → extensions}/net-revenue-management/skills/net-revenue-scenario/SKILL.md +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Output Styles Reference
|
|
2
|
+
|
|
3
|
+
Output styles customize how Claude formats and structures responses. They modify Claude's system prompt directly, providing persistent formatting instructions that apply throughout a conversation.
|
|
4
|
+
|
|
5
|
+
## How Output Styles Work
|
|
6
|
+
|
|
7
|
+
When an output style is active, its markdown content is injected into Claude's system prompt. This means output styles:
|
|
8
|
+
|
|
9
|
+
- Apply to all responses while active (not just specific tool calls)
|
|
10
|
+
- Can override default formatting behavior
|
|
11
|
+
- Are selected by the user (not automatically triggered like skills)
|
|
12
|
+
- Can coexist with CLAUDE.md instructions (style takes precedence for formatting)
|
|
13
|
+
|
|
14
|
+
## Frontmatter Schema
|
|
15
|
+
|
|
16
|
+
Output style files use YAML frontmatter:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
---
|
|
20
|
+
name: concise-reviewer
|
|
21
|
+
description: Terse code review output with minimal prose
|
|
22
|
+
keep-coding-instructions: true
|
|
23
|
+
---
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
| Field | Type | Required | Description |
|
|
27
|
+
| -------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| `name` | String | Yes | Display name shown in style selection |
|
|
29
|
+
| `description` | String | Yes | Brief explanation of what the style does |
|
|
30
|
+
| `keep-coding-instructions` | Boolean | No | When `true`, preserves Claude's default coding instructions alongside the style. When `false` (default), the style replaces default coding instructions entirely. |
|
|
31
|
+
|
|
32
|
+
**`keep-coding-instructions` guidance:**
|
|
33
|
+
|
|
34
|
+
- Set to `true` for styles that only modify output format (e.g., "use bullet points", "be more concise")
|
|
35
|
+
- Set to `false` (or omit) for styles that fundamentally change Claude's role (e.g., "act as a technical writer", "respond only with code")
|
|
36
|
+
|
|
37
|
+
## File Locations
|
|
38
|
+
|
|
39
|
+
Output styles can be defined at multiple levels:
|
|
40
|
+
|
|
41
|
+
| Level | Location | Scope |
|
|
42
|
+
| ------- | ---------------------------------------------- | -------------- |
|
|
43
|
+
| User | `~/.claude/output-styles/*.md` | All projects |
|
|
44
|
+
| Project | `.claude/output-styles/*.md` | Single project |
|
|
45
|
+
| Plugin | Referenced via `outputStyles` in `plugin.json` | Plugin users |
|
|
46
|
+
|
|
47
|
+
### Plugin Bundling
|
|
48
|
+
|
|
49
|
+
Plugins bundle output styles using the `outputStyles` field in `plugin.json`:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"outputStyles": "./styles/"
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Or with explicit paths:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"outputStyles": ["./styles/concise.md", "./styles/detailed.md"]
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Style files in the referenced path are discovered and registered when the plugin loads. Users can then select them from the output style picker.
|
|
66
|
+
|
|
67
|
+
## Built-in Styles
|
|
68
|
+
|
|
69
|
+
Claude Code includes built-in output styles that users can select. Plugin-provided styles appear alongside built-in styles in the style selection interface.
|
|
70
|
+
|
|
71
|
+
## When to Use Output Styles vs Other Components
|
|
72
|
+
|
|
73
|
+
| Component | Best For | Persistence |
|
|
74
|
+
| ----------------- | --------------------------------------- | ------------------------------ |
|
|
75
|
+
| **Output styles** | Response formatting, tone, structure | Active until user switches |
|
|
76
|
+
| **Skills** | Domain knowledge, workflows, procedures | Active during skill invocation |
|
|
77
|
+
| **Agents** | Autonomous multi-step tasks | Active during agent run |
|
|
78
|
+
| **CLAUDE.md** | Project context, coding standards | Always loaded |
|
|
79
|
+
|
|
80
|
+
**Use output styles when:**
|
|
81
|
+
|
|
82
|
+
- You want to change how Claude formats all responses (not just during a specific task)
|
|
83
|
+
- The formatting applies regardless of what task Claude is performing
|
|
84
|
+
- Users should be able to toggle the behavior on/off
|
|
85
|
+
|
|
86
|
+
**Don't use output styles when:**
|
|
87
|
+
|
|
88
|
+
- The behavior only applies during specific operations (use a skill instead)
|
|
89
|
+
- You need tool restrictions or scoped hooks (use an agent)
|
|
90
|
+
- The instructions are project-specific standards (use CLAUDE.md)
|
|
91
|
+
|
|
92
|
+
## Example: Complete Output Style
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
---
|
|
96
|
+
name: concise-code-review
|
|
97
|
+
description: Minimal code review output focused on actionable findings
|
|
98
|
+
keep-coding-instructions: true
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
When reviewing code:
|
|
102
|
+
|
|
103
|
+
- List only actionable findings
|
|
104
|
+
- Use severity labels: [critical], [warning], [nit]
|
|
105
|
+
- No praise or filler text
|
|
106
|
+
- One line per finding with file:line reference
|
|
107
|
+
- Group by severity, highest first
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Plugin Developer Tips
|
|
111
|
+
|
|
112
|
+
- Keep styles focused on a single formatting concern
|
|
113
|
+
- Use descriptive names that clearly indicate the style's effect
|
|
114
|
+
- Set `keep-coding-instructions: true` unless your style intentionally replaces coding behavior
|
|
115
|
+
- Test styles with various task types to ensure they don't interfere with tool use
|
|
116
|
+
- Document available styles in your plugin README
|
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-development
|
|
3
|
+
description: This skill should be used when the user asks to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", "SKILL.md format", "skill frontmatter", "skill triggers", "trigger phrases for skills", "progressive disclosure", "skill references folder", "skill examples folder", "validate skill", "skill model field", "skill hooks", "scoped hooks in skill", "visibility budget", "context budget", "SLASH_COMMAND_TOOL_CHAR_BUDGET", "skill permissions", "Skill() syntax", "visual output", or needs guidance on skill structure, file organization, writing style, or skill development best practices for Claude Code plugins.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Development for Claude Code Plugins
|
|
7
|
+
|
|
8
|
+
This skill provides guidance for creating effective skills for Claude Code plugins.
|
|
9
|
+
|
|
10
|
+
## About Skills
|
|
11
|
+
|
|
12
|
+
Skills are modular, self-contained packages that extend Claude's capabilities by providing
|
|
13
|
+
specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
|
|
14
|
+
domains or tasks—they transform Claude from a general-purpose agent into a specialized agent
|
|
15
|
+
equipped with procedural knowledge that no model can fully possess.
|
|
16
|
+
|
|
17
|
+
### Skill Precedence
|
|
18
|
+
|
|
19
|
+
When multiple skills share the same name, precedence determines which loads:
|
|
20
|
+
|
|
21
|
+
1. Enterprise (managed settings) — highest priority
|
|
22
|
+
2. Personal (`~/.claude/skills/`)
|
|
23
|
+
3. Project (`.claude/skills/`)
|
|
24
|
+
4. Plugin skills — lowest priority
|
|
25
|
+
|
|
26
|
+
Plugin developers should use distinctive, ideally namespaced names (the plugin system auto-namespaces as `plugin-name:skill-name`) to avoid collisions with user or project skills.
|
|
27
|
+
|
|
28
|
+
### Skills and Commands: Unified Mechanism
|
|
29
|
+
|
|
30
|
+
Skills and commands share the same underlying mechanism (Skill tool). The choice depends on complexity needs:
|
|
31
|
+
|
|
32
|
+
- **Use commands** (`commands/foo.md`): Simple prompts without bundled resources
|
|
33
|
+
- **Use skills** (`skills/foo/SKILL.md`): Complex workflows needing scripts, references, or examples
|
|
34
|
+
|
|
35
|
+
Both support `$ARGUMENTS`, `[BANG]` bash execution, and frontmatter fields. Skills add bundled resources and progressive disclosure.
|
|
36
|
+
|
|
37
|
+
### What Skills Provide
|
|
38
|
+
|
|
39
|
+
1. Specialized workflows - Multi-step procedures for specific domains
|
|
40
|
+
2. Tool integrations - Instructions for working with specific file formats or APIs
|
|
41
|
+
3. Domain expertise - Company-specific knowledge, schemas, business logic
|
|
42
|
+
4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
|
|
43
|
+
5. Visual output generation - Scripts that produce HTML/interactive visualizations
|
|
44
|
+
|
|
45
|
+
### Anatomy of a Skill
|
|
46
|
+
|
|
47
|
+
Every skill consists of a required SKILL.md file and optional bundled resources:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
skill-name/
|
|
51
|
+
├── SKILL.md (required)
|
|
52
|
+
│ ├── YAML frontmatter metadata (required)
|
|
53
|
+
│ │ ├── name: (required)
|
|
54
|
+
│ │ └── description: (required)
|
|
55
|
+
│ └── Markdown instructions (required)
|
|
56
|
+
└── Bundled Resources (optional)
|
|
57
|
+
├── scripts/ - Executable code (Python/Bash/etc.)
|
|
58
|
+
├── references/ - Documentation intended to be loaded into context as needed
|
|
59
|
+
└── assets/ - Files used in output (templates, icons, fonts, etc.)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### SKILL.md (required)
|
|
63
|
+
|
|
64
|
+
**Metadata Quality:** The `name` and `description` in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
|
|
65
|
+
|
|
66
|
+
#### Optional Frontmatter Fields
|
|
67
|
+
|
|
68
|
+
##### allowed-tools
|
|
69
|
+
|
|
70
|
+
Optionally restrict which tools Claude can use when the skill is active:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
---
|
|
74
|
+
name: code-reviewer
|
|
75
|
+
description: Review code for best practices...
|
|
76
|
+
allowed-tools: Read, Grep, Glob
|
|
77
|
+
---
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Use `allowed-tools` for:
|
|
81
|
+
|
|
82
|
+
- Read-only skills that shouldn't modify files
|
|
83
|
+
- Security-sensitive workflows
|
|
84
|
+
- Skills with limited scope
|
|
85
|
+
|
|
86
|
+
When specified, Claude can only use the listed tools without needing permission. If omitted, Claude follows the standard permission model.
|
|
87
|
+
|
|
88
|
+
##### context
|
|
89
|
+
|
|
90
|
+
Control how the skill's context is loaded:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
---
|
|
94
|
+
name: analysis-skill
|
|
95
|
+
description: Perform deep code analysis...
|
|
96
|
+
context: fork
|
|
97
|
+
---
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Values:**
|
|
101
|
+
|
|
102
|
+
- `fork` - Run skill in a subagent (separate context), preserving main agent's context
|
|
103
|
+
- Not specified - Run in main agent's context (default)
|
|
104
|
+
|
|
105
|
+
Use `context: fork` for:
|
|
106
|
+
|
|
107
|
+
- Skills that load large reference files
|
|
108
|
+
- Skills that might pollute the main context
|
|
109
|
+
- Expensive operations you want isolated
|
|
110
|
+
|
|
111
|
+
##### agent
|
|
112
|
+
|
|
113
|
+
Specify which agent type handles the skill when `context: fork` is set:
|
|
114
|
+
|
|
115
|
+
```yaml
|
|
116
|
+
---
|
|
117
|
+
name: exploration-skill
|
|
118
|
+
description: Explore codebase patterns...
|
|
119
|
+
context: fork
|
|
120
|
+
agent: Explore
|
|
121
|
+
---
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Values:**
|
|
125
|
+
|
|
126
|
+
- `Explore` - Fast agent for codebase exploration
|
|
127
|
+
- `Plan` - Architect agent for implementation planning
|
|
128
|
+
- `general` - General-purpose agent (default if `context: fork`)
|
|
129
|
+
|
|
130
|
+
Requires `context: fork` to be set.
|
|
131
|
+
|
|
132
|
+
##### skills
|
|
133
|
+
|
|
134
|
+
Load other skills into the forked agent's context:
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
---
|
|
138
|
+
name: comprehensive-review
|
|
139
|
+
description: Full code review with testing...
|
|
140
|
+
context: fork
|
|
141
|
+
agent: general
|
|
142
|
+
skills:
|
|
143
|
+
- testing-patterns
|
|
144
|
+
- security-audit
|
|
145
|
+
---
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Requires `context: fork` to be set. Only skills from the same plugin can be loaded.
|
|
149
|
+
|
|
150
|
+
##### user-invocable
|
|
151
|
+
|
|
152
|
+
Control whether the skill appears in the slash command menu:
|
|
153
|
+
|
|
154
|
+
```yaml
|
|
155
|
+
---
|
|
156
|
+
name: internal-review-standards
|
|
157
|
+
description: Apply internal code review standards...
|
|
158
|
+
user-invocable: false
|
|
159
|
+
---
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Default:** `true` (skills are visible in the `/` menu)
|
|
163
|
+
|
|
164
|
+
**Important:** This field only controls slash menu visibility. It does NOT affect:
|
|
165
|
+
|
|
166
|
+
- **Skill tool access** - Claude can still invoke the skill programmatically
|
|
167
|
+
- **Auto-discovery** - Claude still discovers and uses the skill based on context
|
|
168
|
+
|
|
169
|
+
Use `user-invocable: false` for skills that Claude should use automatically but users shouldn't invoke directly.
|
|
170
|
+
|
|
171
|
+
##### disable-model-invocation
|
|
172
|
+
|
|
173
|
+
Prevent Claude from programmatically invoking the skill via the Skill tool:
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
---
|
|
177
|
+
name: dangerous-operation
|
|
178
|
+
description: Perform dangerous operation...
|
|
179
|
+
disable-model-invocation: true
|
|
180
|
+
---
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Default:** `false` (programmatic invocation allowed)
|
|
184
|
+
|
|
185
|
+
Use for skills that should only be manually invoked by users, such as:
|
|
186
|
+
|
|
187
|
+
- Destructive operations requiring human judgment
|
|
188
|
+
- Interactive workflows needing user input
|
|
189
|
+
- Approval processes
|
|
190
|
+
|
|
191
|
+
**Visibility comparison:**
|
|
192
|
+
|
|
193
|
+
| Setting | Slash Menu | Skill Tool | Auto-Discovery |
|
|
194
|
+
| -------------------------------- | ---------- | ---------- | -------------- |
|
|
195
|
+
| `user-invocable: true` (default) | Visible | Allowed | Yes |
|
|
196
|
+
| `user-invocable: false` | Hidden | Allowed | Yes |
|
|
197
|
+
| `disable-model-invocation: true` | Visible | Blocked | Yes |
|
|
198
|
+
|
|
199
|
+
##### model
|
|
200
|
+
|
|
201
|
+
Override which model handles the skill:
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
---
|
|
205
|
+
name: quick-lint
|
|
206
|
+
description: Fast code linting checks...
|
|
207
|
+
model: haiku
|
|
208
|
+
---
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Values:** `sonnet`, `opus`, `haiku`, `inherit` (default), or a full model ID (e.g., `claude-sonnet-4-5-20250929`)
|
|
212
|
+
|
|
213
|
+
Use `haiku` for fast/cheap skills, `opus` for complex reasoning requiring maximum capability. Default behavior (`inherit`) uses the conversation's current model.
|
|
214
|
+
|
|
215
|
+
See `references/advanced-frontmatter.md` for detailed guidance on model selection.
|
|
216
|
+
|
|
217
|
+
##### hooks
|
|
218
|
+
|
|
219
|
+
Define scoped hooks that activate only when this skill is in use:
|
|
220
|
+
|
|
221
|
+
```yaml
|
|
222
|
+
---
|
|
223
|
+
name: secure-writer
|
|
224
|
+
description: Write files with validation...
|
|
225
|
+
hooks:
|
|
226
|
+
PreToolUse:
|
|
227
|
+
- matcher: Write
|
|
228
|
+
hooks:
|
|
229
|
+
- type: command
|
|
230
|
+
command: "${CLAUDE_PLUGIN_ROOT}/scripts/validate-write.sh"
|
|
231
|
+
---
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Scoped hooks follow the same event/matcher/hook structure as `hooks.json` but are lifecycle-bound to the skill. Supported events: `PreToolUse`, `PostToolUse`, `Stop`.
|
|
235
|
+
|
|
236
|
+
See `references/advanced-frontmatter.md` for full syntax and comparison with `hooks.json`.
|
|
237
|
+
|
|
238
|
+
##### argument-hint
|
|
239
|
+
|
|
240
|
+
Provides autocomplete hint text shown in the `/` menu for the skill's expected arguments:
|
|
241
|
+
|
|
242
|
+
```yaml
|
|
243
|
+
---
|
|
244
|
+
argument-hint: "<file-path> [--verbose]"
|
|
245
|
+
---
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Purely cosmetic — helps users understand what arguments the skill expects. Does not affect argument parsing.
|
|
249
|
+
|
|
250
|
+
#### Bundled Resources (optional)
|
|
251
|
+
|
|
252
|
+
##### Scripts (`scripts/`)
|
|
253
|
+
|
|
254
|
+
Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
|
|
255
|
+
|
|
256
|
+
- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed
|
|
257
|
+
- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks
|
|
258
|
+
- **Benefits**: Token efficient, deterministic, may be executed without loading into context
|
|
259
|
+
|
|
260
|
+
##### References (`references/`)
|
|
261
|
+
|
|
262
|
+
Documentation and reference material intended to be loaded as needed into context.
|
|
263
|
+
|
|
264
|
+
- **When to include**: For documentation that Claude should reference while working
|
|
265
|
+
- **Examples**: `references/schema.md` for database schemas, `references/api_docs.md` for API specifications
|
|
266
|
+
- **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md
|
|
267
|
+
- **Avoid duplication**: Information should live in either SKILL.md or references files, not both
|
|
268
|
+
|
|
269
|
+
##### Assets (`assets/`)
|
|
270
|
+
|
|
271
|
+
Files not intended to be loaded into context, but rather used within the output Claude produces.
|
|
272
|
+
|
|
273
|
+
- **When to include**: When the skill needs files that will be used in the final output
|
|
274
|
+
- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for templates
|
|
275
|
+
|
|
276
|
+
### Dynamic Content in Skills
|
|
277
|
+
|
|
278
|
+
Skills support dynamic content injection and variable substitution for context-aware behavior.
|
|
279
|
+
|
|
280
|
+
#### String Substitutions
|
|
281
|
+
|
|
282
|
+
Use variables in skill content that get replaced at runtime:
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
The session ID is: ${CLAUDE_SESSION_ID}
|
|
286
|
+
Arguments passed: $ARGUMENTS
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Available substitutions:**
|
|
290
|
+
|
|
291
|
+
- `$ARGUMENTS` - Arguments passed when skill is invoked (e.g., `/skill-name arg1 arg2`)
|
|
292
|
+
- `$ARGUMENTS[0]`, `$ARGUMENTS[1]`, etc. - Individual positional arguments (zero-indexed). `$ARGUMENTS[0]` is the first argument after the skill name.
|
|
293
|
+
- `$1`, `$2`, `$3`, etc. - 1-indexed shorthand for positional arguments. `$1` is equivalent to `$ARGUMENTS[0]`, `$2` to `$ARGUMENTS[1]`, etc.
|
|
294
|
+
- `${CLAUDE_SESSION_ID}` - Current session identifier
|
|
295
|
+
- `${CLAUDE_PLUGIN_ROOT}` - Plugin directory path
|
|
296
|
+
|
|
297
|
+
#### Dynamic Context Injection
|
|
298
|
+
|
|
299
|
+
Execute commands to inject their output into skill context using backtick syntax:
|
|
300
|
+
|
|
301
|
+
```markdown
|
|
302
|
+
## Current Project Status
|
|
303
|
+
|
|
304
|
+
The git status is:
|
|
305
|
+
[BANG]`git status --short`
|
|
306
|
+
|
|
307
|
+
Recent commits:
|
|
308
|
+
[BANG]`git log --oneline -5`
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**Syntax:** `` [BANG]`command` ``
|
|
312
|
+
|
|
313
|
+
**Use cases:**
|
|
314
|
+
|
|
315
|
+
- Load current project state (git status, package.json)
|
|
316
|
+
- Include dynamic configuration
|
|
317
|
+
- Fetch environment-specific information
|
|
318
|
+
|
|
319
|
+
**Security note:** Commands execute in the user's environment. Only use trusted commands.
|
|
320
|
+
|
|
321
|
+
### Progressive Disclosure Design Principle
|
|
322
|
+
|
|
323
|
+
Skills use a three-level loading system to manage context efficiently:
|
|
324
|
+
|
|
325
|
+
1. **Metadata (name + description)** - Always in context (~100 words)
|
|
326
|
+
2. **SKILL.md body** - When skill triggers (<5k words)
|
|
327
|
+
3. **Bundled resources** - As needed by Claude (Unlimited\*)
|
|
328
|
+
|
|
329
|
+
\*Unlimited because scripts can be executed without reading into context window.
|
|
330
|
+
|
|
331
|
+
**Visibility budget:** Claude Code allocates approximately 2% of the context window (or ~16KB fallback) for skill descriptions via `SLASH_COMMAND_TOOL_CHAR_BUDGET`. When total description text across all installed skills exceeds this budget, some skills may be excluded from auto-discovery. Keep descriptions concise and move detail into the SKILL.md body and references. See `references/advanced-frontmatter.md` for optimization guidance.
|
|
332
|
+
|
|
333
|
+
### Context Management for Plugins
|
|
334
|
+
|
|
335
|
+
Skills should be designed for re-discoverability after auto-compaction. When Claude's context approaches its limit, older messages are automatically compressed. After compaction:
|
|
336
|
+
|
|
337
|
+
- **Descriptions survive**: Skill descriptions remain available (they're tool definitions, not conversation content)
|
|
338
|
+
- **Skill body is lost**: The full SKILL.md content from a previous invocation may be compacted away
|
|
339
|
+
- **Re-triggering works**: Users can invoke the skill again to reload its content
|
|
340
|
+
|
|
341
|
+
**`PreCompact` hook**: Plugins can use a `PreCompact` hook to preserve critical information before compaction occurs. Use this to save state that would otherwise be lost.
|
|
342
|
+
|
|
343
|
+
**Cross-plugin budget**: Skill descriptions from ALL installed plugins compete for the same visibility budget. Write concise, keyword-rich descriptions to maximize discoverability without consuming excessive space.
|
|
344
|
+
|
|
345
|
+
## Skill Creation Process
|
|
346
|
+
|
|
347
|
+
To create a skill, follow these six steps. For detailed instructions on each step, see `references/skill-creation-workflow.md`.
|
|
348
|
+
|
|
349
|
+
1. **Understand the Skill**: Gather concrete examples of how the skill will be used through user questions and feedback
|
|
350
|
+
2. **Plan Reusable Contents**: Analyze examples to identify what scripts, references, and assets would be helpful
|
|
351
|
+
3. **Create Structure**: Set up the skill directory with `mkdir -p skills/skill-name/{references,examples,scripts}`
|
|
352
|
+
4. **Edit the Skill**: Write SKILL.md with proper frontmatter and imperative-form body; create bundled resources
|
|
353
|
+
5. **Validate and Test**: Check structure, trigger phrases, writing style, and progressive disclosure
|
|
354
|
+
6. **Iterate**: Improve based on real-world usage and feedback
|
|
355
|
+
|
|
356
|
+
### Key Writing Guidelines
|
|
357
|
+
|
|
358
|
+
- **Description**: Use third-person ("This skill should be used when...") with specific trigger phrases
|
|
359
|
+
- **Body**: Use imperative/infinitive form ("To create X, do Y"), not second person ("You should...")
|
|
360
|
+
- **Size**: Target 1,500-2,000 words; move detailed content to references/
|
|
361
|
+
|
|
362
|
+
## Plugin-Specific Considerations
|
|
363
|
+
|
|
364
|
+
### Skill Location in Plugins
|
|
365
|
+
|
|
366
|
+
Plugin skills live in the plugin's `skills/` directory:
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
my-plugin/
|
|
370
|
+
├── .claude-plugin/
|
|
371
|
+
│ └── plugin.json
|
|
372
|
+
├── commands/
|
|
373
|
+
├── agents/
|
|
374
|
+
└── skills/
|
|
375
|
+
└── my-skill/
|
|
376
|
+
├── SKILL.md
|
|
377
|
+
├── references/
|
|
378
|
+
├── examples/
|
|
379
|
+
└── scripts/
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Auto-Discovery
|
|
383
|
+
|
|
384
|
+
Claude Code automatically discovers skills:
|
|
385
|
+
|
|
386
|
+
- Scans `skills/` directory
|
|
387
|
+
- Finds subdirectories containing `SKILL.md`
|
|
388
|
+
- Loads skill metadata (name + description) always
|
|
389
|
+
- Loads SKILL.md body when skill triggers
|
|
390
|
+
- Loads references/examples when needed
|
|
391
|
+
|
|
392
|
+
### No Packaging Needed
|
|
393
|
+
|
|
394
|
+
Plugin skills are distributed as part of the plugin, not as separate ZIP files. Users get skills when they install the plugin.
|
|
395
|
+
|
|
396
|
+
### Testing in Plugins
|
|
397
|
+
|
|
398
|
+
Test skills by installing plugin locally:
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
# Test with --plugin-dir
|
|
402
|
+
claude --plugin-dir /path/to/plugin
|
|
403
|
+
|
|
404
|
+
# Ask questions that should trigger the skill
|
|
405
|
+
# Verify skill loads correctly
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
## Examples from Plugin-Dev
|
|
409
|
+
|
|
410
|
+
Study the skills in this plugin as examples of best practices:
|
|
411
|
+
|
|
412
|
+
**hook-development skill:**
|
|
413
|
+
|
|
414
|
+
- Excellent trigger phrases: "create a hook", "add a PreToolUse hook", etc.
|
|
415
|
+
- Lean SKILL.md (2,125 words)
|
|
416
|
+
- 3 references/ files for detailed content
|
|
417
|
+
- 3 examples/ of working hooks
|
|
418
|
+
- 3 scripts/ utilities
|
|
419
|
+
|
|
420
|
+
**agent-development skill:**
|
|
421
|
+
|
|
422
|
+
- Strong triggers: "create an agent", "agent frontmatter", etc.
|
|
423
|
+
- Focused SKILL.md (1,896 words)
|
|
424
|
+
- References include the AI generation prompt from Claude Code
|
|
425
|
+
- Complete agent examples
|
|
426
|
+
|
|
427
|
+
**plugin-settings skill:**
|
|
428
|
+
|
|
429
|
+
- Specific triggers: "plugin settings", ".local.md files", "YAML frontmatter"
|
|
430
|
+
- References show real implementations (multi-agent-swarm, ralph-wiggum)
|
|
431
|
+
- Working parsing scripts
|
|
432
|
+
|
|
433
|
+
Each demonstrates progressive disclosure and strong triggering.
|
|
434
|
+
|
|
435
|
+
## Validation Checklist
|
|
436
|
+
|
|
437
|
+
Before finalizing a skill:
|
|
438
|
+
|
|
439
|
+
**Structure:**
|
|
440
|
+
|
|
441
|
+
- [ ] SKILL.md file exists with valid YAML frontmatter
|
|
442
|
+
- [ ] Frontmatter has `name` and `description` fields
|
|
443
|
+
- [ ] Name uses only lowercase letters, numbers, and hyphens (max 64 chars)
|
|
444
|
+
- [ ] Description is under 1024 characters
|
|
445
|
+
- [ ] (Optional) `allowed-tools` field if restricting tool access
|
|
446
|
+
- [ ] (Optional) `context: fork` if running in subagent
|
|
447
|
+
- [ ] (Optional) `agent` field if specifying agent type (requires `context: fork`)
|
|
448
|
+
- [ ] (Optional) `skills` array if loading other skills (requires `context: fork`)
|
|
449
|
+
- [ ] (Optional) `user-invocable` field if hiding from slash menu
|
|
450
|
+
- [ ] (Optional) `disable-model-invocation` field if blocking programmatic use
|
|
451
|
+
- [ ] (Optional) `model` field if overriding model (`sonnet`/`opus`/`haiku`/`inherit`)
|
|
452
|
+
- [ ] (Optional) `hooks` field for scoped hooks (same format as `hooks.json`)
|
|
453
|
+
- [ ] (Optional) `argument-hint` field for autocomplete hints
|
|
454
|
+
- [ ] Markdown body is present and substantial
|
|
455
|
+
- [ ] Referenced files actually exist
|
|
456
|
+
|
|
457
|
+
**Description Quality:**
|
|
458
|
+
|
|
459
|
+
- [ ] Uses third person ("This skill should be used when...")
|
|
460
|
+
- [ ] Includes specific trigger phrases users would say
|
|
461
|
+
- [ ] Lists concrete scenarios ("create X", "configure Y")
|
|
462
|
+
|
|
463
|
+
**Content Quality:**
|
|
464
|
+
|
|
465
|
+
- [ ] SKILL.md body uses imperative/infinitive form
|
|
466
|
+
- [ ] Body is focused and lean (1,500-2,000 words ideal, <3k max)
|
|
467
|
+
- [ ] Detailed content moved to references/
|
|
468
|
+
- [ ] Examples are complete and working
|
|
469
|
+
|
|
470
|
+
**Testing:**
|
|
471
|
+
|
|
472
|
+
- [ ] Skill triggers on expected user queries
|
|
473
|
+
- [ ] Content is helpful for intended tasks
|
|
474
|
+
- [ ] No duplicated information across files
|
|
475
|
+
|
|
476
|
+
## Quick Reference
|
|
477
|
+
|
|
478
|
+
### Minimal Skill
|
|
479
|
+
|
|
480
|
+
```
|
|
481
|
+
skill-name/
|
|
482
|
+
└── SKILL.md
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
Good for: Simple knowledge, no complex resources needed
|
|
486
|
+
|
|
487
|
+
### Standard Skill (Recommended)
|
|
488
|
+
|
|
489
|
+
```
|
|
490
|
+
skill-name/
|
|
491
|
+
├── SKILL.md
|
|
492
|
+
├── references/
|
|
493
|
+
│ └── detailed-guide.md
|
|
494
|
+
└── examples/
|
|
495
|
+
└── working-example.sh
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Good for: Most plugin skills with detailed documentation
|
|
499
|
+
|
|
500
|
+
### Complete Skill
|
|
501
|
+
|
|
502
|
+
```
|
|
503
|
+
skill-name/
|
|
504
|
+
├── SKILL.md
|
|
505
|
+
├── references/
|
|
506
|
+
│ ├── patterns.md
|
|
507
|
+
│ └── advanced.md
|
|
508
|
+
├── examples/
|
|
509
|
+
│ ├── example1.sh
|
|
510
|
+
│ └── example2.json
|
|
511
|
+
└── scripts/
|
|
512
|
+
└── validate.sh
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
Good for: Complex domains with validation utilities
|
|
516
|
+
|
|
517
|
+
## Best Practices Summary
|
|
518
|
+
|
|
519
|
+
**DO:**
|
|
520
|
+
|
|
521
|
+
- Use third-person in description ("This skill should be used when...")
|
|
522
|
+
- Include specific trigger phrases ("create X", "configure Y")
|
|
523
|
+
- Keep SKILL.md lean (1,500-2,000 words)
|
|
524
|
+
- Use progressive disclosure (move details to references/)
|
|
525
|
+
- Write in imperative/infinitive form
|
|
526
|
+
- Reference supporting files clearly
|
|
527
|
+
- Provide working examples
|
|
528
|
+
- Create utility scripts for common operations
|
|
529
|
+
|
|
530
|
+
**DON'T:**
|
|
531
|
+
|
|
532
|
+
- Use second person ("You should...")
|
|
533
|
+
- Have vague trigger conditions
|
|
534
|
+
- Put everything in SKILL.md (>3,000 words without references/)
|
|
535
|
+
- Leave resources unreferenced
|
|
536
|
+
- Include broken or incomplete examples
|
|
537
|
+
|
|
538
|
+
## Additional Resources
|
|
539
|
+
|
|
540
|
+
### Example Skills
|
|
541
|
+
|
|
542
|
+
Copy-paste ready skill templates in `examples/`:
|
|
543
|
+
|
|
544
|
+
- **`examples/minimal-skill.md`** - Bare-bones skill with just SKILL.md (git conventions example)
|
|
545
|
+
- **`examples/complete-skill.md`** - Full skill with references/, examples/, and scripts/ (API testing example)
|
|
546
|
+
- **`examples/frontmatter-templates.md`** - Quick-reference frontmatter patterns for common use cases
|
|
547
|
+
|
|
548
|
+
### Reference Files
|
|
549
|
+
|
|
550
|
+
For detailed guidance, consult:
|
|
551
|
+
|
|
552
|
+
- **`references/skill-creation-workflow.md`** - Plugin-specific skill creation workflow (recommended for plugin skills)
|
|
553
|
+
- **`references/skill-creator-original.md`** - Original generic skill-creator methodology (includes init/packaging scripts for standalone skills)
|
|
554
|
+
|
|
555
|
+
### Study These Skills
|
|
556
|
+
|
|
557
|
+
Plugin-dev's skills demonstrate best practices:
|
|
558
|
+
|
|
559
|
+
- `../hook-development/` - Progressive disclosure, utilities
|
|
560
|
+
- `../agent-development/` - AI-assisted creation, references
|
|
561
|
+
- `../mcp-integration/` - Comprehensive references
|
|
562
|
+
- `../plugin-settings/` - Real-world examples
|
|
563
|
+
- `../command-development/` - Clear critical concepts
|
|
564
|
+
- `../plugin-structure/` - Good organization
|