@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,191 @@
|
|
|
1
|
+
# Plugin Integration Patterns
|
|
2
|
+
|
|
3
|
+
Commands can integrate with other plugin components for powerful workflows.
|
|
4
|
+
|
|
5
|
+
## Agent Integration
|
|
6
|
+
|
|
7
|
+
Launch plugin agents for complex tasks:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
description: Deep code review
|
|
12
|
+
argument-hint: [file-path]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Initiate comprehensive review of @$1 using the code-reviewer agent.
|
|
16
|
+
|
|
17
|
+
The agent will analyze:
|
|
18
|
+
|
|
19
|
+
- Code structure
|
|
20
|
+
- Security issues
|
|
21
|
+
- Performance
|
|
22
|
+
- Best practices
|
|
23
|
+
|
|
24
|
+
Agent uses plugin resources:
|
|
25
|
+
|
|
26
|
+
- ${CLAUDE_PLUGIN_ROOT}/config/rules.json
|
|
27
|
+
- ${CLAUDE_PLUGIN_ROOT}/checklists/review.md
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Key points:**
|
|
31
|
+
|
|
32
|
+
- Agent must exist in `plugin/agents/` directory
|
|
33
|
+
- Claude uses Task tool to launch agent
|
|
34
|
+
- Document agent capabilities
|
|
35
|
+
- Reference plugin resources agent uses
|
|
36
|
+
|
|
37
|
+
## Skill Integration
|
|
38
|
+
|
|
39
|
+
Leverage plugin skills for specialized knowledge:
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
---
|
|
43
|
+
description: Document API with standards
|
|
44
|
+
argument-hint: [api-file]
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
Document API in @$1 following plugin standards.
|
|
48
|
+
|
|
49
|
+
Use the api-docs-standards skill to ensure:
|
|
50
|
+
|
|
51
|
+
- Complete endpoint documentation
|
|
52
|
+
- Consistent formatting
|
|
53
|
+
- Example quality
|
|
54
|
+
- Error documentation
|
|
55
|
+
|
|
56
|
+
Generate production-ready API docs.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Key points:**
|
|
60
|
+
|
|
61
|
+
- Skill must exist in `plugin/skills/` directory
|
|
62
|
+
- Mention skill name to trigger invocation
|
|
63
|
+
- Document skill purpose
|
|
64
|
+
- Explain what skill provides
|
|
65
|
+
|
|
66
|
+
## Hook Coordination
|
|
67
|
+
|
|
68
|
+
Design commands that work with plugin hooks:
|
|
69
|
+
|
|
70
|
+
- Commands can prepare state for hooks to process
|
|
71
|
+
- Hooks execute automatically on tool events
|
|
72
|
+
- Commands should document expected hook behavior
|
|
73
|
+
- Guide Claude on interpreting hook output
|
|
74
|
+
|
|
75
|
+
See `plugin-features-reference.md` for examples of commands that coordinate with hooks.
|
|
76
|
+
|
|
77
|
+
## Multi-Component Workflows
|
|
78
|
+
|
|
79
|
+
Combine agents, skills, and scripts:
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
---
|
|
83
|
+
description: Comprehensive review workflow
|
|
84
|
+
argument-hint: [file]
|
|
85
|
+
allowed-tools: Bash(node:*), Read
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
Target: @$1
|
|
89
|
+
|
|
90
|
+
Phase 1 - Static Analysis:
|
|
91
|
+
`node ${CLAUDE_PLUGIN_ROOT}/scripts/lint.js $1`
|
|
92
|
+
|
|
93
|
+
Phase 2 - Deep Review:
|
|
94
|
+
Launch code-reviewer agent for detailed analysis.
|
|
95
|
+
|
|
96
|
+
Phase 3 - Standards Check:
|
|
97
|
+
Use coding-standards skill for validation.
|
|
98
|
+
|
|
99
|
+
Phase 4 - Report:
|
|
100
|
+
Template: @${CLAUDE_PLUGIN_ROOT}/templates/review.md
|
|
101
|
+
|
|
102
|
+
Compile findings into report following template.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**When to use:**
|
|
106
|
+
|
|
107
|
+
- Complex multi-step workflows
|
|
108
|
+
- Leverage multiple plugin capabilities
|
|
109
|
+
- Require specialized analysis
|
|
110
|
+
- Need structured outputs
|
|
111
|
+
|
|
112
|
+
## Validation Patterns
|
|
113
|
+
|
|
114
|
+
Commands should validate inputs and resources before processing.
|
|
115
|
+
|
|
116
|
+
### Argument Validation
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
---
|
|
120
|
+
description: Deploy with validation
|
|
121
|
+
argument-hint: [environment]
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
Validate environment: `echo "$1" | grep -E "^(dev|staging|prod)$" || echo "INVALID"`
|
|
125
|
+
|
|
126
|
+
If $1 is valid environment:
|
|
127
|
+
Deploy to $1
|
|
128
|
+
Otherwise:
|
|
129
|
+
Explain valid environments: dev, staging, prod
|
|
130
|
+
Show usage: /deploy [environment]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### File Existence Checks
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
---
|
|
137
|
+
description: Process configuration
|
|
138
|
+
argument-hint: [config-file]
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
Check file exists: `test -f $1 && echo "EXISTS" || echo "MISSING"`
|
|
142
|
+
|
|
143
|
+
If file exists:
|
|
144
|
+
Process configuration: @$1
|
|
145
|
+
Otherwise:
|
|
146
|
+
Explain where to place config file
|
|
147
|
+
Show expected format
|
|
148
|
+
Provide example configuration
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Plugin Resource Validation
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
---
|
|
155
|
+
description: Run plugin analyzer
|
|
156
|
+
allowed-tools: Bash(test:*)
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
Validate plugin setup:
|
|
160
|
+
|
|
161
|
+
- Script: `test -x ${CLAUDE_PLUGIN_ROOT}/bin/analyze && echo "✓" || echo "✗"`
|
|
162
|
+
- Config: `test -f ${CLAUDE_PLUGIN_ROOT}/config.json && echo "✓" || echo "✗"`
|
|
163
|
+
|
|
164
|
+
If all checks pass, run analysis.
|
|
165
|
+
Otherwise, report missing components.
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Error Handling
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
---
|
|
172
|
+
description: Build with error handling
|
|
173
|
+
allowed-tools: Bash(*)
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
Execute build: `bash ${CLAUDE_PLUGIN_ROOT}/scripts/build.sh 2>&1 || echo "BUILD_FAILED"`
|
|
177
|
+
|
|
178
|
+
If build succeeded:
|
|
179
|
+
Report success and output location
|
|
180
|
+
If build failed:
|
|
181
|
+
Analyze error output
|
|
182
|
+
Suggest likely causes
|
|
183
|
+
Provide troubleshooting steps
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Best practices:**
|
|
187
|
+
|
|
188
|
+
- Validate early in command
|
|
189
|
+
- Provide helpful error messages
|
|
190
|
+
- Suggest corrective actions
|
|
191
|
+
- Handle edge cases gracefully
|
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
# Skill Tool Reference
|
|
2
|
+
|
|
3
|
+
How Claude programmatically invokes slash commands and skills during conversations.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Skill tool enables Claude to programmatically execute both slash commands and Agent Skills without user typing. This allows Claude to autonomously invoke these capabilities as part of complex workflows, chain them together, or use them in response to user requests.
|
|
8
|
+
|
|
9
|
+
> **Key Insight:** Commands and skills are the same mechanism. Both are invoked via the Skill tool. Commands are simple (single `.md` file); skills are complex (directory with bundled resources).
|
|
10
|
+
>
|
|
11
|
+
> **Note:** In earlier versions of Claude Code, slash command invocation was provided by a separate `SlashCommand` tool. This has been merged into the `Skill` tool.
|
|
12
|
+
|
|
13
|
+
**Key concepts:**
|
|
14
|
+
|
|
15
|
+
- Claude can invoke both commands and skills via the Skill tool
|
|
16
|
+
- Commands need `description` frontmatter to be visible
|
|
17
|
+
- Skills can control visibility via `user-invocable` field
|
|
18
|
+
- Permission rules control which commands/skills Claude can invoke
|
|
19
|
+
- Character budget limits how many items Claude "sees"
|
|
20
|
+
- `disable-model-invocation` prevents programmatic invocation for both
|
|
21
|
+
|
|
22
|
+
## What the Skill Tool Can Invoke
|
|
23
|
+
|
|
24
|
+
| Type | Location | Requirements |
|
|
25
|
+
| --------------------- | -------------------------------------------- | ---------------------------------------------- |
|
|
26
|
+
| Custom slash commands | `.claude/commands/` or `~/.claude/commands/` | Must have `description` frontmatter |
|
|
27
|
+
| Agent Skills | `.claude/skills/` or `~/.claude/skills/` | Must not have `disable-model-invocation: true` |
|
|
28
|
+
| Plugin commands | `plugin-name/commands/` | Must have `description` frontmatter |
|
|
29
|
+
| Plugin skills | `plugin-name/skills/` | Must not have `disable-model-invocation: true` |
|
|
30
|
+
|
|
31
|
+
**Note:** Built-in commands like `/compact` and `/init` are NOT available through this tool.
|
|
32
|
+
|
|
33
|
+
## How the Skill Tool Works
|
|
34
|
+
|
|
35
|
+
### What It Does
|
|
36
|
+
|
|
37
|
+
When Claude determines a slash command or skill would help accomplish a task, it uses the Skill tool to invoke that capability. The tool:
|
|
38
|
+
|
|
39
|
+
1. Identifies available commands and skills based on permission rules
|
|
40
|
+
2. Selects appropriate item for the task
|
|
41
|
+
3. Executes the command or loads the skill with any arguments
|
|
42
|
+
4. Processes the output
|
|
43
|
+
|
|
44
|
+
### When Claude Uses It
|
|
45
|
+
|
|
46
|
+
Claude uses the Skill tool when:
|
|
47
|
+
|
|
48
|
+
- A command or skill directly addresses the user's request
|
|
49
|
+
- Multiple steps require chaining capabilities
|
|
50
|
+
- Automated workflows need command/skill execution
|
|
51
|
+
- User asks Claude to "run /command" or similar
|
|
52
|
+
|
|
53
|
+
**Example:** If a user says "review my code changes," Claude might use the Skill tool to invoke `/review` if such a command exists and is available.
|
|
54
|
+
|
|
55
|
+
## Visibility Requirements
|
|
56
|
+
|
|
57
|
+
### description Field Required
|
|
58
|
+
|
|
59
|
+
Commands **must** have a `description` frontmatter field to be visible to the Skill tool.
|
|
60
|
+
|
|
61
|
+
**Visible to Skill tool:**
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
---
|
|
65
|
+
description: Review code for security issues
|
|
66
|
+
---
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**NOT visible to Skill tool:**
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
# No frontmatter - command only available via manual invocation
|
|
73
|
+
|
|
74
|
+
Review this code for security vulnerabilities...
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Why this requirement:**
|
|
78
|
+
|
|
79
|
+
- Claude uses descriptions to understand what commands do
|
|
80
|
+
- Descriptions help Claude select the right command
|
|
81
|
+
- Forces documentation of command purpose
|
|
82
|
+
- Prevents accidental programmatic invocation of undocumented commands
|
|
83
|
+
|
|
84
|
+
### Best Practices for Descriptions
|
|
85
|
+
|
|
86
|
+
Write descriptions that help Claude understand when to use the command:
|
|
87
|
+
|
|
88
|
+
**Good descriptions:**
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
description: Review PR for code quality and security # Clear purpose
|
|
92
|
+
description: Deploy application to staging environment # Specific action
|
|
93
|
+
description: Run test suite and report failures # Expected outcome
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Poor descriptions:**
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
description: Review # Too vague - Claude can't determine when to use
|
|
100
|
+
description: Does stuff # Unhelpful - doesn't describe purpose
|
|
101
|
+
description: A command # Obvious - provides no information
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Character Budget
|
|
105
|
+
|
|
106
|
+
### Default Budget
|
|
107
|
+
|
|
108
|
+
The Skill tool has a character budget limiting how many command/skill descriptions Claude receives. The default budget is **15,000 characters**.
|
|
109
|
+
|
|
110
|
+
### How Budget Works
|
|
111
|
+
|
|
112
|
+
1. Items are sorted by priority (project, then user, then plugin)
|
|
113
|
+
2. Descriptions are added until budget exhausted
|
|
114
|
+
3. Items exceeding budget are not visible to Claude
|
|
115
|
+
4. More concise descriptions = more items visible
|
|
116
|
+
|
|
117
|
+
### Configuring Budget
|
|
118
|
+
|
|
119
|
+
Set the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable to adjust:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Increase budget to show more commands/skills
|
|
123
|
+
export SLASH_COMMAND_TOOL_CHAR_BUDGET=30000
|
|
124
|
+
|
|
125
|
+
# Decrease budget for faster processing
|
|
126
|
+
export SLASH_COMMAND_TOOL_CHAR_BUDGET=8000
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Budget Optimization
|
|
130
|
+
|
|
131
|
+
**Keep descriptions concise:**
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
# Good - concise (35 chars)
|
|
135
|
+
description: Review PR for security issues
|
|
136
|
+
|
|
137
|
+
# Bad - verbose (89 chars)
|
|
138
|
+
description: This command reviews pull requests for potential security vulnerabilities and issues
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Prioritize important items:**
|
|
142
|
+
|
|
143
|
+
- Project items appear before user items
|
|
144
|
+
- Keep critical commands/skills in project scope
|
|
145
|
+
- Move rarely-used items to user scope
|
|
146
|
+
|
|
147
|
+
## Permission Rules
|
|
148
|
+
|
|
149
|
+
### Overview
|
|
150
|
+
|
|
151
|
+
Permission rules control which commands and skills Claude can invoke via the Skill tool. Rules are configured in Claude Code settings.
|
|
152
|
+
|
|
153
|
+
### Rule Patterns
|
|
154
|
+
|
|
155
|
+
**Exact match (no arguments):**
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
Skill(commit) # Only commit with no arguments
|
|
159
|
+
Skill(deploy) # Only deploy with no arguments
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Prefix match (with arguments):**
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
Skill(review-pr:*) # review-pr with any arguments
|
|
166
|
+
Skill(git:*) # All items starting with git
|
|
167
|
+
Skill(plugin-name:*) # All items from specific plugin
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Deny all:**
|
|
171
|
+
|
|
172
|
+
Add `Skill` to deny rules to prevent all programmatic invocation.
|
|
173
|
+
|
|
174
|
+
### Configuration Examples
|
|
175
|
+
|
|
176
|
+
**Allow specific commands:**
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"allow": ["Skill(review:*)", "Skill(test:*)"]
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Deny dangerous commands:**
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"deny": ["Skill(deploy-prod:*)", "Skill(delete:*)"]
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Deny all programmatic invocation:**
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"deny": ["Skill"]
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Permission Precedence
|
|
201
|
+
|
|
202
|
+
1. Explicit deny rules take precedence
|
|
203
|
+
2. Explicit allow rules override defaults
|
|
204
|
+
3. Default behavior allows programmatic invocation
|
|
205
|
+
4. `disable-model-invocation` in frontmatter always blocks
|
|
206
|
+
|
|
207
|
+
## disable-model-invocation Field
|
|
208
|
+
|
|
209
|
+
### Purpose
|
|
210
|
+
|
|
211
|
+
The `disable-model-invocation` frontmatter field prevents Claude from programmatically invoking a command or skill, regardless of permission rules.
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
---
|
|
215
|
+
description: Approve production deployment
|
|
216
|
+
disable-model-invocation: true
|
|
217
|
+
---
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### When to Use
|
|
221
|
+
|
|
222
|
+
**Manual-only commands:**
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
---
|
|
226
|
+
description: Approve production deployment
|
|
227
|
+
disable-model-invocation: true
|
|
228
|
+
---
|
|
229
|
+
# Production Deployment Approval
|
|
230
|
+
|
|
231
|
+
This deployment requires human judgment and sign-off.
|
|
232
|
+
Verify all checks have passed before approving.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Destructive operations:**
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
---
|
|
239
|
+
description: Delete all test data
|
|
240
|
+
disable-model-invocation: true
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
# Test Data Deletion
|
|
244
|
+
|
|
245
|
+
WARNING: This permanently deletes all test data.
|
|
246
|
+
This operation cannot be undone.
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Interactive workflows:**
|
|
250
|
+
|
|
251
|
+
```yaml
|
|
252
|
+
---
|
|
253
|
+
description: Setup wizard for new project
|
|
254
|
+
disable-model-invocation: true
|
|
255
|
+
---
|
|
256
|
+
# Project Setup Wizard
|
|
257
|
+
|
|
258
|
+
This wizard requires interactive user input at each step.
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### How It Differs from Permission Rules
|
|
262
|
+
|
|
263
|
+
| Aspect | disable-model-invocation | Permission Rules |
|
|
264
|
+
| -------- | ------------------------- | -------------------- |
|
|
265
|
+
| Scope | Single command/skill | Global/pattern-based |
|
|
266
|
+
| Location | Frontmatter | Settings file |
|
|
267
|
+
| Override | Cannot be overridden | Can be adjusted |
|
|
268
|
+
| Use case | Item-specific restriction | Policy enforcement |
|
|
269
|
+
|
|
270
|
+
**Use `disable-model-invocation` when:**
|
|
271
|
+
|
|
272
|
+
- Item should NEVER be programmatically invoked
|
|
273
|
+
- Restriction is inherent to item's purpose
|
|
274
|
+
- Decision made by author
|
|
275
|
+
|
|
276
|
+
**Use permission rules when:**
|
|
277
|
+
|
|
278
|
+
- Organization policy restricts certain patterns
|
|
279
|
+
- User wants to control Claude's autonomy
|
|
280
|
+
- Temporary or adjustable restrictions needed
|
|
281
|
+
|
|
282
|
+
## user-invocable Field (Skills Only)
|
|
283
|
+
|
|
284
|
+
Skills have an additional `user-invocable` field that controls slash menu visibility:
|
|
285
|
+
|
|
286
|
+
```yaml
|
|
287
|
+
---
|
|
288
|
+
name: internal-review-standards
|
|
289
|
+
description: Apply internal code review standards
|
|
290
|
+
user-invocable: false
|
|
291
|
+
---
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Important distinctions:**
|
|
295
|
+
|
|
296
|
+
| Setting | Slash Menu | Skill Tool | Auto-Discovery |
|
|
297
|
+
| -------------------------------- | ---------- | ---------- | -------------- |
|
|
298
|
+
| `user-invocable: true` (default) | Visible | Allowed | Yes |
|
|
299
|
+
| `user-invocable: false` | Hidden | Allowed | Yes |
|
|
300
|
+
| `disable-model-invocation: true` | Visible | Blocked | Yes |
|
|
301
|
+
|
|
302
|
+
The `user-invocable` field only controls whether users see the skill in the `/` menu. It does NOT prevent Claude from using the skill via the Skill tool or auto-discovery.
|
|
303
|
+
|
|
304
|
+
## Integration Patterns
|
|
305
|
+
|
|
306
|
+
### Commands Designed for Programmatic Use
|
|
307
|
+
|
|
308
|
+
Some commands work well when invoked by Claude:
|
|
309
|
+
|
|
310
|
+
```yaml
|
|
311
|
+
---
|
|
312
|
+
description: Get current git status summary
|
|
313
|
+
allowed-tools: Bash(git:*)
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
# Git Status
|
|
317
|
+
|
|
318
|
+
Branch: `git branch --show-current`
|
|
319
|
+
Status: `git status --short`
|
|
320
|
+
Recent: `git log -3 --oneline`
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
This command:
|
|
324
|
+
|
|
325
|
+
- Has clear, specific description
|
|
326
|
+
- Produces useful output for Claude
|
|
327
|
+
- No destructive operations
|
|
328
|
+
- Quick execution
|
|
329
|
+
|
|
330
|
+
### Commands for Manual-Only Use
|
|
331
|
+
|
|
332
|
+
Some commands should remain manual:
|
|
333
|
+
|
|
334
|
+
```yaml
|
|
335
|
+
---
|
|
336
|
+
description: Force push to protected branch (DANGEROUS)
|
|
337
|
+
disable-model-invocation: true
|
|
338
|
+
allowed-tools: Bash(git:*)
|
|
339
|
+
---
|
|
340
|
+
# Force Push
|
|
341
|
+
|
|
342
|
+
WARNING: This will overwrite remote history.
|
|
343
|
+
|
|
344
|
+
Are you absolutely sure? Type the branch name to confirm: $1
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
This command:
|
|
348
|
+
|
|
349
|
+
- Uses `disable-model-invocation: true`
|
|
350
|
+
- Has clear warning in description
|
|
351
|
+
- Requires explicit confirmation
|
|
352
|
+
- Documents danger level
|
|
353
|
+
|
|
354
|
+
### Workflow Commands
|
|
355
|
+
|
|
356
|
+
Commands that chain others should consider visibility:
|
|
357
|
+
|
|
358
|
+
```yaml
|
|
359
|
+
---
|
|
360
|
+
description: Complete release workflow
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
# Release Workflow
|
|
364
|
+
|
|
365
|
+
Execute the following steps:
|
|
366
|
+
1. Run tests via /test
|
|
367
|
+
2. Update version via /version-bump $1
|
|
368
|
+
3. Create changelog via /changelog
|
|
369
|
+
4. Tag release via /tag-release $1
|
|
370
|
+
|
|
371
|
+
Verify each step before proceeding.
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
If sub-commands have `disable-model-invocation: true`, this workflow command will need user interaction at those steps.
|
|
375
|
+
|
|
376
|
+
## Troubleshooting
|
|
377
|
+
|
|
378
|
+
### Command/Skill Not Available to Claude
|
|
379
|
+
|
|
380
|
+
**Check description field:**
|
|
381
|
+
|
|
382
|
+
```yaml
|
|
383
|
+
---
|
|
384
|
+
description: Must have description # Required for visibility
|
|
385
|
+
---
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**Check character budget:**
|
|
389
|
+
|
|
390
|
+
- Too many items may exceed budget
|
|
391
|
+
- Shorten descriptions or increase budget
|
|
392
|
+
- Check if item appears with `SLASH_COMMAND_TOOL_CHAR_BUDGET=100000`
|
|
393
|
+
|
|
394
|
+
**Check permission rules:**
|
|
395
|
+
|
|
396
|
+
- Verify no deny rules match the item
|
|
397
|
+
- Check if allow rules are too restrictive
|
|
398
|
+
|
|
399
|
+
### Claude Won't Invoke Command/Skill
|
|
400
|
+
|
|
401
|
+
**Check disable-model-invocation:**
|
|
402
|
+
|
|
403
|
+
```yaml
|
|
404
|
+
disable-model-invocation: true # Blocks programmatic invocation
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Check permission rules:**
|
|
408
|
+
|
|
409
|
+
- Look for deny patterns matching item
|
|
410
|
+
- Verify Skill not in global deny list
|
|
411
|
+
|
|
412
|
+
### Too Many Items Visible
|
|
413
|
+
|
|
414
|
+
**Reduce character budget:**
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
export SLASH_COMMAND_TOOL_CHAR_BUDGET=8000
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Shorten descriptions:**
|
|
421
|
+
|
|
422
|
+
- Keep under 60 characters
|
|
423
|
+
- Remove redundant words
|
|
424
|
+
- Focus on key purpose
|
|
425
|
+
|
|
426
|
+
**Use disable-model-invocation:**
|
|
427
|
+
|
|
428
|
+
- Add to items that shouldn't be auto-invoked
|
|
429
|
+
- Keep only essential items visible
|
|
430
|
+
|
|
431
|
+
## Best Practices
|
|
432
|
+
|
|
433
|
+
### For Authors
|
|
434
|
+
|
|
435
|
+
1. **Always include description** - Required for visibility
|
|
436
|
+
2. **Keep descriptions concise** - Respect character budget
|
|
437
|
+
3. **Use `disable-model-invocation` thoughtfully** - Only when truly needed
|
|
438
|
+
4. **Document dangerous operations** - Make risks clear in description
|
|
439
|
+
5. **Design for both uses** - Items should work manually and programmatically
|
|
440
|
+
|
|
441
|
+
### For Users/Organizations
|
|
442
|
+
|
|
443
|
+
1. **Set appropriate permission rules** - Balance autonomy and safety
|
|
444
|
+
2. **Adjust character budget** - Based on item volume
|
|
445
|
+
3. **Review descriptions** - Ensure Claude can understand them
|
|
446
|
+
4. **Test programmatic invocation** - Verify items work as expected
|
|
447
|
+
5. **Monitor usage** - Track which items Claude invokes
|