skilldrop-cli 0.12.2 → 0.13.0
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 +22 -4
- package/bin/skilldrop.js +56 -1
- package/model-routing.json +254 -63
- package/package.json +1 -1
- package/packs.json +24 -2
- package/skills/contribution-wizard/SKILL.md +132 -0
- package/skills/contribution-wizard/manifest.json +11 -0
- package/skills/eval-harness-generator/SKILL.md +84 -0
- package/skills/eval-harness-generator/manifest.json +11 -0
- package/skills/prompt-caching-advisor/SKILL.md +90 -0
- package/skills/prompt-caching-advisor/manifest.json +11 -0
- package/skills/token-budget-estimator/SKILL.md +75 -0
- package/skills/token-budget-estimator/manifest.json +11 -0
- package/skills/tool-use-schema-writer/SKILL.md +111 -0
- package/skills/tool-use-schema-writer/manifest.json +11 -0
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/skilldrop-cli)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
|
|
6
|
-
**[Browse the catalogue →](https://sananthanarayan.github.io/skilldrop/)** — all
|
|
6
|
+
**[Browse the catalogue →](https://sananthanarayan.github.io/skilldrop/)** — all 62 skills, filterable by outcome, pack, tag, and model tier.
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**62 portable AI-agent skills for the deliverables knowledge workers actually ship** — diagrams, design docs, ADRs, PRDs, runbooks, decks, decision logs, threat models, adversarial reviews — installable into **Claude Code**, **Cursor**, **Kiro**, **Codex**, **GitHub Copilot**, and any AI tool that accepts custom instructions, one skill or one role-based pack at a time:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
npx skilldrop-cli install --pack product-manager # or: solution-architect, dev-team,
|
|
12
|
-
npx skilldrop-cli list # sre-oncall, stakeholder-comms, ai-engineering
|
|
12
|
+
npx skilldrop-cli list # sre-oncall, stakeholder-comms, ai-engineering, claude-api
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Originally scoped to solution architects, now broadly useful to PMs, founders, consultants, engineering leaders, exec assistants — anyone who turns ideas into stakeholder-ready artifacts.
|
|
@@ -308,6 +308,23 @@ Designing the agentic systems themselves — the loops, orchestrations, and budg
|
|
|
308
308
|
| [`ai-usage-report`](skills/ai-usage-report/SKILL.md) | Turn a CSV/JSONL of AI usage events (exported from an MCP server or other telemetry source) into a per-user, team-rollup, or effectiveness-focused report. Surfaces volume, breadth, session depth, and — where the data supports it — whether AI outputs were actually consumed in shipped artifacts vs generated and discarded (the "AI theater" question). Refuses to generate an aggregate rollup for teams smaller than 5 to preserve anonymity. |
|
|
309
309
|
| [`llm-eval-harness`](skills/llm-eval-harness/SKILL.md) | Design the **dev-loop quality gate** for an LLM-powered feature (prompt, RAG, agent, classifier) — so prompt and model changes ship on numbers, not vibes. A versioned golden set in three deliberate buckets (representative from real logs, adversarial/edge, and regression cases frozen from every past failure); the **cheapest adequate grading method per case** (programmatic → structured assertions → LLM-as-judge only when quality is genuinely subjective, and then validated against human labels with bias controls); a metric matched to the task with **both gates set before the first run** (no-regression + critical-subset-at-100%); a failure taxonomy that points iteration at the biggest bucket; and cost/latency tracked beside quality. Enforces the held-out split and the no-tuning-on-test rule. Provider-neutral. |
|
|
310
310
|
|
|
311
|
+
### Claude API
|
|
312
|
+
|
|
313
|
+
Skills for teams building directly on the Anthropic API — prompt caching strategy, token budgeting, eval generation for skills, and tool-use schema authoring.
|
|
314
|
+
|
|
315
|
+
| Skill | What it does |
|
|
316
|
+
|---|---|
|
|
317
|
+
| [`prompt-caching-advisor`](skills/prompt-caching-advisor/SKILL.md) | Analyzes a prompt or conversation structure and identifies the highest-value `cache_control` breakpoints — which blocks to cache, where to place the checkpoint, and estimated hit rate. Warns when a cacheable block is below the minimum threshold (~1,024 tokens for Haiku, ~2,048 for Sonnet/Opus). Produces an annotated messages array and a one-paragraph cache strategy summary. |
|
|
318
|
+
| [`token-budget-estimator`](skills/token-budget-estimator/SKILL.md) | Breaks down token usage for an agentic workflow by component — system prompt, injected context, tool definitions, tool results, context accumulation, and output — surfaces the dominant cost driver, and recommends concrete `max_tokens` controls. Covers extended thinking (`budget_tokens`) when relevant. |
|
|
319
|
+
| [`eval-harness-generator`](skills/eval-harness-generator/SKILL.md) | Takes a SKILL.md and generates 8–12 eval cases (happy path, edge, anti-pattern, refusal) ready to drop into `skills/<name>/evals/cases.json`. Each case has a realistic trigger, checkable `expected_shape` criteria, and `must_not_include` guards from the skill's own quality bar. |
|
|
320
|
+
| [`tool-use-schema-writer`](skills/tool-use-schema-writer/SKILL.md) | Converts a function description into a valid Anthropic `tool_use` JSON schema with typed properties, required arrays, and decision-condition descriptions. Validates that required arrays are present and enum values are described. Produces a Python `client.messages.create(tools=[...])` usage snippet. |
|
|
321
|
+
|
|
322
|
+
### Skill authoring
|
|
323
|
+
|
|
324
|
+
| Skill | What it does |
|
|
325
|
+
|---|---|
|
|
326
|
+
| [`contribution-wizard`](skills/contribution-wizard/SKILL.md) | Guides an author through creating a new skilldrop skill from scratch — single-block intake, then one response generating the manifest, SKILL.md, 8 eval cases, README row, and packs.json addition. Enforces schema compliance and names the `python3 validate.py` check as the gate before opening a PR. |
|
|
327
|
+
|
|
311
328
|
### Stakeholder communication
|
|
312
329
|
|
|
313
330
|
| Skill | What it does |
|
|
@@ -381,6 +398,7 @@ Categories (above) say what a skill *is*; packs say *who needs it*. [`packs.json
|
|
|
381
398
|
| `ai-engineering` | 12 | Build and run AI systems: agent loop design, subagent orchestration, spend budgets, eval harnesses, usage reporting, data contracts |
|
|
382
399
|
| `stakeholder-comms` | 9 | Non-technical audiences: audience profiling, deck outlines and real `.pptx` decks, exec summaries, decision logs, guides |
|
|
383
400
|
| `sre-oncall` | 5 | Operate the service: runbooks, observability design, incident comms, postmortems, capacity/cost models |
|
|
401
|
+
| `claude-api` | 4 | Build on the Anthropic API: prompt caching strategy, token budgeting, eval generation for skills, tool-use schema writing |
|
|
384
402
|
|
|
385
403
|
```bash
|
|
386
404
|
python3 pack.py # list packs
|
|
@@ -448,7 +466,7 @@ skilldrop is also a **Claude Code plugin marketplace** — one marketplace, seve
|
|
|
448
466
|
Then take the whole catalogue, or just your role's pack:
|
|
449
467
|
|
|
450
468
|
```text
|
|
451
|
-
/plugin install skilldrop@skilldrop # all
|
|
469
|
+
/plugin install skilldrop@skilldrop # all 62 skills + 3 reviewer subagents
|
|
452
470
|
/plugin install solution-architect@skilldrop # 17 skills
|
|
453
471
|
/plugin install dev-team@skilldrop # 14 skills + the 3 reviewer subagents
|
|
454
472
|
/plugin install product-manager@skilldrop # 13 skills
|
package/bin/skilldrop.js
CHANGED
|
@@ -40,6 +40,8 @@ Usage:
|
|
|
40
40
|
skilldrop loops [--from <src>] loops — sequenced stages over skills (RFC-0028)
|
|
41
41
|
skilldrop install <skill...> install skills (default: Claude Code, user scope)
|
|
42
42
|
skilldrop install --pack <name> install a whole pack
|
|
43
|
+
skilldrop install --profile <name> install a named bundle of packs, agents, and loops
|
|
44
|
+
skilldrop profiles [--from <src>] list available profiles
|
|
43
45
|
skilldrop install --all install every skill in the catalog
|
|
44
46
|
skilldrop install --agent <name...> install reviewer subagents (RFC-0012)
|
|
45
47
|
skilldrop install --loop <name...> install loops + the stage skills they sequence
|
|
@@ -262,6 +264,10 @@ function packsOf(cat) {
|
|
|
262
264
|
const p = path.join(cat.dir, "packs.json");
|
|
263
265
|
return fs.existsSync(p) ? readJSON(p).packs : null;
|
|
264
266
|
}
|
|
267
|
+
function profilesOf(cat) {
|
|
268
|
+
const p = path.join(cat.dir, "profiles.json");
|
|
269
|
+
return fs.existsSync(p) ? readJSON(p).profiles : null;
|
|
270
|
+
}
|
|
265
271
|
|
|
266
272
|
/* Structural gate (RFC-0003): a skill must pass before it is copied anywhere. */
|
|
267
273
|
function checkSkill(cat, s) {
|
|
@@ -744,8 +750,57 @@ function installPanel(args) {
|
|
|
744
750
|
console.log(`Codex / Antigravity multi-agent runners), and sweeps the lenses inline otherwise. Per-tool: agents/README.md.`);
|
|
745
751
|
}
|
|
746
752
|
|
|
753
|
+
function listProfiles(args) {
|
|
754
|
+
const cat = resolveCatalog(args.flags.from);
|
|
755
|
+
const ps = profilesOf(cat);
|
|
756
|
+
if (args.flags.json)
|
|
757
|
+
return emitJSON({
|
|
758
|
+
catalog: cat.source,
|
|
759
|
+
count: ps ? Object.keys(ps).length : 0,
|
|
760
|
+
profiles: Object.entries(ps || {}).map(([name, p]) => ({
|
|
761
|
+
name, description: p.description || null,
|
|
762
|
+
packs: p.packs || [], agents: p.agents || [], loops: p.loops || [],
|
|
763
|
+
})),
|
|
764
|
+
});
|
|
765
|
+
if (!ps) return console.log(`catalog '${cat.source}' defines no profiles.`);
|
|
766
|
+
const w = Math.max(...Object.keys(ps).map((n) => n.length));
|
|
767
|
+
for (const [n, p] of Object.entries(ps))
|
|
768
|
+
console.log(`${n.padEnd(w)} ${p.description}`);
|
|
769
|
+
console.log("\nInstall one: skilldrop install --profile <name>");
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
function installProfile(args) {
|
|
773
|
+
const name = args.flags.profile;
|
|
774
|
+
const cat = resolveCatalog(args.flags.from);
|
|
775
|
+
const profiles = profilesOf(cat);
|
|
776
|
+
if (!profiles) die(`catalog '${cat.source}' has no profiles.json`);
|
|
777
|
+
const p = profiles[name];
|
|
778
|
+
if (!p) die(`unknown profile '${name}' — available: ${Object.keys(profiles).join(", ")}`);
|
|
779
|
+
|
|
780
|
+
console.log(`Installing profile '${name}': ${p.description}\n`);
|
|
781
|
+
const flags = Object.assign({}, args.flags);
|
|
782
|
+
delete flags.profile;
|
|
783
|
+
|
|
784
|
+
for (const pack of (p.packs || [])) {
|
|
785
|
+
console.log(`\n── pack: ${pack} ──`);
|
|
786
|
+
install({ _: [], flags: Object.assign({}, flags, { pack }) });
|
|
787
|
+
}
|
|
788
|
+
for (const loop of (p.loops || [])) {
|
|
789
|
+
if (loopsIn(cat).includes(loop)) {
|
|
790
|
+
console.log(`\n── loop: ${loop} ──`);
|
|
791
|
+
installLoops({ _: [loop], flags: Object.assign({}, flags, { loop: true }) });
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
if ((p.agents || []).length) {
|
|
795
|
+
console.log(`\n── agents: ${p.agents.join(", ")} ──`);
|
|
796
|
+
installAgents({ _: p.agents.slice(), flags: Object.assign({}, flags, { agent: true }) });
|
|
797
|
+
}
|
|
798
|
+
console.log(`\nProfile '${name}' installed.`);
|
|
799
|
+
}
|
|
800
|
+
|
|
747
801
|
function install(args) {
|
|
748
802
|
if (args.flags.panel) return installPanel(args);
|
|
803
|
+
if (args.flags.profile) return installProfile(args);
|
|
749
804
|
if (args.flags.loop) return installLoops(args);
|
|
750
805
|
if (args.flags.agent) return installAgents(args);
|
|
751
806
|
const cat = resolveCatalog(args.flags.from);
|
|
@@ -1192,7 +1247,7 @@ function bootstrap() {
|
|
|
1192
1247
|
|
|
1193
1248
|
const args = parseArgs(process.argv.slice(2));
|
|
1194
1249
|
const cmd = args._.shift();
|
|
1195
|
-
const commands = { list, info, packs: listPacks, agents: listAgents, loops: listLoops, install, update, outdated, uninstall, validate: validateCmd, scan, bootstrap };
|
|
1250
|
+
const commands = { list, info, packs: listPacks, profiles: listProfiles, agents: listAgents, loops: listLoops, install, update, outdated, uninstall, validate: validateCmd, scan, bootstrap };
|
|
1196
1251
|
if (!cmd || cmd === "help" || args.flags.help) console.log(HELP);
|
|
1197
1252
|
else if (commands[cmd]) commands[cmd](args);
|
|
1198
1253
|
else die(`unknown command '${cmd}' — run: skilldrop help`);
|
package/model-routing.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "Provider-neutral, cost-aware model routing for skilldrop skills. Skills declare an ABSTRACT tier (light/standard/heavy) describing how much reasoning the task needs. The `providers` map resolves that tier to a concrete model for whatever tool you use (Claude Code, Cursor, Codex, Kiro, ...). Set `active_provider` to your tool. Tier is decided ONCE per skill (the decision is stable), not re-derived per call
|
|
2
|
+
"$comment": "Provider-neutral, cost-aware model routing for skilldrop skills. Skills declare an ABSTRACT tier (light/standard/heavy) describing how much reasoning the task needs. The `providers` map resolves that tier to a concrete model for whatever tool you use (Claude Code, Cursor, Codex, Kiro, ...). Set `active_provider` to your tool. Tier is decided ONCE per skill (the decision is stable), not re-derived per call \u2014 that keeps routing free. Runtime heuristics in `escalation_rules` handle the cases that actually vary.",
|
|
3
3
|
"version": "0.2.0",
|
|
4
4
|
"active_provider": "claude-code",
|
|
5
5
|
"tiers": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"standard": "<your default model>",
|
|
35
35
|
"heavy": "<your most capable model>"
|
|
36
36
|
},
|
|
37
|
-
"select_via": "Pick the model in the chat/composer model dropdown before invoking the skill. Cursor rules cannot switch models programmatically
|
|
37
|
+
"select_via": "Pick the model in the chat/composer model dropdown before invoking the skill. Cursor rules cannot switch models programmatically \u2014 this is a manual lookup.",
|
|
38
38
|
"automation": null,
|
|
39
39
|
"note": "Cursor exposes whatever models your plan enables (Claude, GPT, Gemini). Fill in the three you actually use."
|
|
40
40
|
},
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"select_via": "Set the model via the Codex `--model` flag or its config before running the skill.",
|
|
49
49
|
"automation": null,
|
|
50
|
-
"note": "Fill in with the model identifiers your Codex install accepts. Model names change
|
|
50
|
+
"note": "Fill in with the model identifiers your Codex install accepts. Model names change \u2014 verify against `codex --help` / your config."
|
|
51
51
|
},
|
|
52
52
|
"kiro": {
|
|
53
53
|
"label": "Kiro",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"escalation_rules": [
|
|
74
74
|
{
|
|
75
75
|
"id": "large-input",
|
|
76
|
-
"rule": "Escalate one tier (light
|
|
76
|
+
"rule": "Escalate one tier (light\u2192standard, standard\u2192heavy) when the input the skill must reason over exceeds ~30 pages / ~20k words / ~15 source files. Large context degrades small models faster than large ones.",
|
|
77
77
|
"type": "heuristic_no_llm"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"id": "downgrade-trivial",
|
|
91
|
-
"rule": "Downgrade one tier (never below 'light', never below the skill's declared floor) when the input is tiny and templated
|
|
91
|
+
"rule": "Downgrade one tier (never below 'light', never below the skill's declared floor) when the input is tiny and templated \u2014 e.g. a one-paragraph brief into adr-generator, a 3-line note into decision-log.",
|
|
92
92
|
"type": "heuristic_no_llm"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
@@ -98,62 +98,253 @@
|
|
|
98
98
|
}
|
|
99
99
|
],
|
|
100
100
|
"skills": {
|
|
101
|
-
"audience-profile": {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
"
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
"
|
|
101
|
+
"audience-profile": {
|
|
102
|
+
"tier": "light",
|
|
103
|
+
"rationale": "Maps a fixed set of audience archetypes to structural rules. Lookup against a rubric, not synthesis."
|
|
104
|
+
},
|
|
105
|
+
"decision-log": {
|
|
106
|
+
"tier": "light",
|
|
107
|
+
"rationale": "Extracts decisions/owners/dates from notes. Pattern extraction; escalate on long transcripts via large-input rule."
|
|
108
|
+
},
|
|
109
|
+
"sonar-onboard": {
|
|
110
|
+
"tier": "light",
|
|
111
|
+
"rationale": "Scaffolds config from detected language + a template. Deterministic fill-in; little judgment."
|
|
112
|
+
},
|
|
113
|
+
"adr-generator": {
|
|
114
|
+
"tier": "standard",
|
|
115
|
+
"rationale": "Structures a decision into MADR/Nygard. Some judgment on title/consequences; not adversarial."
|
|
116
|
+
},
|
|
117
|
+
"architecture-diagrams": {
|
|
118
|
+
"tier": "standard",
|
|
119
|
+
"rationale": "Translates prose to diagram syntax. Correctness matters; reasoning is bounded."
|
|
120
|
+
},
|
|
121
|
+
"brief-intake": {
|
|
122
|
+
"tier": "standard",
|
|
123
|
+
"rationale": "Extraction + tagging [explicit]/[implied]/[inferred]. The tagging needs care \u2014 above light, below heavy."
|
|
124
|
+
},
|
|
125
|
+
"deck-builder": {
|
|
126
|
+
"tier": "standard",
|
|
127
|
+
"rationale": "Shapes content, maps a brand template's layouts, and runs a script. Judgment, not hard reasoning."
|
|
128
|
+
},
|
|
129
|
+
"design-doc": {
|
|
130
|
+
"tier": "standard",
|
|
131
|
+
"rationale": "Synthesizes a design doc from a brief. Escalate to heavy via large-input or ambiguous-input when alternatives are genuinely contested."
|
|
132
|
+
},
|
|
133
|
+
"exec-summary": {
|
|
134
|
+
"tier": "standard",
|
|
135
|
+
"rationale": "Compression to one page. Needs to keep the right signal; escalate on very long source docs."
|
|
136
|
+
},
|
|
137
|
+
"figma-diagrams": {
|
|
138
|
+
"tier": "standard",
|
|
139
|
+
"rationale": "API calls + spec generation. Bounded transformation."
|
|
140
|
+
},
|
|
141
|
+
"guide-builder": {
|
|
142
|
+
"tier": "standard",
|
|
143
|
+
"rationale": "Shapes notes into a styled guide. Generation, not adversarial review."
|
|
144
|
+
},
|
|
145
|
+
"reverse-architecture": {
|
|
146
|
+
"tier": "standard",
|
|
147
|
+
"rationale": "Extracts architecture from code/IaC. Escalate to heavy on large codebases where cross-file inference is heavy."
|
|
148
|
+
},
|
|
149
|
+
"runbook-generator": {
|
|
150
|
+
"tier": "standard",
|
|
151
|
+
"rationale": "Operational doc from service facts. Bounded synthesis."
|
|
152
|
+
},
|
|
153
|
+
"slide-outliner": {
|
|
154
|
+
"tier": "standard",
|
|
155
|
+
"rationale": "Outlines a deck to a time budget. Structuring, not deep reasoning."
|
|
156
|
+
},
|
|
157
|
+
"sonar-review": {
|
|
158
|
+
"tier": "standard",
|
|
159
|
+
"rationale": "Formats Sonar API findings into a report. The hard analysis is Sonar's; this is synthesis. Escalate on very large diffs."
|
|
160
|
+
},
|
|
161
|
+
"ai-usage-report": {
|
|
162
|
+
"tier": "standard",
|
|
163
|
+
"rationale": "Tabulates telemetry into a report. Mostly mechanical, but the 'AI theater' effectiveness call needs judgment."
|
|
164
|
+
},
|
|
165
|
+
"ai-readiness-assessment": {
|
|
166
|
+
"tier": "standard",
|
|
167
|
+
"rationale": "Scores six fixed dimensions against a rubric and ranks gaps by blocking order. Bounded structured judgment, not adversarial reasoning; escalate via ambiguous-input when the evidence is thin or contested."
|
|
168
|
+
},
|
|
169
|
+
"agent-adoption-stage": {
|
|
170
|
+
"tier": "standard",
|
|
171
|
+
"rationale": "Places a team on a fixed 5-stage ladder from observables and routes one unlock. Bounded diagnosis against a rubric; escalate via ambiguous-input when the observables are contradictory or the distribution is heavily skewed."
|
|
172
|
+
},
|
|
173
|
+
"ai-use-case-triage": {
|
|
174
|
+
"tier": "standard",
|
|
175
|
+
"rationale": "Scores candidates on weighted axes and forces a rejection list. Structured comparison with stated weights; escalate via ambiguous-input when candidates are numerous or the value data is contested."
|
|
176
|
+
},
|
|
177
|
+
"ai-adoption-rollout": {
|
|
178
|
+
"tier": "standard",
|
|
179
|
+
"rationale": "Generates a phased people-rollout with gates and enablement from a stated tool and population. Structured planning against a fixed shape; escalate via ambiguous-input for large or politically contested rollouts."
|
|
180
|
+
},
|
|
181
|
+
"ai-usage-policy": {
|
|
182
|
+
"tier": "standard",
|
|
183
|
+
"rationale": "Drafts a policy document against a fixed structure (tiers, behaviours, review matrix, exception route). Bounded generation; escalate via ambiguous-input where a regulatory regime is named or contested."
|
|
184
|
+
},
|
|
185
|
+
"feature-implement-loop": {
|
|
186
|
+
"tier": "standard",
|
|
187
|
+
"rationale": "Code + test generation against acceptance criteria. The adversarial pass delegates to devils-advocate (heavy) where available; the loop itself is generation."
|
|
188
|
+
},
|
|
189
|
+
"pre-merge-review": {
|
|
190
|
+
"tier": "standard",
|
|
191
|
+
"rationale": "Orchestration: runs a deterministic gate script, dispatches the (heavy) reviewer subagents, and renders a rule-based go/no-go. The adversarial reasoning is delegated to the panel, so the skill itself is coordination."
|
|
192
|
+
},
|
|
193
|
+
"user-story-splitter": {
|
|
194
|
+
"tier": "standard",
|
|
195
|
+
"rationale": "Decomposes an epic into INVEST slices with testable ACs. Structured synthesis; escalation rules cover large or contradictory PRDs."
|
|
196
|
+
},
|
|
197
|
+
"test-plan-generator": {
|
|
198
|
+
"tier": "standard",
|
|
199
|
+
"rationale": "Synthesizes a structured plan from a change description. Risk ranking needs judgment but is bounded; escalate via ambiguous-input on contested or high-stakes releases."
|
|
200
|
+
},
|
|
201
|
+
"release-notes": {
|
|
202
|
+
"tier": "standard",
|
|
203
|
+
"rationale": "Classifies commits and rewrites them for a reader. The audience translation needs judgment; escalate via large-input on very long ranges."
|
|
204
|
+
},
|
|
205
|
+
"postmortem-generator": {
|
|
206
|
+
"tier": "standard",
|
|
207
|
+
"rationale": "Synthesizes a structured doc from incident notes. Contributing-factor chains need judgment but are bounded; escalate via large-input on huge scrollbacks."
|
|
208
|
+
},
|
|
209
|
+
"migration-plan": {
|
|
210
|
+
"tier": "standard",
|
|
211
|
+
"rationale": "Phased plan synthesis with a strong template. Ordering judgment is bounded by the expand/migrate/contract pattern; escalate via ambiguous-input on contested, high-stakes cutovers."
|
|
212
|
+
},
|
|
213
|
+
"api-contract-draft": {
|
|
214
|
+
"tier": "standard",
|
|
215
|
+
"rationale": "Schema synthesis against fixed conventions. The resource modeling needs judgment; the conventions bound it. Escalate via ambiguous-input on contested multi-team contracts."
|
|
216
|
+
},
|
|
217
|
+
"bug-triage": {
|
|
218
|
+
"tier": "standard",
|
|
219
|
+
"rationale": "Extraction plus judgment calls (severity vs priority, hypothesis ranking) \u2014 same shape as brief-intake: above light, below heavy."
|
|
220
|
+
},
|
|
221
|
+
"prd-draft": {
|
|
222
|
+
"tier": "standard",
|
|
223
|
+
"rationale": "Synthesizes a structured requirements doc from a brief. The solution-language discipline needs care; bounded by the template. Escalate via ambiguous-input on contested scope."
|
|
224
|
+
},
|
|
225
|
+
"nfr-spec": {
|
|
226
|
+
"tier": "standard",
|
|
227
|
+
"rationale": "Rubric-driven sweep with archetype defaults; the judgment is calibrating targets to business reality. Bounded by the catalog; escalate via ambiguous-input on contested SLOs."
|
|
228
|
+
},
|
|
229
|
+
"success-metrics": {
|
|
230
|
+
"tier": "standard",
|
|
231
|
+
"rationale": "Structured measurement design; the primary-metric and counter-metric choices need judgment but the template bounds it. Escalate via ambiguous-input when the goal itself is contested."
|
|
232
|
+
},
|
|
233
|
+
"requirements-interview": {
|
|
234
|
+
"tier": "standard",
|
|
235
|
+
"rationale": "Question banks are rubric-shaped, but ranking by design impact and deriving falsification conditions for the specific feature is synthesis \u2014 above light."
|
|
236
|
+
},
|
|
237
|
+
"business-case": {
|
|
238
|
+
"tier": "heavy",
|
|
239
|
+
"rationale": "Weighted multi-option judgment with a committal recommendation \u2014 same failure mode as tech-comparison-matrix: cheaper models mis-weight costs, inflate benefits, and miss the flip-assumption. Never downgrade."
|
|
240
|
+
},
|
|
241
|
+
"incident-comms": {
|
|
242
|
+
"tier": "standard",
|
|
243
|
+
"rationale": "Audience-segmented message generation under a strict don't-retract discipline. Same shape as exec-summary/audience-profile \u2014 translation and altitude, not adversarial reasoning."
|
|
244
|
+
},
|
|
245
|
+
"data-contract": {
|
|
246
|
+
"tier": "standard",
|
|
247
|
+
"rationale": "Schema + SLA synthesis against fixed quality dimensions and an evolution matrix. Semantics capture needs care; bounded by the catalog. Escalate via large-input on wide schemas."
|
|
248
|
+
},
|
|
249
|
+
"llm-eval-harness": {
|
|
250
|
+
"tier": "standard",
|
|
251
|
+
"rationale": "Methodology synthesis against a fixed decision tree and pitfall catalog. Grading-method and metric choices need judgment but are bounded; escalate via ambiguous-input on novel task types."
|
|
252
|
+
},
|
|
253
|
+
"capacity-cost-model": {
|
|
254
|
+
"tier": "standard",
|
|
255
|
+
"rationale": "Quantitative projection from a demand model against a fixed cost catalog. Headroom and scaling-cliff judgment is bounded by the reference; escalate via ambiguous-input on novel architectures."
|
|
256
|
+
},
|
|
257
|
+
"accessibility-audit": {
|
|
258
|
+
"tier": "heavy",
|
|
259
|
+
"rationale": "Adversarial review against WCAG success criteria \u2014 cheaper models fault alt-text presence over quality, under-call severity, miss focus-order/name-role-value issues, and claim AT passes from screenshots. Never downgrade."
|
|
260
|
+
},
|
|
261
|
+
"db-schema-design": {
|
|
262
|
+
"tier": "standard",
|
|
263
|
+
"rationale": "Design synthesis from access patterns against a fixed paradigm/indexing/anti-pattern reference. Paradigm and denormalization judgment is bounded; escalate via ambiguous-input on contested scale/consistency tradeoffs."
|
|
264
|
+
},
|
|
265
|
+
"observability-plan": {
|
|
266
|
+
"tier": "standard",
|
|
267
|
+
"rationale": "Methodology synthesis against fixed SRE practices (golden signals, burn-rate alerting, pillar split). SLO calibration needs judgment but is bounded; escalate via ambiguous-input on contested reliability targets."
|
|
268
|
+
},
|
|
269
|
+
"council-review": {
|
|
270
|
+
"tier": "heavy",
|
|
271
|
+
"rationale": "Multi-perspective deliberation + weighted reconciliation across distinct expert seats. Cheaper models collapse the seats into one voice and either manufacture or miss the real cruxes. Never downgrade."
|
|
272
|
+
},
|
|
273
|
+
"devils-advocate": {
|
|
274
|
+
"tier": "heavy",
|
|
275
|
+
"rationale": "Adversarial code review across four lenses. Cheaper models miss edge cases and under-call severity \u2014 the whole value is the hard thinking. Never downgrade."
|
|
276
|
+
},
|
|
277
|
+
"output-hygiene": {
|
|
278
|
+
"tier": "standard",
|
|
279
|
+
"rationale": "The mechanical pass is a deterministic script; the model does bounded rewriting of flagged prose against a fixed tell list, not adversarial review."
|
|
280
|
+
},
|
|
281
|
+
"doc-critique": {
|
|
282
|
+
"tier": "heavy",
|
|
283
|
+
"rationale": "Adversarial doc review against rubrics. Same as devils-advocate: the value is catching what a fast pass misses. Never downgrade."
|
|
284
|
+
},
|
|
285
|
+
"tech-comparison-matrix": {
|
|
286
|
+
"tier": "heavy",
|
|
287
|
+
"rationale": "Weighted multi-criteria judgment with a recommendation. Mis-weighting is the failure mode; heavy is worth it. Never downgrade."
|
|
288
|
+
},
|
|
289
|
+
"threat-model": {
|
|
290
|
+
"tier": "heavy",
|
|
291
|
+
"rationale": "Adversarial reasoning over a design \u2014 cheaper models emit checklist residue, miss authz/insider paths, and inflate severity. Never downgrade."
|
|
292
|
+
},
|
|
293
|
+
"prfaq": {
|
|
294
|
+
"tier": "standard",
|
|
295
|
+
"rationale": "Synthesizes a press release and FAQs from a product concept against a fixed format. The specificity discipline needs care but the template bounds it; escalate via ambiguous-input when the concept itself is contested."
|
|
296
|
+
},
|
|
297
|
+
"okr-cascade": {
|
|
298
|
+
"tier": "standard",
|
|
299
|
+
"rationale": "Structured derivation against a fixed roll-up discipline; the causal-sentence and gap judgments need care but the template bounds them. Escalate via ambiguous-input when the company objectives themselves are contested."
|
|
300
|
+
},
|
|
301
|
+
"user-journey-map": {
|
|
302
|
+
"tier": "standard",
|
|
303
|
+
"rationale": "Structured synthesis into a fixed four-row stage model plus bounded ranking judgment. Escalate via ambiguous-input when the persona or outcome is contested or research inputs conflict."
|
|
304
|
+
},
|
|
305
|
+
"strategy-analysis": {
|
|
306
|
+
"tier": "heavy",
|
|
307
|
+
"rationale": "Framework selection plus evidenced multi-factor judgment ending in a ranked, committal verdict. Cheaper models fill cells with generic filler, skip the TOWS crossings, and refuse to take a side. Never downgrade."
|
|
308
|
+
},
|
|
309
|
+
"agent-loop-design": {
|
|
310
|
+
"tier": "standard",
|
|
311
|
+
"rationale": "Design synthesis against a fixed state-machine pattern and exit-criteria catalog. The gate-placement judgment is bounded by the blast-radius rule; escalate via ambiguous-input when the task itself is contested."
|
|
312
|
+
},
|
|
313
|
+
"subagent-design": {
|
|
314
|
+
"tier": "standard",
|
|
315
|
+
"rationale": "Design synthesis against a fixed topology catalog and role-card template. The fan-out-or-refuse judgment is bounded by the three-reasons rule; escalate via ambiguous-input on genuinely novel workflow shapes."
|
|
316
|
+
},
|
|
317
|
+
"agent-budget": {
|
|
318
|
+
"tier": "standard",
|
|
319
|
+
"rationale": "Quantitative spec synthesis against a fixed tier vocabulary and degradation ladder. Cap-setting judgment is bounded by the 3-5x rule; escalate via ambiguous-input when the workflow itself is undefined."
|
|
320
|
+
},
|
|
321
|
+
"agents-md-generator": {
|
|
322
|
+
"tier": "standard",
|
|
323
|
+
"rationale": "Repo inspection plus synthesis against a fixed section order and line budget \u2014 the same shape as reverse-architecture. The judgment is the counterfactual test on each convention line, which is bounded; escalate via large-input on monorepos."
|
|
324
|
+
},
|
|
325
|
+
"agent-threat-model": {
|
|
326
|
+
"tier": "heavy",
|
|
327
|
+
"rationale": "Adversarial reasoning over a capability graph \u2014 the judgment is which mitigations are architectural versus theatrical, and that call is exactly where a weaker model produces a confident wrong answer. Never downgraded."
|
|
328
|
+
},
|
|
329
|
+
"prompt-caching-advisor": {
|
|
330
|
+
"tier": "standard",
|
|
331
|
+
"rationale": "Structural analysis of prompt with threshold arithmetic and pattern matching \u2014 above light, no need for heavy."
|
|
332
|
+
},
|
|
333
|
+
"token-budget-estimator": {
|
|
334
|
+
"tier": "standard",
|
|
335
|
+
"rationale": "Arithmetic breakdown plus heuristic judgment on dominant cost drivers \u2014 standard fits."
|
|
336
|
+
},
|
|
337
|
+
"eval-harness-generator": {
|
|
338
|
+
"tier": "standard",
|
|
339
|
+
"rationale": "Reads a SKILL.md and synthesizes eval cases \u2014 requires understanding of skill intent but not heavy reasoning."
|
|
340
|
+
},
|
|
341
|
+
"tool-use-schema-writer": {
|
|
342
|
+
"tier": "standard",
|
|
343
|
+
"rationale": "Schema generation from natural-language description \u2014 structured output task that fits standard tier."
|
|
344
|
+
},
|
|
345
|
+
"contribution-wizard": {
|
|
346
|
+
"tier": "standard",
|
|
347
|
+
"rationale": "Intake plus structured generation \u2014 standard tier covers template-filling and schema-adherence judgment."
|
|
348
|
+
}
|
|
158
349
|
}
|
|
159
|
-
}
|
|
350
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skilldrop-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Portable AI-agent skills for the deliverables knowledge workers ship \u2014 diagrams, ADRs, PRDs, runbooks, decks, reviews \u2014 installable into Claude Code, Cursor, Kiro, and any IDE that takes custom instructions. One command per skill or per role-based pack.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sanjay Ananthanarayan",
|
package/packs.json
CHANGED
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
"sonar-onboard",
|
|
62
62
|
"sonar-review",
|
|
63
63
|
"accessibility-audit",
|
|
64
|
-
"output-hygiene"
|
|
64
|
+
"output-hygiene",
|
|
65
|
+
"contribution-wizard"
|
|
65
66
|
]
|
|
66
67
|
},
|
|
67
68
|
"sre-oncall": {
|
|
@@ -107,6 +108,16 @@
|
|
|
107
108
|
"ai-usage-policy",
|
|
108
109
|
"agent-adoption-stage"
|
|
109
110
|
]
|
|
111
|
+
},
|
|
112
|
+
"claude-api": {
|
|
113
|
+
"description": "Skills for teams building on the Anthropic API — prompt caching, token budgeting, eval generation for skills, and tool-use schema writing.",
|
|
114
|
+
"loops": [],
|
|
115
|
+
"skills": [
|
|
116
|
+
"prompt-caching-advisor",
|
|
117
|
+
"token-budget-estimator",
|
|
118
|
+
"eval-harness-generator",
|
|
119
|
+
"tool-use-schema-writer"
|
|
120
|
+
]
|
|
110
121
|
}
|
|
111
122
|
},
|
|
112
123
|
"outcomes": {
|
|
@@ -159,7 +170,18 @@
|
|
|
159
170
|
"test-plan-generator",
|
|
160
171
|
"bug-triage",
|
|
161
172
|
"agents-md-generator",
|
|
162
|
-
"llm-eval-harness"
|
|
173
|
+
"llm-eval-harness",
|
|
174
|
+
"eval-harness-generator",
|
|
175
|
+
"contribution-wizard"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"build-on-the-claude-api": {
|
|
179
|
+
"description": "Skills for teams building directly on the Anthropic API — prompt caching strategy, token budgeting, eval generation, and tool-use schema writing.",
|
|
180
|
+
"skills": [
|
|
181
|
+
"prompt-caching-advisor",
|
|
182
|
+
"token-budget-estimator",
|
|
183
|
+
"eval-harness-generator",
|
|
184
|
+
"tool-use-schema-writer"
|
|
163
185
|
]
|
|
164
186
|
},
|
|
165
187
|
"run-and-recover-the-service": {
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: contribution-wizard
|
|
3
|
+
description: Guides an author through creating a new skilldrop skill from scratch — generates the manifest, SKILL.md, eval cases, and README entry from a plain-language description of the skill's purpose. Use when authoring a new skill for this repo or a private fork, ensuring a new skill meets the schema and validation requirements before submission.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# contribution-wizard
|
|
7
|
+
|
|
8
|
+
Walks an author through the full arc of creating a new skilldrop skill: intake → manifest + SKILL.md + evals + README entry. The output is copy-paste-ready — the author drops the files into `skills/<name>/` and runs `python3 validate.py` to confirm before opening a PR.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
### Step 1 — Intake (ask all at once)
|
|
13
|
+
|
|
14
|
+
Ask these questions in a single block — not one at a time:
|
|
15
|
+
|
|
16
|
+
> **New skill intake**
|
|
17
|
+
>
|
|
18
|
+
> 1. **Purpose**: what does this skill do in one sentence?
|
|
19
|
+
> 2. **Input**: what does the agent receive? (paste, file, structured data, conversational context)
|
|
20
|
+
> 3. **Output**: what does the agent produce? (artifact type, format, length)
|
|
21
|
+
> 4. **Pack**: which role pack does it belong to? (solution-architect / product-manager / dev-team / sre-oncall / stakeholder-comms / ai-engineering / claude-api / new pack)
|
|
22
|
+
> 5. **Is it a gate?** Does it emit a pass/fail verdict, or generate an artifact?
|
|
23
|
+
> 6. **Related skills**: which existing skills does it complement or hand off to?
|
|
24
|
+
> 7. **External deps**: does it need API keys, npm packages, or pip libraries?
|
|
25
|
+
|
|
26
|
+
### Step 2 — Generate all artifacts in one response
|
|
27
|
+
|
|
28
|
+
After intake, produce the following in a single response, each in its own fenced code block:
|
|
29
|
+
|
|
30
|
+
#### `manifest.json`
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"name": "<kebab-case-name>",
|
|
35
|
+
"version": "1.0.0",
|
|
36
|
+
"description": "<use-case-first description — what it does, then trigger phrases>",
|
|
37
|
+
"entrypoint": "SKILL.md",
|
|
38
|
+
"deps": { "npm": [], "pip": [] },
|
|
39
|
+
"env": { "required": [], "optional": [] },
|
|
40
|
+
"related": ["<related-skill-1>", "<related-skill-2>"],
|
|
41
|
+
"tags": ["<tag1>", "<tag2>"],
|
|
42
|
+
"model": {
|
|
43
|
+
"tier": "<light|standard|heavy>",
|
|
44
|
+
"rationale": "<one sentence: why this tier fits what the skill does>"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Tier guidance:
|
|
50
|
+
- **light**: pattern matching, formatting, extraction with no judgment calls
|
|
51
|
+
- **standard**: synthesis, judgment calls, structured output requiring reasoning (most skills)
|
|
52
|
+
- **heavy**: multi-step reasoning with high stakes or adversarial review (gates, threat models)
|
|
53
|
+
|
|
54
|
+
#### `SKILL.md`
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
---
|
|
58
|
+
name: <skill-name>
|
|
59
|
+
description: <same as manifest description>
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
# <skill-name>
|
|
63
|
+
|
|
64
|
+
<One paragraph: what this skill does and why it's useful. Name the problem it solves.>
|
|
65
|
+
|
|
66
|
+
## How to respond
|
|
67
|
+
|
|
68
|
+
<Numbered steps. Each step is an observable action. No vague "reason about X" steps.>
|
|
69
|
+
|
|
70
|
+
## Quality bar
|
|
71
|
+
|
|
72
|
+
<Three to five bullet points: what a good output includes and what it never does. Name anti-patterns explicitly.>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
#### `evals/cases.json`
|
|
76
|
+
|
|
77
|
+
Eight eval cases covering: 2 happy-path, 2 minimal/edge input, 2 anti-pattern (the quality bar failures), 2 refusal or boundary cases. Format:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
[
|
|
81
|
+
{
|
|
82
|
+
"id": "happy-path-standard",
|
|
83
|
+
"trigger": "<realistic input>",
|
|
84
|
+
"expected_shape": ["<checkable criterion 1>", "<checkable criterion 2>"],
|
|
85
|
+
"must_not_include": ["<anti-pattern from quality bar>"],
|
|
86
|
+
"verdict_class": "pass",
|
|
87
|
+
"notes": "<one sentence on what this tests>"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### `README.md` entry
|
|
93
|
+
|
|
94
|
+
One row for the skill table, matching the format of existing rows:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
| [`<skill-name>`](skills/<skill-name>/SKILL.md) | <One sentence describing what the skill does and the output it produces.> |
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### `packs.json` addition
|
|
101
|
+
|
|
102
|
+
State which pack to add the skill to and the exact line to add to the skills array.
|
|
103
|
+
|
|
104
|
+
### Step 3 — Install check reminder
|
|
105
|
+
|
|
106
|
+
After generating, tell the author:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Next steps:
|
|
110
|
+
1. mkdir skills/<skill-name> && cd skills/<skill-name>
|
|
111
|
+
2. Drop in manifest.json, SKILL.md, and evals/cases.json
|
|
112
|
+
3. python3 validate.py # must pass before opening a PR
|
|
113
|
+
4. Add the README row to the correct section
|
|
114
|
+
5. Add the skill to packs.json under the right pack
|
|
115
|
+
6. If the skill has a how-to guide, add it to guides/how-to/ and guides/README.md
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Anti-patterns
|
|
119
|
+
|
|
120
|
+
- **Generating manifests without checking the schema.** The most common contribution failure is a manifest missing a required field. Always instruct the author to run `python3 validate.py` before opening a PR.
|
|
121
|
+
- **Generating eval triggers that test nothing.** "Run this skill" is not an eval case. Insist on realistic triggers that would expose a specific failure mode if the model got it wrong.
|
|
122
|
+
- **Listing related skills that don't exist.** A manifest that references a non-existent skill fails validation. Instruct the author to run `ls skills/` before finalizing the `related` array.
|
|
123
|
+
|
|
124
|
+
After generating eval cases, the author can use `eval-harness-generator` to add more coverage or to regenerate cases after modifying the SKILL.md.
|
|
125
|
+
|
|
126
|
+
## Quality bar
|
|
127
|
+
|
|
128
|
+
- **Manifests must be schema-valid.** Every field required by `contracts/skill.schema.json` must be present. Use `python3 validate.py` as the check — not a visual review.
|
|
129
|
+
- **Eval triggers are realistic.** A trigger of "use this skill" is not an eval case. Each trigger should be a plausible user input, not a test harness artifact.
|
|
130
|
+
- **SKILL.md has observable steps.** Every step in "How to respond" must describe an action the agent takes — never "think about X" or "consider Y".
|
|
131
|
+
- **The quality bar names anti-patterns.** A quality bar that only says what good looks like doesn't help the agent avoid common failures. Name at least two things the output must never do.
|
|
132
|
+
- **Related skills are real.** Every skill listed in `related` must exist in the skills directory. Run `ls skills/` to check before outputting.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "contribution-wizard",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Guides an author through creating a new skilldrop skill from scratch — generates the manifest, SKILL.md, eval cases, and README entry from a plain-language description of the skill's purpose. Use when authoring a new skill for this repo or a private fork, ensuring a new skill meets the schema and validation requirements before submission.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["eval-harness-generator"],
|
|
9
|
+
"tags": ["meta", "authoring", "contribution", "skilldrop-meta"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Intake + structured generation — standard tier covers the template-filling and schema-adherence judgment this requires." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eval-harness-generator
|
|
3
|
+
description: Takes a skill's SKILL.md and generates a set of eval cases — trigger queries, expected output shape, and pass/fail criteria — ready to drop into the skill's evals/ directory. Use when adding evals to a new or existing skill, verifying a skill behaves as documented, or building a regression gate before modifying a skill.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# eval-harness-generator
|
|
7
|
+
|
|
8
|
+
Reads a SKILL.md and generates eval cases that cover the skill's happy path, edge cases, and known failure modes. The output is JSON that drops directly into `skills/<name>/evals/cases.json`. Unlike `llm-eval-harness` (which designs eval harnesses for arbitrary LLM features), this skill specifically targets the skilldrop eval format and the patterns that skilldrop skills routinely get wrong.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
### Step 1 — Read the skill
|
|
13
|
+
|
|
14
|
+
Ask the user to paste the full SKILL.md. Extract:
|
|
15
|
+
- What the skill takes as input
|
|
16
|
+
- What the skill produces as output
|
|
17
|
+
- Any explicit quality bars or anti-patterns the skill names
|
|
18
|
+
- Whether the skill is a **gate** (emits a verdict from `contracts/terminals.json`) or a **generator** (produces an artifact)
|
|
19
|
+
|
|
20
|
+
### Step 2 — Identify failure modes
|
|
21
|
+
|
|
22
|
+
Before writing cases, enumerate the failure modes the eval set should catch:
|
|
23
|
+
|
|
24
|
+
| Category | Failure mode to test |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Happy path** | Standard input produces the expected artifact/verdict |
|
|
27
|
+
| **Minimal input** | Sparse or ambiguous input — does the skill ask clarifying questions rather than hallucinate? |
|
|
28
|
+
| **Anti-pattern input** | Input that would tempt the skill to produce a common bad output (named in the SKILL.md's quality bar) |
|
|
29
|
+
| **Edge input** | Boundary conditions specific to this skill (e.g., a bug report with no repro steps for bug-triage) |
|
|
30
|
+
| **Gate refusal** | For gate skills: input that should produce BLOCKED or REVISE, not PROCEED |
|
|
31
|
+
|
|
32
|
+
### Step 3 — Generate the eval cases
|
|
33
|
+
|
|
34
|
+
Produce a JSON array with 8–12 cases. Each case:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"id": "happy-path-standard",
|
|
39
|
+
"trigger": "The exact query or input that activates this case",
|
|
40
|
+
"expected_shape": [
|
|
41
|
+
"Output contains a <specific element>",
|
|
42
|
+
"Output names a specific field or section",
|
|
43
|
+
"Output avoids <anti-pattern named in quality bar>"
|
|
44
|
+
],
|
|
45
|
+
"must_not_include": [
|
|
46
|
+
"Fabricated detail not present in the input",
|
|
47
|
+
"A verdict word from the wrong class (for gate skills)"
|
|
48
|
+
],
|
|
49
|
+
"verdict_class": "pass",
|
|
50
|
+
"notes": "One sentence on what this case is testing and why it matters"
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
For gate skills, use `verdict_class` values from `contracts/terminals.json`: `pass`, `conditional`, `revise`, `redirect`, `blocked`. For generators, use `pass` / `fail`.
|
|
55
|
+
|
|
56
|
+
### Step 4 — Write an eval strategy note
|
|
57
|
+
|
|
58
|
+
After the JSON array, add a brief eval strategy note (3–5 sentences) explaining:
|
|
59
|
+
- Which cases cover which failure modes
|
|
60
|
+
- The most important case and why
|
|
61
|
+
- What a regression on which case would mean
|
|
62
|
+
|
|
63
|
+
### Step 5 — Remind about placement
|
|
64
|
+
|
|
65
|
+
Tell the user:
|
|
66
|
+
```
|
|
67
|
+
Drop this into skills/<skill-name>/evals/cases.json
|
|
68
|
+
Run: python3 validate.py # confirms the file is found
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Anti-patterns
|
|
72
|
+
|
|
73
|
+
- **Triggers that don't test anything.** "Run the skill on this input" is not a meaningful trigger. Each trigger must be specific enough that a failing model would produce a wrong output you'd recognize.
|
|
74
|
+
- **expected_shape items that can't be checked.** "Output is comprehensive" is not checkable. Name specific sections, fields, or behaviors.
|
|
75
|
+
- **Missing anti-pattern cases.** The most common eval gap is no cases that test the quality bar's failure modes. If a skill says "never present a hypothesis as the cause," there must be a case where the input tempts that failure.
|
|
76
|
+
|
|
77
|
+
For designing eval harnesses for general LLM features (not skilldrop skills specifically), use `llm-eval-harness` instead. Use `contribution-wizard` when creating a new skill from scratch — it calls this skill as part of the authoring flow.
|
|
78
|
+
|
|
79
|
+
## Quality bar
|
|
80
|
+
|
|
81
|
+
- **Triggers must be realistic.** A trigger of "run this skill" is not an eval case — it doesn't test anything specific. Each trigger should be the kind of input a real user would paste.
|
|
82
|
+
- **expected_shape items must be checkable.** "Output is good" is not checkable. "Output contains a numbered repro sequence starting from a clean state" is.
|
|
83
|
+
- **Cover the refusal cases.** The most common gap in skilldrop evals is missing cases for the skill's anti-patterns — the bad outputs the quality bar explicitly forbids. At least 2 of the 8–12 cases must test that the skill refuses or avoids its stated failure mode.
|
|
84
|
+
- **Don't pad to 12.** Eight strong cases beat twelve weak ones. Only add cases that test a distinct failure mode not already covered.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eval-harness-generator",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Takes a skill's SKILL.md and generates a set of eval cases — trigger queries, expected output shape, and pass/fail criteria — ready to drop into the skill's evals/ directory. Use when adding evals to a new or existing skill, verifying a skill behaves as documented, or building a regression gate before modifying a skill.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["llm-eval-harness", "contribution-wizard"],
|
|
9
|
+
"tags": ["claude-api", "evals", "testing", "quality", "skilldrop-meta"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Reads a SKILL.md and synthesizes eval cases — requires understanding of the skill's intent but not heavy reasoning." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-caching-advisor
|
|
3
|
+
description: Analyzes a prompt or conversation structure and identifies the highest-value cache breakpoints — where to insert cache_control checkpoints to minimize repeated token processing. Use when designing or optimizing a Claude API integration that uses prompt caching, when input costs are dominated by a static system prompt or few-shot block, or when a multi-turn conversation reprocesses the same context on every turn.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# prompt-caching-advisor
|
|
7
|
+
|
|
8
|
+
Identifies where to place `cache_control` checkpoints in a Claude API prompt or conversation structure to minimize repeated token processing. The savings are real — a cache hit on a 10,000-token system prompt costs ~90% less than re-processing it — but the placement matters. Wrong breakpoints waste the minimum cacheable block size or cache dynamic content that never hits.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
### Step 1 — Understand the structure
|
|
13
|
+
|
|
14
|
+
Ask the user to share (or describe) their prompt structure. You need:
|
|
15
|
+
- The system prompt (or a description of what's in it and roughly how long)
|
|
16
|
+
- Any few-shot examples passed in messages
|
|
17
|
+
- The shape of the variable user turn (what changes per request)
|
|
18
|
+
- Whether this is single-turn or multi-turn
|
|
19
|
+
|
|
20
|
+
If they share code, read the messages array. The cache breakpoint goes at the end of the block you want cached — a `cache_control: {"type": "ephemeral"}` on the **last content block** of a message causes everything up to and including that block to be cached.
|
|
21
|
+
|
|
22
|
+
### Step 2 — Classify each block
|
|
23
|
+
|
|
24
|
+
For each distinct block, classify it:
|
|
25
|
+
|
|
26
|
+
| Class | Characteristics | Cache? |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| **Static** | Same on every request (system instructions, reference docs, few-shot examples) | Yes — put breakpoint at the end |
|
|
29
|
+
| **Quasi-static** | Same for a session or user, different across users (user profile, project context) | Yes, with session-scope awareness |
|
|
30
|
+
| **Dynamic** | Changes every request (current user message, real-time data, timestamps) | No — never cache |
|
|
31
|
+
|
|
32
|
+
### Step 3 — Recommend breakpoints
|
|
33
|
+
|
|
34
|
+
State exactly where to place each `cache_control` checkpoint. Show the code:
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
messages = [
|
|
38
|
+
{
|
|
39
|
+
"role": "user",
|
|
40
|
+
"content": [
|
|
41
|
+
{
|
|
42
|
+
"type": "text",
|
|
43
|
+
"text": "<static few-shot examples here>",
|
|
44
|
+
"cache_control": {"type": "ephemeral"} # breakpoint 1 — caches system + examples
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "text",
|
|
48
|
+
"text": user_query # dynamic — no cache_control
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
For system prompts, the cache breakpoint goes on the last block of the system array.
|
|
56
|
+
|
|
57
|
+
### Step 4 — Estimate cache hit rate
|
|
58
|
+
|
|
59
|
+
Give a rough hit rate estimate:
|
|
60
|
+
- **Near 100%**: static system prompt, fixed few-shot examples, no dynamic injection into the cached block
|
|
61
|
+
- **~session %**: user-context cached per-session; hits on turn 2+, misses on first turn per user
|
|
62
|
+
- **Low**: anything that embeds timestamps, UUIDs, or per-request data in the cached block
|
|
63
|
+
|
|
64
|
+
### Step 5 — Warn on sub-threshold blocks
|
|
65
|
+
|
|
66
|
+
Warn if a block the user wants to cache is likely under the minimum cacheable size:
|
|
67
|
+
- **Haiku**: ~1,024 tokens minimum
|
|
68
|
+
- **Sonnet / Opus**: ~2,048 tokens minimum
|
|
69
|
+
|
|
70
|
+
A block under the minimum is processed as normal — no error, just no cache savings. Calculate roughly: 1 token ≈ 4 characters of English prose. A 2,000-character system prompt (~500 tokens) won't benefit on Sonnet/Opus.
|
|
71
|
+
|
|
72
|
+
### Step 6 — Output format
|
|
73
|
+
|
|
74
|
+
Produce:
|
|
75
|
+
1. **Annotated structure** — show the messages array with `cache_control` placements marked and commented
|
|
76
|
+
2. **Cache strategy summary** — one paragraph: what is cached, why, expected hit rate, and the dominant cost driver before and after
|
|
77
|
+
|
|
78
|
+
## Anti-patterns
|
|
79
|
+
|
|
80
|
+
- **Caching dynamic content.** If a user query, timestamp, or per-request database result is inside a cached block, every request is a cache miss — the structure defeats itself. Identify and flag before recommending.
|
|
81
|
+
- **Recommending a cache on a block under the minimum size.** A 300-token block doesn't cache on Sonnet/Opus. The API doesn't error — it just processes normally. Always check size before recommending.
|
|
82
|
+
- **Recommending four or more breakpoints.** More than three breakpoints on a single request is almost always a sign the prompt structure should be simplified, not patched with caches.
|
|
83
|
+
|
|
84
|
+
Use `token-budget-estimator` after this skill if the user also wants to size the token budget across components.
|
|
85
|
+
|
|
86
|
+
## Quality bar
|
|
87
|
+
|
|
88
|
+
- **Never cache dynamic content.** A user query, a timestamp, a database result retrieved per-request — these must not appear in a cached block. If the user's structure embeds dynamic content in an otherwise static block, flag it before recommending the cache.
|
|
89
|
+
- **One breakpoint per logical boundary.** A system prompt with three sections (instructions, reference docs, examples) can have up to three breakpoints. More than four breakpoints on a single request is a signal the structure needs rethinking.
|
|
90
|
+
- **The last block caches everything before it.** This is the most common misunderstanding — the cache breakpoint is not a marker for just that block, it's a marker for the entire prefix up to that point.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "prompt-caching-advisor",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Analyzes a prompt or conversation structure and identifies the highest-value cache breakpoints — where to insert cache_control checkpoints to minimize repeated token processing. Use when designing or optimizing a Claude API integration that uses prompt caching, when input costs are dominated by a static system prompt or few-shot block, or when a multi-turn conversation reprocesses the same context on every turn.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["token-budget-estimator"],
|
|
9
|
+
"tags": ["claude-api", "caching", "cost", "optimization", "prompt-engineering"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Structural analysis of a prompt with threshold arithmetic and pattern matching — above light (needs API-specific judgment), no need for heavy." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: token-budget-estimator
|
|
3
|
+
description: Estimates input and output token usage for a described agentic workflow, surfaces the dominant cost drivers, and suggests max_tokens budget controls per component. Use when planning a new Claude API integration, sizing a cost budget for a feature, or diagnosing why a workflow's token usage is higher than expected.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# token-budget-estimator
|
|
7
|
+
|
|
8
|
+
Breaks down token usage for an agentic workflow — before you build it or while diagnosing runaway costs. The output is a component table (not a single number) because "how many tokens does this use?" has a different answer for the system prompt, the growing context window, tool results, and the final output. Knowing which component dominates tells you where to optimize.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
### Step 1 — Intake
|
|
13
|
+
|
|
14
|
+
Ask the user to describe their workflow. Collect:
|
|
15
|
+
- What the agent does (brief description)
|
|
16
|
+
- The shape of the system prompt (static instructions, injected context, few-shot examples — rough character/word count is fine)
|
|
17
|
+
- How many turns or tool calls a typical session has
|
|
18
|
+
- What tool results look like (small JSON blobs? Full document retrieval? Database rows?)
|
|
19
|
+
- Roughly how long the final output is
|
|
20
|
+
|
|
21
|
+
If they already have working code or logs, ask them to share a sample API request/response — you can count tokens more accurately from the actual content.
|
|
22
|
+
|
|
23
|
+
### Step 2 — Estimate each component
|
|
24
|
+
|
|
25
|
+
Build a token budget table. Token approximation: **1 token ≈ 4 characters** of English text; code/JSON runs denser (~3 chars/token).
|
|
26
|
+
|
|
27
|
+
| Component | Est. tokens | Notes |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| System prompt | X | Static — same every call |
|
|
30
|
+
| Injected context (per call) | X | User data, retrieved docs, etc. |
|
|
31
|
+
| Few-shot examples | X | Static — cache candidate |
|
|
32
|
+
| User turn (per call) | X | Variable per request |
|
|
33
|
+
| Tool definitions | X | Sent on every call that uses tools |
|
|
34
|
+
| Tool results (per turn) | X | Accumulate across turns |
|
|
35
|
+
| Context accumulation | X | Previous turns retained in window |
|
|
36
|
+
| Output (per call) | X | Depends on max_tokens and task |
|
|
37
|
+
| **Total per session** | X | Sum across all turns |
|
|
38
|
+
|
|
39
|
+
Flag the **dominant cost driver** — the single row with the largest token count — and explain why it dominates.
|
|
40
|
+
|
|
41
|
+
### Step 3 — Recommend budget controls
|
|
42
|
+
|
|
43
|
+
For each component, suggest a concrete control:
|
|
44
|
+
|
|
45
|
+
- **System prompt too large**: split static vs dynamic; cache the static portion (`prompt-caching-advisor`)
|
|
46
|
+
- **Context accumulation**: summarize earlier turns, or use a sliding window instead of full history
|
|
47
|
+
- **Tool results**: truncate or paginate large results before passing to the model; never inject a 50-row database result when 5 representative rows suffice
|
|
48
|
+
- **Output**: set `max_tokens` to the realistic output ceiling — open-ended `max_tokens` on a generation task wastes budget on over-generation
|
|
49
|
+
- **Tool definitions**: only send the tools relevant to the current task state (tool selection narrows with progress)
|
|
50
|
+
|
|
51
|
+
### Step 4 — Extended thinking note
|
|
52
|
+
|
|
53
|
+
If the workflow uses extended thinking (`betas: ["interleaved-thinking"]`), add a note: thinking tokens are billed at the same input rate and are subject to a `budget_tokens` cap you set. Recommend setting `budget_tokens` to 2–4× the typical output length for reasoning tasks, and lower for classification or extraction tasks where long thinking chains rarely help.
|
|
54
|
+
|
|
55
|
+
### Step 5 — Output format
|
|
56
|
+
|
|
57
|
+
Produce:
|
|
58
|
+
1. **Token budget table** — the component breakdown with estimates
|
|
59
|
+
2. **Dominant driver** — named and explained
|
|
60
|
+
3. **Three concrete controls** — ranked by expected savings, with specific API parameters where applicable (`max_tokens`, `cache_control`, tool selection logic)
|
|
61
|
+
4. **Rough cost estimate** — using current public pricing for the tier the user is on (state the tier assumption; don't guess if unknown)
|
|
62
|
+
|
|
63
|
+
## Anti-patterns
|
|
64
|
+
|
|
65
|
+
- **A single total without a breakdown.** "~50,000 tokens per session" tells a developer nothing actionable. Always produce the component table.
|
|
66
|
+
- **False precision from descriptions.** "3,142 tokens" from a description is theatre. Use ranges; tighten only when working from actual content.
|
|
67
|
+
- **Optimizations without a ranking.** Listing five suggestions without saying which saves the most wastes the developer's attention.
|
|
68
|
+
|
|
69
|
+
For caching-specific advice after sizing the budget, hand off to `prompt-caching-advisor`. For agent-level spending controls, see `agent-budget`.
|
|
70
|
+
|
|
71
|
+
## Quality bar
|
|
72
|
+
|
|
73
|
+
- **Ranges over false precision.** "~2,000–4,000 tokens" is more honest than "3,142 tokens" when you're working from a description. Use ranges when working from descriptions, tighter estimates when working from actual content.
|
|
74
|
+
- **The table beats the total.** A single "~50,000 tokens per session" is nearly useless — the table that shows context accumulation accounts for 40,000 of those gives the developer somewhere to act.
|
|
75
|
+
- **Name the optimization target.** Don't list five optimizations without ranking them. The one that saves 80% of the dominant component beats the one that shaves 5% off a small component.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "token-budget-estimator",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Estimates input and output token usage for a described agentic workflow, surfaces the dominant cost drivers, and suggests max_tokens budget controls per component. Use when planning a new Claude API integration, sizing a cost budget for a feature, or diagnosing why a workflow's token usage is higher than expected.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["prompt-caching-advisor", "agent-budget"],
|
|
9
|
+
"tags": ["claude-api", "cost", "tokens", "planning", "budgeting"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Arithmetic breakdown plus heuristic judgment on dominant cost drivers — standard fits; no heavy reasoning needed." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tool-use-schema-writer
|
|
3
|
+
description: Takes a function description (name, purpose, parameters) and writes a valid Anthropic tool_use JSON schema, with type annotations, required fields, and a description for each parameter. Produces a Python usage snippet for client.messages.create(tools=[...]). Use when wiring a Claude agent to a function or API, designing tools for a multi-agent system, or documenting an existing tool for agent consumption.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# tool-use-schema-writer
|
|
7
|
+
|
|
8
|
+
Converts a natural-language function description into a valid Anthropic `tool_use` definition. The output is ready to paste into `client.messages.create(tools=[...])`. This skill enforces the two constraints that cause most tool-use bugs: descriptions that are too vague for the model to choose the right tool, and missing `required` arrays that cause the model to omit non-optional fields.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
### Step 1 — Intake
|
|
13
|
+
|
|
14
|
+
Ask the user to describe the function. Collect:
|
|
15
|
+
- **Name** (snake_case preferred; the model uses this to call the tool)
|
|
16
|
+
- **Purpose** (one sentence: what does this function do and when should the model call it?)
|
|
17
|
+
- **Parameters**: for each — name, type, what it means, whether it's required
|
|
18
|
+
- **Return value** (optional — for documentation purposes only; the model doesn't see it)
|
|
19
|
+
|
|
20
|
+
If they share existing code (Python, TypeScript, etc.), read the function signature and docstring directly.
|
|
21
|
+
|
|
22
|
+
### Step 2 — Write the tool definition
|
|
23
|
+
|
|
24
|
+
Produce a valid Anthropic tool definition:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"name": "function_name",
|
|
29
|
+
"description": "One to three sentences. State what the function does, when the model should call it (the decision condition), and what it returns. Avoid vague descriptions like 'performs an operation' — the model reads this to decide whether to call the tool.",
|
|
30
|
+
"input_schema": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"param_name": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "What this parameter controls and what values are valid. Include the unit if numeric (e.g., 'timeout in seconds, 1–300')."
|
|
36
|
+
},
|
|
37
|
+
"another_param": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"description": "..."
|
|
40
|
+
},
|
|
41
|
+
"enum_param": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["value_a", "value_b"],
|
|
44
|
+
"description": "Which mode to use. value_a does X; value_b does Y."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": ["param_name"]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Valid JSON Schema types for Anthropic tool parameters: `"string"`, `"integer"`, `"number"`, `"boolean"`, `"array"`, `"object"`, `"null"`. Arrays need `"items"`. Objects need `"properties"` and their own `"required"`.
|
|
53
|
+
|
|
54
|
+
### Step 3 — Validate
|
|
55
|
+
|
|
56
|
+
Check the definition against these rules before outputting:
|
|
57
|
+
- Every parameter in `"required"` exists in `"properties"`
|
|
58
|
+
- No parameter has an empty `"description"` — the model needs these to fill values correctly
|
|
59
|
+
- The top-level `"description"` names a decision condition ("call this when X"), not just what it does
|
|
60
|
+
- Enum values are listed in the parameter description with a one-phrase explanation each
|
|
61
|
+
- Nested objects have their own `"required"` arrays
|
|
62
|
+
|
|
63
|
+
### Step 4 — Python usage snippet
|
|
64
|
+
|
|
65
|
+
Produce the Python snippet:
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
import anthropic
|
|
69
|
+
|
|
70
|
+
client = anthropic.Anthropic()
|
|
71
|
+
|
|
72
|
+
tools = [
|
|
73
|
+
{
|
|
74
|
+
"name": "function_name",
|
|
75
|
+
"description": "...",
|
|
76
|
+
"input_schema": { ... }
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
response = client.messages.create(
|
|
81
|
+
model="claude-sonnet-5-5",
|
|
82
|
+
max_tokens=1024,
|
|
83
|
+
tools=tools,
|
|
84
|
+
messages=[{"role": "user", "content": "Your prompt here"}]
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Handle tool use
|
|
88
|
+
if response.stop_reason == "tool_use":
|
|
89
|
+
tool_use_block = next(b for b in response.content if b.type == "tool_use")
|
|
90
|
+
tool_input = tool_use_block.input # dict matching your schema
|
|
91
|
+
result = function_name(**tool_input)
|
|
92
|
+
# Send result back in a follow-up message
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Step 5 — Multi-tool note
|
|
96
|
+
|
|
97
|
+
If the user describes multiple functions, produce one JSON array with all tools and remind them: the model chooses among all tools on each turn, so descriptions must be distinct enough to make the right call unambiguous. If two tools do similar things, the description must name the exact condition that separates them.
|
|
98
|
+
|
|
99
|
+
## Anti-patterns
|
|
100
|
+
|
|
101
|
+
- **Descriptions that restate the function name.** `"Gets the weather"` for a function named `get_weather` tells the model nothing about when to call it. Descriptions must name the decision condition.
|
|
102
|
+
- **Omitting the `required` array.** Without `required`, all fields are optional — the model will skip non-optional parameters, causing runtime errors.
|
|
103
|
+
- **Enum values without descriptions.** `"enum": ["asc", "desc"]` without explanation leaves the model guessing; it will sometimes pick the wrong value.
|
|
104
|
+
|
|
105
|
+
For the agent loop that calls these tools, see `agent-loop-design`. For orchestrating multiple agents that each expose tool schemas, see `subagent-design`.
|
|
106
|
+
|
|
107
|
+
## Quality bar
|
|
108
|
+
|
|
109
|
+
- **Descriptions are decision conditions, not function names restated.** `"Gets the weather"` is not a description — `"Returns the current temperature and conditions for a given city. Call this when the user asks about current weather, not forecasts."` is.
|
|
110
|
+
- **Required arrays are never omitted.** An omitted `required` array means all fields are optional — the model will skip fields the function actually needs and the call will fail at runtime.
|
|
111
|
+
- **Enum values always have descriptions.** `"enum": ["asc", "desc"]` without a description leaves the model guessing which to use.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tool-use-schema-writer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Takes a function description (name, purpose, parameters) and writes a valid Anthropic tool_use JSON schema, with type annotations, required fields, and a description for each parameter. Produces a Python usage snippet for client.messages.create(tools=[...]). Use when wiring a Claude agent to a function or API, designing tools for a multi-agent system, or documenting an existing tool for agent consumption.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["agent-loop-design", "subagent-design"],
|
|
9
|
+
"tags": ["claude-api", "tool-use", "json-schema", "sdk", "agents"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Schema generation from a natural-language description — structured output task that fits standard tier." }
|
|
11
|
+
}
|