@drunkcoding/agents-and-skills 0.0.11 → 0.0.12
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/.claude-plugin/marketplace.json +19 -3
- package/README.md +1 -0
- package/package.json +1 -1
- package/plugins/html-effectiveness/.claude-plugin/plugin.json +1 -1
- package/plugins/plugin-validator/.claude-plugin/plugin.json +18 -0
- package/plugins/plugin-validator/README.md +37 -0
- package/plugins/plugin-validator/agents/plugin-validator.md +239 -0
- package/plugins/plugin-validator/commands/validate-plugins.md +7 -0
- package/plugins/plugin-validator/skills/validate-agents/SKILL.md +72 -0
- package/plugins/plugin-validator/skills/validate-commands/SKILL.md +71 -0
- package/plugins/plugin-validator/skills/validate-hooks/SKILL.md +64 -0
- package/plugins/plugin-validator/skills/validate-skills/SKILL.md +66 -0
- package/plugins/team-superpower/.claude-plugin/plugin.json +1 -1
- package/plugins/tech-graph/.claude-plugin/plugin.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"name": "tech-graph",
|
|
13
13
|
"source": "./plugins/tech-graph",
|
|
14
14
|
"description": "6-step wizard for technical diagrams (SVG/PNG) via fireworks-tech-graph",
|
|
15
|
-
"version": "0.0.
|
|
15
|
+
"version": "0.0.12",
|
|
16
16
|
"category": "diagram",
|
|
17
17
|
"keywords": [
|
|
18
18
|
"diagram",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"name": "html-effectiveness",
|
|
27
27
|
"source": "./plugins/html-effectiveness",
|
|
28
28
|
"description": "Generate self-contained interactive HTML reports from 20 upstream templates via a conversational agent.",
|
|
29
|
-
"version": "0.0.
|
|
29
|
+
"version": "0.0.12",
|
|
30
30
|
"category": "reports",
|
|
31
31
|
"keywords": [
|
|
32
32
|
"html",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"name": "team-superpower",
|
|
42
42
|
"source": "./plugins/team-superpower",
|
|
43
43
|
"description": "Coordination layer that runs the obra/superpowers skill chain across a Claude Code agent team — one /team-feature command takes an idea through brainstorming, plan, TDD implementation, review, and finish with at most 4 owner touchpoints.",
|
|
44
|
-
"version": "0.0.
|
|
44
|
+
"version": "0.0.12",
|
|
45
45
|
"category": "workflow",
|
|
46
46
|
"keywords": [
|
|
47
47
|
"agent-teams",
|
|
@@ -52,6 +52,22 @@
|
|
|
52
52
|
"brainstorming",
|
|
53
53
|
"code-review"
|
|
54
54
|
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "plugin-validator",
|
|
58
|
+
"source": "./plugins/plugin-validator",
|
|
59
|
+
"description": "Orchestrated validator for Claude Code plugins — validates skills, agents, commands, and hooks across every plugin under plugins/**.",
|
|
60
|
+
"version": "0.0.12",
|
|
61
|
+
"category": "tooling",
|
|
62
|
+
"keywords": [
|
|
63
|
+
"validation",
|
|
64
|
+
"linting",
|
|
65
|
+
"plugin-authoring",
|
|
66
|
+
"skills",
|
|
67
|
+
"agents",
|
|
68
|
+
"commands",
|
|
69
|
+
"hooks"
|
|
70
|
+
]
|
|
55
71
|
}
|
|
56
72
|
]
|
|
57
73
|
}
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Published on npm as [`@drunkcoding/agents-and-skills`](https://www.npmjs.com/pac
|
|
|
11
11
|
| [`tech-graph`](plugins/tech-graph) | 6-step wizard for technical diagrams (SVG + PNG). |
|
|
12
12
|
| [`html-effectiveness`](plugins/html-effectiveness) | Conversational agent that generates self-contained interactive HTML reports from 20 templates. |
|
|
13
13
|
| [`team-superpower`](plugins/team-superpower) | Agent-team conductor that runs the obra/superpowers skill chain end-to-end with at most 4 owner touchpoints. |
|
|
14
|
+
| [`plugin-validator`](plugins/plugin-validator) | Orchestrated validator that checks every plugin's skills, agents, commands, and hooks for spec compliance — runs in parallel and proposes batched fixes. |
|
|
14
15
|
|
|
15
16
|
## Install
|
|
16
17
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-effectiveness",
|
|
3
3
|
"displayName": "HTML Effectiveness Reports",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"description": "Generate self-contained interactive HTML reports from 20 upstream templates via a conversational agent.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Steven Hoang"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "plugin-validator",
|
|
3
|
+
"displayName": "Plugin Validator",
|
|
4
|
+
"version": "0.0.12",
|
|
5
|
+
"description": "Orchestrated validator for Claude Code plugins — validates skills, agents, commands, and hooks across every plugin under plugins/**.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Steven Hoang"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"validation",
|
|
11
|
+
"linting",
|
|
12
|
+
"plugin-authoring",
|
|
13
|
+
"skills",
|
|
14
|
+
"agents",
|
|
15
|
+
"commands",
|
|
16
|
+
"hooks"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# plugin-validator
|
|
2
|
+
|
|
3
|
+
Orchestrated validator for Claude Code plugins. Validates skills, agents, commands, and hooks across every plugin under `plugins/**`. Runs sub-validators in parallel and proposes batched fixes.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
/plugin marketplace add baoduy/agents-and-skills
|
|
9
|
+
/plugin install plugin-validator@drunkcoding
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
Run the full validator across all plugins:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
/validate-plugins
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or invoke individual sub-validators directly:
|
|
21
|
+
|
|
22
|
+
| Invocation | What it checks |
|
|
23
|
+
|------------|----------------|
|
|
24
|
+
| `/validate-skills` | `SKILL.md` frontmatter and body in all plugins |
|
|
25
|
+
| `/validate-agents` | Agent `.md` files in all plugins |
|
|
26
|
+
| `/validate-commands` | Slash-command `.md` files in all plugins |
|
|
27
|
+
| `/validate-hooks` | `plugin.json` hooks fields and `hooks.json` in all plugins |
|
|
28
|
+
|
|
29
|
+
## What it produces
|
|
30
|
+
|
|
31
|
+
- A per-plugin report section with `[PASS]` / `[FAIL]` / `[WARN]` per check.
|
|
32
|
+
- A summary table: `| Plugin | Skills | Hooks | Agents | Commands | Status |`.
|
|
33
|
+
- A batched `## Proposed Fixes` block — choose `Apply all`, `Choose per-item`, or `Skip all`.
|
|
34
|
+
|
|
35
|
+
## Scope
|
|
36
|
+
|
|
37
|
+
Scans `plugins/**` only. Local `.claude/` artifacts and vendored paths (e.g. `plugins/tech-graph/skills/tech-graph/`) are excluded.
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plugin-validator
|
|
3
|
+
description: Use when the user wants to validate every plugin under plugins/** at once. Spawns one parallel subagent per plugin, each running validate-skills, validate-hooks, validate-agents, and validate-commands against its assigned plugin. Aggregates results into a per-plugin section plus a top-level summary table, then proposes ALL fixes for FAIL items in a single batched prompt (Apply all / Skip all / Choose per-item).
|
|
4
|
+
tools: Read, Glob, Grep, Bash, Agent, Edit, Write, AskUserQuestion
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Plugin Validator
|
|
9
|
+
|
|
10
|
+
Orchestrates per-plugin validation. Reads `plugins/**`, dispatches one parallel subagent per plugin, aggregates results, offers interactive fixes.
|
|
11
|
+
|
|
12
|
+
## Discovery
|
|
13
|
+
|
|
14
|
+
Use the Glob tool with pattern `plugins/*/.claude-plugin/plugin.json` to enumerate plugin roots. Each match yields a plugin root = the directory two levels above `plugin.json`. Build the list `PLUGINS = [{name, path}, ...]`.
|
|
15
|
+
|
|
16
|
+
Example: `plugins/caveman/.claude-plugin/plugin.json` → `{ name: "caveman", path: "plugins/caveman" }`.
|
|
17
|
+
|
|
18
|
+
(Avoid `find ... -path` here — some shell shims strip the `-path` flag. Glob is the safe primitive.)
|
|
19
|
+
|
|
20
|
+
## Parallel Dispatch
|
|
21
|
+
|
|
22
|
+
Dispatch one subagent per plugin **in a single message** with multiple Agent tool blocks. Each block sends the worker prompt below with `PLUGIN_PATH` and `PLUGIN_NAME` substituted. Do not wait between launches — all Agent calls go in the same message turn.
|
|
23
|
+
|
|
24
|
+
### Inlined Worker Prompt Template
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
You are a plugin validator worker. Your sole job is to validate one plugin and return a structured report. You do not spawn further agents, do not edit any file, and do not prompt the user.
|
|
28
|
+
|
|
29
|
+
## Input
|
|
30
|
+
|
|
31
|
+
- PLUGIN_PATH: <substituted>
|
|
32
|
+
- PLUGIN_NAME: <substituted>
|
|
33
|
+
|
|
34
|
+
## Workflow
|
|
35
|
+
|
|
36
|
+
### Step 1 — Confirm plugin.json exists
|
|
37
|
+
|
|
38
|
+
Read `<PLUGIN_PATH>/.claude-plugin/plugin.json`. If it does not exist, return:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
### Plugin: <PLUGIN_NAME>
|
|
42
|
+
|
|
43
|
+
#### validate-skills
|
|
44
|
+
ERROR: plugin.json not found at <PLUGIN_PATH>/.claude-plugin/plugin.json
|
|
45
|
+
|
|
46
|
+
#### validate-hooks
|
|
47
|
+
ERROR: plugin.json not found
|
|
48
|
+
|
|
49
|
+
#### validate-agents
|
|
50
|
+
ERROR: plugin.json not found
|
|
51
|
+
|
|
52
|
+
#### validate-commands
|
|
53
|
+
ERROR: plugin.json not found
|
|
54
|
+
|
|
55
|
+
→ Status: ERROR
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then stop.
|
|
59
|
+
|
|
60
|
+
### Step 2 — Run four validation skills
|
|
61
|
+
|
|
62
|
+
**You MUST invoke all four skills before returning. Do not stop after one. Do not summarize before running them all.** Use the Skill tool for each, scoped to `<PLUGIN_PATH>`. Collect each output as a string for use in Step 4.
|
|
63
|
+
|
|
64
|
+
- Skill: `validate-skills` — check all SKILL.md files under `<PLUGIN_PATH>/skills/`
|
|
65
|
+
- Skill: `validate-hooks` — check hooks in `<PLUGIN_PATH>/.claude-plugin/plugin.json` and any `hooks.json` under `<PLUGIN_PATH>/`
|
|
66
|
+
- Skill: `validate-agents` — check all `.md` files under `<PLUGIN_PATH>/agents/`
|
|
67
|
+
- Skill: `validate-commands` — check all `.md` files under `<PLUGIN_PATH>/commands/`
|
|
68
|
+
|
|
69
|
+
If a skill invocation returns an error or throws, record `ERROR: <reason>` for that section and continue with the remaining skills. Do NOT abort the worker.
|
|
70
|
+
|
|
71
|
+
**Do not echo each skill's `## Validation Results` header back to the orchestrator.** Your job is to transform each skill's output into a `####` sub-section under the single `### Plugin:` block shown in Report Shape. The orchestrator parser depends on the exact shape — anything else breaks aggregation.
|
|
72
|
+
|
|
73
|
+
### Step 3 — Cap output at 50 lines per section
|
|
74
|
+
|
|
75
|
+
For each skill output, if the line count exceeds 50, keep the first 50 lines and append exactly:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
... <N> more lines, run /validate-<skill> directly for full output
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
where `<N>` is the count of truncated lines and `<skill>` is the skill name (e.g. `validate-skills`).
|
|
82
|
+
|
|
83
|
+
### Step 4 — Compute PASS/FAIL per skill
|
|
84
|
+
|
|
85
|
+
Scan each (possibly truncated) section for `[FAIL]` occurrences.
|
|
86
|
+
- If any `[FAIL]` appears → `FAIL`
|
|
87
|
+
- If only `[PASS]` or `[WARN]` appear, or the section is empty (nothing to check) → `PASS`
|
|
88
|
+
- If the section is an `ERROR:` string → `ERROR`
|
|
89
|
+
|
|
90
|
+
## Report Shape
|
|
91
|
+
|
|
92
|
+
Return exactly this markdown block, no other text:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
### Plugin: <PLUGIN_NAME>
|
|
96
|
+
|
|
97
|
+
#### validate-skills
|
|
98
|
+
<output lines, capped at 50>
|
|
99
|
+
|
|
100
|
+
→ validate-skills: PASS|FAIL|ERROR
|
|
101
|
+
|
|
102
|
+
#### validate-hooks
|
|
103
|
+
<output lines, capped at 50>
|
|
104
|
+
|
|
105
|
+
→ validate-hooks: PASS|FAIL|ERROR
|
|
106
|
+
|
|
107
|
+
#### validate-agents
|
|
108
|
+
<output lines, capped at 50>
|
|
109
|
+
|
|
110
|
+
→ validate-agents: PASS|FAIL|ERROR
|
|
111
|
+
|
|
112
|
+
#### validate-commands
|
|
113
|
+
<output lines, capped at 50>
|
|
114
|
+
|
|
115
|
+
→ validate-commands: PASS|FAIL|ERROR
|
|
116
|
+
|
|
117
|
+
→ Status: PASS|FAIL|ERROR
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`Status` is `FAIL` if any sub-skill is `FAIL`, `ERROR` if any sub-skill is `ERROR` (and none is `FAIL`), else `PASS`.
|
|
121
|
+
|
|
122
|
+
## Constraints
|
|
123
|
+
|
|
124
|
+
- Do not spawn further subagents.
|
|
125
|
+
- Do not edit any file.
|
|
126
|
+
- Do not ask the user any question.
|
|
127
|
+
- On Skill error, record `ERROR: <reason>` for that section and continue.
|
|
128
|
+
- Return only the report block above — nothing else.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Example Dispatch (2 plugins)
|
|
132
|
+
|
|
133
|
+
The orchestrator sends a single message containing two Agent tool calls in parallel:
|
|
134
|
+
|
|
135
|
+
**Agent call 1** — prompt = worker template with `PLUGIN_PATH=plugins/caveman`, `PLUGIN_NAME=caveman`
|
|
136
|
+
|
|
137
|
+
**Agent call 2** — prompt = worker template with `PLUGIN_PATH=plugins/html-effectiveness`, `PLUGIN_NAME=html-effectiveness`
|
|
138
|
+
|
|
139
|
+
Both run concurrently. After both complete, collect their report blocks.
|
|
140
|
+
|
|
141
|
+
### Collecting Results
|
|
142
|
+
|
|
143
|
+
After all subagents complete, collect their report blocks in plugin-name order (alphabetical by `PLUGIN_NAME`). If a subagent returns BLOCKED or produces no output, synthesize a placeholder:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
### Plugin: <PLUGIN_NAME>
|
|
147
|
+
|
|
148
|
+
→ Status: BLOCKED — subagent returned no output
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Aggregation
|
|
152
|
+
|
|
153
|
+
After all subagents complete:
|
|
154
|
+
|
|
155
|
+
1. Concatenate their report blocks in plugin-name order, preceded by `## Plugin Validation Report`.
|
|
156
|
+
2. Parse each block's `→ PASS|FAIL|ERROR` lines per sub-skill to populate the summary table.
|
|
157
|
+
3. Compute `Status` per plugin: `FAIL` if any sub-skill is `FAIL`, `ERROR` if any is `ERROR` (and none is `FAIL`), else `PASS`.
|
|
158
|
+
4. Emit summary:
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
## Summary
|
|
162
|
+
|
|
163
|
+
| Plugin | Skills | Hooks | Agents | Commands | Status |
|
|
164
|
+
|--------|--------|-------|--------|----------|--------|
|
|
165
|
+
| <name> | PASS | FAIL | PASS | PASS | FAIL |
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
5. Final tally line: `<P>/<N> plugins pass.`
|
|
169
|
+
|
|
170
|
+
## Batched Fix Proposal Phase
|
|
171
|
+
|
|
172
|
+
Complete the FULL end-to-end validation first. Emit the per-plugin report AND the summary table BEFORE prompting the user for any fixes. Do not interleave validation with fixing.
|
|
173
|
+
|
|
174
|
+
After the report+summary are emitted, collect every `[FAIL]` finding across all plugins in plugin-name order. Filter out FAILs whose target file path is under `plugins/tech-graph/skills/tech-graph/` — those are vendored, mark them `not-applied (vendored)` and skip silently.
|
|
175
|
+
|
|
176
|
+
For the remaining FAILs, emit a single `## Proposed Fixes` section listing **every** fix at once. Numbered, in plugin-name order, each entry showing:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
### Fix N — <PLUGIN_NAME> · <skill>
|
|
180
|
+
File: <relative path>
|
|
181
|
+
Issue: <[FAIL] detail>
|
|
182
|
+
Diff:
|
|
183
|
+
```diff
|
|
184
|
+
<unified-diff hunk for the proposed fix>
|
|
185
|
+
```
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
After the list, issue ONE `AskUserQuestion` with options (exact strings, verbatim):
|
|
189
|
+
|
|
190
|
+
- `Apply all` — apply every numbered fix in order
|
|
191
|
+
- `Choose per-item` — fall back to one-at-a-time prompts for each fix
|
|
192
|
+
- `Skip all` — exit without applying anything
|
|
193
|
+
|
|
194
|
+
### On `Apply all`
|
|
195
|
+
|
|
196
|
+
For each fix 1..N: apply via Edit, then confirm by re-reading the edited region. Record `applied` in the fix summary. If any single Edit fails, record `error: <reason>` for that fix and continue with the rest.
|
|
197
|
+
|
|
198
|
+
### On `Skip all`
|
|
199
|
+
|
|
200
|
+
Record `skipped` for every fix. Print `<N> fixes skipped by user choice.`
|
|
201
|
+
|
|
202
|
+
### On `Choose per-item`
|
|
203
|
+
|
|
204
|
+
Walk fixes in order. For each, issue `AskUserQuestion` with options:
|
|
205
|
+
|
|
206
|
+
- `Apply fix`
|
|
207
|
+
- `Skip`
|
|
208
|
+
- `Skip all remaining`
|
|
209
|
+
|
|
210
|
+
Behavior:
|
|
211
|
+
- `Apply fix` → Edit, re-read, record `applied`.
|
|
212
|
+
- `Skip` → record `skipped`, continue.
|
|
213
|
+
- `Skip all remaining` → record `skipped` for all unprompted FAILs, exit loop, print `<N> fixes skipped by user choice.`
|
|
214
|
+
|
|
215
|
+
### Fix Summary
|
|
216
|
+
|
|
217
|
+
After the fix loop completes (or is terminated), emit:
|
|
218
|
+
|
|
219
|
+
```markdown
|
|
220
|
+
## Fix Summary
|
|
221
|
+
|
|
222
|
+
| Plugin | Check | Action |
|
|
223
|
+
|--------|-------|--------|
|
|
224
|
+
| <name> | <check description> | applied / skipped / not-applied (vendored) |
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Constraints
|
|
228
|
+
|
|
229
|
+
- Sub-agent dispatch is depth 2 (you are at depth 1). Do not let workers spawn further agents.
|
|
230
|
+
- Only edit plugin files during the fix phase, only on explicit user `Apply fix`.
|
|
231
|
+
- Never edit files under `plugins/tech-graph/skills/tech-graph/` — vendored subtree.
|
|
232
|
+
- If any worker returns BLOCKED or ERROR, surface it in the report and skip its row in the fix phase.
|
|
233
|
+
- Do not emit any output until all subagents have returned (wait for full parallel batch before aggregating).
|
|
234
|
+
|
|
235
|
+
## References
|
|
236
|
+
|
|
237
|
+
- Sub-skills: `validate-skills`, `validate-hooks`, `validate-agents`, `validate-commands`
|
|
238
|
+
- Spec: `docs/superpowers/specs/2026-05-13-plugin-validator-agent-design.md`
|
|
239
|
+
- Plan: `docs/superpowers/plans/2026-05-13-plugin-validator-agent.md`
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validate every plugin under plugins/** via the plugin-validator agent.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Dispatch the `plugin-validator` agent. Surface its full report (per-plugin sections + summary table) to the user. After the report+summary are out, surface the agent's single batched `## Proposed Fixes` block plus the `Apply all / Choose per-item / Skip all` prompt. Apply edits per the user's choice and emit the fix-summary table at the end.
|
|
6
|
+
|
|
7
|
+
Do not perform any validation logic yourself — defer entirely to the agent.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validate-agents
|
|
3
|
+
description: Validates plugin agents (any .md file under plugins/**/agents/) against the Claude Code subagent spec. Use via /validate-agents command.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Steven Hoang
|
|
7
|
+
tags: validation, linting, plugin-authoring, agents
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Validate Agents
|
|
11
|
+
|
|
12
|
+
Validate plugin agents under `plugins/**/agents/*.md` against the Claude Code subagent spec. Scope: `plugins/**` only.
|
|
13
|
+
|
|
14
|
+
## Discovery
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
find plugins -path '*/agents/*.md'
|
|
18
|
+
find plugins -path '*/.claude-plugin/plugin.json'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
For each `plugin.json`, parse and check whether the `agents` key is present (any shape). Emit one `[FAIL]` per plugin that declares it. Then validate every agent `.md` file as below.
|
|
22
|
+
|
|
23
|
+
## Spec Compliance Checks
|
|
24
|
+
|
|
25
|
+
| Check | Rule |
|
|
26
|
+
|-------|------|
|
|
27
|
+
| YAML frontmatter | Present and parses |
|
|
28
|
+
| `name` format | 1-64 chars, lowercase alphanumeric + hyphens; no leading/trailing/consecutive hyphens |
|
|
29
|
+
| `name` matches filename | `agents/foo.md` → `name: foo` |
|
|
30
|
+
| `description` length | 1-1024 chars, non-empty |
|
|
31
|
+
| `tools` optional | Comma-separated string; each name appears in the valid-tool list below |
|
|
32
|
+
| `model` optional | One of `sonnet`, `opus`, `haiku`, `inherit` |
|
|
33
|
+
| No `agents` key in plugin.json | The plugin loader rejects any `agents` field with `agents: Invalid input`. Agent files are auto-discovered from `<plugin>/agents/*.md`. If `plugin.json` declares an `agents` array (or any other shape), flag as `[FAIL]` and recommend deleting the key. Confirmed against `anthropics/claude-code` official plugins (`pr-review-toolkit`, `frontend-design`, `commit-commands`, `hookify`) — none declare `agents`. |
|
|
34
|
+
|
|
35
|
+
### Valid tool names (Claude Code ≥ 2.1.139)
|
|
36
|
+
|
|
37
|
+
`Bash`, `Read`, `Write`, `Edit`, `Glob`, `Grep`, `NotebookEdit`, `Task`, `Agent`, `Skill`, `AskUserQuestion`, `EnterWorktree`, `ExitWorktree`, `EnterPlanMode`, `ExitPlanMode`, `TodoWrite`, `TodoRead`, `TaskCreate`, `TaskUpdate`, `WebFetch`, `WebSearch`, plus any name with the `mcp__<server>__<tool>` prefix (treat unknown `mcp__*` names as `[WARN]`, not `[FAIL]`, because MCP names are dynamic).
|
|
38
|
+
|
|
39
|
+
Refresh this list when a new Claude Code major version ships. Source: docs.claude.com sub-agents page and `~/.claude/cache/changelog.md`.
|
|
40
|
+
|
|
41
|
+
## Best-Practice Checks
|
|
42
|
+
|
|
43
|
+
| Check | Rule |
|
|
44
|
+
|-------|------|
|
|
45
|
+
| Third-person description | Description does not begin with "I " or use "I will" / "I'll" |
|
|
46
|
+
| When-to-invoke trigger | Description states when to invoke (heuristic: contains "Use when", "When the user", or "Trigger") |
|
|
47
|
+
| Body length | Body (post-frontmatter) under 500 lines |
|
|
48
|
+
| No first-person body | Body does not contain "I will" / "I'll" as a leading clause |
|
|
49
|
+
| Behavior section | Body has at least one of: `## Output`, `## Behavior`, `## Workflow`, `## How to Run` |
|
|
50
|
+
|
|
51
|
+
## How to Run
|
|
52
|
+
|
|
53
|
+
1. Discover all agent files.
|
|
54
|
+
2. Parse YAML frontmatter (use Python `yaml.safe_load`).
|
|
55
|
+
3. Apply spec + best-practice tables.
|
|
56
|
+
4. Emit report:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
## Validation Results
|
|
60
|
+
|
|
61
|
+
### plugins/<plugin>/agents/<name>.md
|
|
62
|
+
- [PASS] <check>
|
|
63
|
+
- [FAIL] <check>: <details>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
5. Final tally: `Summary: <N> agent files scanned. <P> pass, <F> fail.`
|
|
67
|
+
|
|
68
|
+
## References
|
|
69
|
+
|
|
70
|
+
- [Claude Code subagent docs](https://docs.claude.com/en/docs/claude-code/sub-agents)
|
|
71
|
+
- Tool-list provenance: see `docs/superpowers/specs/2026-05-13-plugin-validation-skills-design.md` § Resolution 2
|
|
72
|
+
- Sibling skills: `validate-skills`, `validate-hooks`, `validate-commands`
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validate-commands
|
|
3
|
+
description: Validates plugin slash commands (any .md file under plugins/**/commands/) against the Claude Code slash-command spec. Use via /validate-commands command.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Steven Hoang
|
|
7
|
+
tags: validation, linting, plugin-authoring, commands
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Validate Commands
|
|
11
|
+
|
|
12
|
+
Validate plugin slash commands under `plugins/**/commands/*.md` against the Claude Code slash-command spec. Scope: `plugins/**` only.
|
|
13
|
+
|
|
14
|
+
## Discovery
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
find plugins -path '*/commands/*.md'
|
|
18
|
+
find plugins -path '*/.claude-plugin/plugin.json'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
For each `plugin.json`, parse and check whether the `commands` key is present (any shape). Emit one `[FAIL]` per plugin that declares it. Then validate every command `.md` file as below.
|
|
22
|
+
|
|
23
|
+
## Spec Compliance Checks
|
|
24
|
+
|
|
25
|
+
| Check | Rule |
|
|
26
|
+
|-------|------|
|
|
27
|
+
| Frontmatter optional | If present, must parse |
|
|
28
|
+
| `description` length | 1-1024 chars when present |
|
|
29
|
+
| `allowed-tools` optional | Comma-separated string; each name appears in the valid-tool list below |
|
|
30
|
+
| `argument-hint` optional | Plain string |
|
|
31
|
+
| `model` optional | One of `sonnet`, `opus`, `haiku`, `inherit` |
|
|
32
|
+
| Filename → command | Filename minus `.md` is lowercase alphanumeric + hyphens; produces `/<filename>` |
|
|
33
|
+
| Body non-empty | At least one non-blank line after frontmatter |
|
|
34
|
+
| No `commands` key in plugin.json | The plugin loader rejects any `commands` field with `commands: Invalid input`. Command files are auto-discovered from `<plugin>/commands/*.md`. If `plugin.json` declares a `commands` array (or any other shape), flag as `[FAIL]` and recommend deleting the key. Confirmed against `anthropics/claude-code` official plugins (`pr-review-toolkit`, `frontend-design`, `commit-commands`, `hookify`) — none declare `commands`. |
|
|
35
|
+
|
|
36
|
+
### Valid tool names (Claude Code ≥ 2.1.139)
|
|
37
|
+
|
|
38
|
+
`Bash`, `Read`, `Write`, `Edit`, `Glob`, `Grep`, `NotebookEdit`, `Task`, `Agent`, `Skill`, `AskUserQuestion`, `EnterWorktree`, `ExitWorktree`, `EnterPlanMode`, `ExitPlanMode`, `TodoWrite`, `TodoRead`, `TaskCreate`, `TaskUpdate`, `WebFetch`, `WebSearch`, plus any name with the `mcp__<server>__<tool>` prefix (treat unknown `mcp__*` names as `[WARN]`, not `[FAIL]`, because MCP names are dynamic).
|
|
39
|
+
|
|
40
|
+
Refresh this list when a new Claude Code major version ships. Source: docs.claude.com slash-commands page and `~/.claude/cache/changelog.md`.
|
|
41
|
+
|
|
42
|
+
## Best-Practice Checks
|
|
43
|
+
|
|
44
|
+
| Check | Rule |
|
|
45
|
+
|-------|------|
|
|
46
|
+
| `argument-hint` when needed | If body contains `$ARGUMENTS` or `$1`/`$2` etc., frontmatter must set `argument-hint` |
|
|
47
|
+
| Expected output documented | Body describes what the command produces (heuristic: contains `## Output`, `## Result`, or the words "produces" / "writes") |
|
|
48
|
+
| No broken skill refs | Body references to other skills via `superpowers:` or `Skill(...)` resolve to skills installed in this repo (best-effort) |
|
|
49
|
+
|
|
50
|
+
## How to Run
|
|
51
|
+
|
|
52
|
+
1. Discover all command files.
|
|
53
|
+
2. Parse YAML frontmatter if present.
|
|
54
|
+
3. Apply spec + best-practice tables.
|
|
55
|
+
4. Emit report:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
## Validation Results
|
|
59
|
+
|
|
60
|
+
### plugins/<plugin>/commands/<name>.md
|
|
61
|
+
- [PASS] <check>
|
|
62
|
+
- [FAIL] <check>: <details>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
5. Final tally: `Summary: <N> command files scanned. <P> pass, <F> fail.`
|
|
66
|
+
|
|
67
|
+
## References
|
|
68
|
+
|
|
69
|
+
- [Claude Code slash-command docs](https://docs.claude.com/en/docs/claude-code/slash-commands)
|
|
70
|
+
- Tool-list provenance: see `docs/superpowers/specs/2026-05-13-plugin-validation-skills-design.md` § Resolution 2
|
|
71
|
+
- Sibling skills: `validate-skills`, `validate-hooks`, `validate-agents`
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validate-hooks
|
|
3
|
+
description: Validates plugin hooks (plugin.json hooks field and any referenced hooks.json) in plugins/** against the Claude Code plugin spec. Use via /validate-hooks command.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Steven Hoang
|
|
7
|
+
tags: validation, linting, plugin-authoring, hooks
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Validate Hooks
|
|
11
|
+
|
|
12
|
+
Validate plugin hooks under `plugins/**` against the Claude Code plugin spec. Scope: `plugins/**` only — local-only `.claude/skills/` and `.claude/hooks/` are out of scope.
|
|
13
|
+
|
|
14
|
+
## Discovery
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
find plugins -name 'hooks.json'
|
|
18
|
+
find plugins -name 'plugin.json' -path '*/.claude-plugin/*'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Parse each `plugin.json`. If its `hooks` field is an inline object, validate inline. If its `hooks` field is a string path, that is a hard `[FAIL]` (see Spec Compliance below) — but still attempt to resolve and parse the referenced file for additional checks.
|
|
22
|
+
|
|
23
|
+
## Spec Compliance Checks
|
|
24
|
+
|
|
25
|
+
| Check | Rule |
|
|
26
|
+
|-------|------|
|
|
27
|
+
| `hooks` field shape | Must be an inline object. String-path form (`"hooks": "<path>"`) is rejected by the Claude Code plugin loader with `hooks: Invalid input`. Flag as `[FAIL]`. |
|
|
28
|
+
| Top-level event keys | One of: `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `Stop`, `SubagentStop`, `Notification`, `PreCompact`, `SessionStart`, `SessionEnd` |
|
|
29
|
+
| Event value | Array of matcher groups |
|
|
30
|
+
| Matcher group shape | `{ matcher: string, hooks: [...] }` |
|
|
31
|
+
| Hook entry shape | `{ type: "command"\|"prompt", command?: string, prompt?: string, timeout?: integer }` |
|
|
32
|
+
| Command path resolves | Resolves relative to plugin root, or uses `${CLAUDE_PROJECT_DIR}` / `${CLAUDE_PLUGIN_ROOT}` |
|
|
33
|
+
| Executable bit | Referenced shell script has `+x` |
|
|
34
|
+
| Regex compiles | Matcher value compiles as a Python `re` pattern |
|
|
35
|
+
|
|
36
|
+
## Best-Practice Checks
|
|
37
|
+
|
|
38
|
+
| Check | Rule |
|
|
39
|
+
|-------|------|
|
|
40
|
+
| No absolute user paths | Body of command does not contain `/Users/<name>/...` or `/home/<name>/...` |
|
|
41
|
+
| Timeout sane | `timeout` ≤ 60 unless inline comment justifies |
|
|
42
|
+
| Prompt-type targets exist | `prompt`-type hooks reference skills or commands that exist on disk |
|
|
43
|
+
|
|
44
|
+
## How to Run
|
|
45
|
+
|
|
46
|
+
1. Discover candidate files (see Discovery above).
|
|
47
|
+
2. For each, parse JSON and apply spec + best-practice checks.
|
|
48
|
+
3. Emit report:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
## Validation Results
|
|
52
|
+
|
|
53
|
+
### plugins/<plugin>/<file>
|
|
54
|
+
- [PASS] <check description>
|
|
55
|
+
- [FAIL] <check description>: <details>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
4. Final tally: `Summary: <N> hooks files scanned. <P> pass, <F> fail.`
|
|
59
|
+
|
|
60
|
+
## References
|
|
61
|
+
|
|
62
|
+
- [Claude Code plugin docs](https://docs.claude.com/en/docs/claude-code/plugins.md)
|
|
63
|
+
- Resolution evidence: see `docs/superpowers/specs/2026-05-13-plugin-validation-skills-design.md` § Resolution 1
|
|
64
|
+
- Sibling skills: `validate-skills`, `validate-agents`, `validate-commands`
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validate-skills
|
|
3
|
+
description: Validates skills in this repo against agentskills.io spec and Claude Code best practices. Use via /validate-skills command.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Callstack
|
|
7
|
+
upstream: https://github.com/callstackincubator/agent-skills
|
|
8
|
+
tags: validation, linting, skill-authoring
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Validate Skills
|
|
12
|
+
|
|
13
|
+
Validate all skills in this repo against the agentskills.io spec and Claude Code best practices.
|
|
14
|
+
|
|
15
|
+
## Validation Checklist
|
|
16
|
+
|
|
17
|
+
For each skill directory, verify:
|
|
18
|
+
|
|
19
|
+
### Spec Compliance (agentskills.io)
|
|
20
|
+
|
|
21
|
+
| Check | Rule |
|
|
22
|
+
|-------|------|
|
|
23
|
+
| `name` format | 1-64 chars, lowercase alphanumeric + hyphens, no leading/trailing/consecutive hyphens |
|
|
24
|
+
| `name` matches directory | Directory name must equal `name` field |
|
|
25
|
+
| `description` length | 1-1024 characters, non-empty |
|
|
26
|
+
| Optional fields valid | `license`, `metadata`, `compatibility` if present |
|
|
27
|
+
| `skills` key in plugin.json | If `plugin.json` declares `skills`, it must be a string directory path (e.g. `"./skills/"`). Array-of-paths form is unverified and likely rejected by the loader — flag as `[WARN]` and recommend either a string path or omitting the key entirely (skills are auto-discovered from `<plugin>/skills/*/SKILL.md`). Reference: `context-mode` plugin uses `"skills": "./skills/"`; Anthropic official plugins omit the key. |
|
|
28
|
+
|
|
29
|
+
### Best Practices (Claude Code)
|
|
30
|
+
|
|
31
|
+
| Check | Rule |
|
|
32
|
+
|-------|------|
|
|
33
|
+
| Description format | Third person, describes what + when to use |
|
|
34
|
+
| Body length | Under 500 lines |
|
|
35
|
+
| References one-level deep | No nested reference chains |
|
|
36
|
+
| Links are markdown | Use `[text](path)` not bare filenames |
|
|
37
|
+
| No redundancy | Don't repeat description in body |
|
|
38
|
+
| Concise | Only add context Claude doesn't already have |
|
|
39
|
+
|
|
40
|
+
## How to Run
|
|
41
|
+
|
|
42
|
+
1. Find all skill directories under `plugins/`:
|
|
43
|
+
```bash
|
|
44
|
+
fd -t f -g 'SKILL.md' plugins/
|
|
45
|
+
```
|
|
46
|
+
(Per project memory: scope is `plugins/**` only — skip `.claude/skills/`.)
|
|
47
|
+
|
|
48
|
+
2. Parse each `plugins/*/.claude-plugin/plugin.json`. If `skills` key is present and not a string path (e.g., array of paths), emit `[WARN]` for that plugin with recommendation to switch to `"./skills/"` or omit.
|
|
49
|
+
|
|
50
|
+
3. For each `SKILL.md`, read it and check against the rules above.
|
|
51
|
+
|
|
52
|
+
3. Report issues in this format:
|
|
53
|
+
```
|
|
54
|
+
## Validation Results
|
|
55
|
+
|
|
56
|
+
### plugins/<plugin>/skills/<skill>
|
|
57
|
+
- [PASS] name format valid
|
|
58
|
+
- [FAIL] name "example" doesn't match directory "example-skill"
|
|
59
|
+
- [PASS] description length OK (156 chars)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## References
|
|
63
|
+
|
|
64
|
+
- [agentskills.io spec](https://agentskills.io/specification)
|
|
65
|
+
- [Claude Code best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
|
|
66
|
+
- Upstream: [callstackincubator/agent-skills](https://github.com/callstackincubator/agent-skills)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-superpower",
|
|
3
3
|
"displayName": "Team Superpower",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"description": "Coordination layer that runs the obra/superpowers skill chain across a Claude Code agent team — one /team-feature command takes an idea through brainstorming, plan, TDD implementation, review, and finish with at most 4 owner touchpoints.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Steven Hoang"
|