@softspark/ai-toolkit 2.11.0 → 2.12.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/AGENTS.md +21 -21
- package/CHANGELOG.md +24 -0
- package/README.md +6 -9
- package/app/.claude-plugin/plugin.json +1 -1
- package/app/agents/meta-architect.md +44 -0
- package/app/skills/agent-creator/SKILL.md +22 -6
- package/app/skills/analyze/SKILL.md +21 -1
- package/app/skills/api-patterns/SKILL.md +27 -0
- package/app/skills/app-builder/SKILL.md +24 -0
- package/app/skills/architecture-audit/SKILL.md +24 -0
- package/app/skills/architecture-decision/SKILL.md +24 -0
- package/app/skills/biz-scan/SKILL.md +24 -0
- package/app/skills/brand-voice/SKILL.md +36 -0
- package/app/skills/briefing/SKILL.md +41 -1
- package/app/skills/build/SKILL.md +24 -1
- package/app/skills/chaos/SKILL.md +22 -1
- package/app/skills/ci/SKILL.md +22 -1
- package/app/skills/ci-cd-patterns/SKILL.md +25 -0
- package/app/skills/command-creator/SKILL.md +31 -2
- package/app/skills/content-moderation-patterns/SKILL.md +25 -0
- package/app/skills/database-patterns/SKILL.md +25 -0
- package/app/skills/debug/SKILL.md +23 -1
- package/app/skills/design-engineering/SKILL.md +25 -0
- package/app/skills/docker-devops/SKILL.md +26 -0
- package/app/skills/ecommerce-patterns/SKILL.md +26 -0
- package/app/skills/evaluate/SKILL.md +22 -1
- package/app/skills/evolve/SKILL.md +25 -0
- package/app/skills/explain/SKILL.md +26 -1
- package/app/skills/explore/SKILL.md +25 -0
- package/app/skills/fix/SKILL.md +26 -1
- package/app/skills/git-mastery/SKILL.md +26 -0
- package/app/skills/grill-me/SKILL.md +22 -7
- package/app/skills/health/SKILL.md +22 -1
- package/app/skills/hipaa-validate/SKILL.md +25 -8
- package/app/skills/hook-creator/SKILL.md +23 -6
- package/app/skills/index/SKILL.md +22 -1
- package/app/skills/instinct-review/SKILL.md +25 -1
- package/app/skills/introspect/SKILL.md +26 -1
- package/app/skills/lint/SKILL.md +27 -1
- package/app/skills/mcp-builder/SKILL.md +27 -0
- package/app/skills/mem-search/SKILL.md +40 -0
- package/app/skills/migrate/SKILL.md +27 -1
- package/app/skills/migration-patterns/SKILL.md +26 -0
- package/app/skills/night-watch/SKILL.md +22 -1
- package/app/skills/observability-patterns/SKILL.md +26 -0
- package/app/skills/onboard/SKILL.md +22 -1
- package/app/skills/panic/SKILL.md +21 -1
- package/app/skills/performance-profiling/SKILL.md +34 -0
- package/app/skills/persona/SKILL.md +21 -4
- package/app/skills/plan/SKILL.md +26 -0
- package/app/skills/plan-writing/SKILL.md +26 -0
- package/app/skills/plugin-creator/SKILL.md +23 -6
- package/app/skills/pr/SKILL.md +24 -1
- package/app/skills/prd-to-issues/SKILL.md +22 -6
- package/app/skills/prd-to-plan/SKILL.md +22 -4
- package/app/skills/predict/SKILL.md +25 -0
- package/app/skills/qa-session/SKILL.md +23 -7
- package/app/skills/rag-patterns/SKILL.md +26 -0
- package/app/skills/refactor/SKILL.md +26 -0
- package/app/skills/refactor-plan/SKILL.md +23 -6
- package/app/skills/rollback/SKILL.md +27 -1
- package/app/skills/security-patterns/SKILL.md +27 -0
- package/app/skills/skill-audit/SKILL.md +22 -5
- package/app/skills/skill-creator/SKILL.md +50 -9
- package/app/skills/swift-patterns/SKILL.md +27 -107
- package/app/skills/swift-patterns/reference/frameworks.md +111 -0
- package/app/skills/test/SKILL.md +23 -1
- package/app/skills/testing-patterns/SKILL.md +26 -0
- package/app/skills/triage-issue/SKILL.md +22 -4
- package/app/skills/ubiquitous-language/SKILL.md +23 -8
- package/kb/procedures/release-preparation-sop.md +11 -5
- package/kb/procedures/release-verification-sop.md +24 -6
- package/llms-full.txt +56 -32
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/evaluate_skills.py +84 -0
|
@@ -51,7 +51,24 @@ Unlike `--persona` at install time (which injects into CLAUDE.md permanently), `
|
|
|
51
51
|
|
|
52
52
|
## Rules
|
|
53
53
|
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
54
|
+
- **MUST** remain read-only — this skill never writes files, only loads persona content into the session
|
|
55
|
+
- **MUST** state the active persona explicitly at switch time so the user knows which lens is in effect
|
|
56
|
+
- **NEVER** keep the previous persona active after a switch — replace, do not stack
|
|
57
|
+
- **NEVER** mix personas in a single response — each persona has internally consistent priorities that clash if blended
|
|
58
|
+
- **CRITICAL**: personas apply for the **current session only**. `/persona --clear` resets; a new session starts from default.
|
|
59
|
+
- **MANDATORY**: valid personas are defined by `.md` files in `app/personas/` — do not invent or describe a persona that has no file
|
|
60
|
+
|
|
61
|
+
## Gotchas
|
|
62
|
+
|
|
63
|
+
- The persona file lives in `app/personas/<name>.md` relative to the toolkit root. When the toolkit is globally installed, that root is at `~/.claude/skills/persona/../../../app/personas/` — fallback paths matter.
|
|
64
|
+
- Switching personas mid-task can produce a jarring tone shift in the user's output. Announce the switch, briefly restate the current task in the new persona, then continue.
|
|
65
|
+
- `/persona --clear` only resets the **in-session** persona. If the user ran `ai-toolkit install --persona <name>` at install time, that persona is injected into CLAUDE.md and survives session clears. Clearing requires editing CLAUDE.md directly.
|
|
66
|
+
- Personas are **style overlays**, not skill enablers. Activating `devops-eng` does not give access to `/deploy` if it was not already installed; it only biases which skills the agent reaches for first.
|
|
67
|
+
- A persona that contradicts project-level CLAUDE.md rules (e.g. `junior-dev` asking for explanations in a project that says "no pleasantries") creates a tone conflict. Project rules win; adjust the persona or the project rules, not both silently.
|
|
68
|
+
|
|
69
|
+
## When NOT to Use
|
|
70
|
+
|
|
71
|
+
- For **permanent** persona injection at install time — use `ai-toolkit install --persona <name>` (project or global)
|
|
72
|
+
- For multi-agent parallel work with different specialists — use `/orchestrate` or `/teams`
|
|
73
|
+
- For a specific language or framework context (not a general engineering stance) — use the language-pattern skills (`/typescript-patterns`, etc.)
|
|
74
|
+
- To edit or create a persona file — edit `app/personas/<name>.md` directly; this skill only switches between existing ones
|
package/app/skills/plan/SKILL.md
CHANGED
|
@@ -52,3 +52,29 @@ hybrid_search_kb("architecture {pattern}")
|
|
|
52
52
|
- Need requirements first? -> `/write-a-prd` for structured product requirements
|
|
53
53
|
- Want to stress-test the plan? -> `/grill-me` for Socratic questioning
|
|
54
54
|
- Ready to break into issues? -> `/prd-to-plan` -> `/triage-issue`
|
|
55
|
+
|
|
56
|
+
## Rules
|
|
57
|
+
|
|
58
|
+
- **MUST** break work into phases where each phase is independently shippable (tracer-bullet discipline) — waterfall phases defer all risk to the end
|
|
59
|
+
- **MUST** define measurable success criteria per phase before proposing tasks — "the user is happy" is not a criterion
|
|
60
|
+
- **NEVER** write code in this skill — the output is a plan document, not a patch
|
|
61
|
+
- **NEVER** invent an agent; every task lists a real agent from `app/agents/` or a real skill from `app/skills/` with a reason for the choice
|
|
62
|
+
- **CRITICAL**: every phase has an explicit rollback or scope-cut option. A plan with no way to stop mid-project is a sunk-cost trap.
|
|
63
|
+
- **MANDATORY**: dependencies between phases are explicit edges (`Phase 1 → Phase 2`). Circular dependencies are always a planning bug, not a valid state.
|
|
64
|
+
|
|
65
|
+
## Gotchas
|
|
66
|
+
|
|
67
|
+
- "SMART" tasks are often too small to be strategic and too vague to be tactical. Tasks at the plan level should be phase-aligned outcomes ("authentication ships behind a feature flag"), not implementation steps ("add JWT middleware").
|
|
68
|
+
- Agent assignment drifts during execution — the agent named in the plan may be unavailable or wrong when the work starts. Document the **role** (`backend-specialist`) alongside the assigned agent, so a substitute is unambiguous.
|
|
69
|
+
- Plans that start with a Research phase often consume 80% of the timeline without producing shippable output. If research is truly needed, cap it with a timebox and a concrete artifact (ADR, spike doc).
|
|
70
|
+
- Dependency graphs with diamond patterns (A→B, A→C, B→D, C→D) silently serialize D. If parallel phases feel slow, check for an unintended diamond.
|
|
71
|
+
- Success criteria based on code metrics (coverage, lint count) incentivize gaming them. Prefer user-facing criteria (p95 latency, first-time-success rate on the happy path).
|
|
72
|
+
|
|
73
|
+
## When NOT to Use
|
|
74
|
+
|
|
75
|
+
- For writing a **PRD** (product requirements) first — use `/write-a-prd`
|
|
76
|
+
- For breaking a PRD into phases — use `/prd-to-plan`
|
|
77
|
+
- For filing issues against a plan — use `/prd-to-issues`
|
|
78
|
+
- For stress-testing an existing plan — use `/grill-me`
|
|
79
|
+
- For executing a plan with agents — use `/orchestrate` or `/workflow`
|
|
80
|
+
- For a refactor with incremental commits — use `/refactor-plan`
|
|
@@ -200,3 +200,29 @@ Before finalizing plan:
|
|
|
200
200
|
- [ ] Agents assigned
|
|
201
201
|
- [ ] Risks documented
|
|
202
202
|
- [ ] Success criteria defined
|
|
203
|
+
|
|
204
|
+
## Rules
|
|
205
|
+
|
|
206
|
+
- **MUST** include a Success Criteria section with measurable, verifiable conditions — subjective criteria are not criteria
|
|
207
|
+
- **MUST** include a Rollback Plan for any work that touches production data or shared infrastructure
|
|
208
|
+
- **MUST** write a Pre-Mortem when estimated effort exceeds 1 day — "what could go wrong" surfaces real risks cheaply
|
|
209
|
+
- **NEVER** estimate in hours for work longer than a week. Use T-shirt sizes (S/M/L/XL) or tracer-bullet slices — precise long-horizon estimates are false confidence
|
|
210
|
+
- **CRITICAL**: every risk has an owner AND a mitigation. A risk register with named risks but no mitigations is decorative.
|
|
211
|
+
- **MANDATORY**: explicit scope boundaries — "not in this plan" is as important as "in this plan"
|
|
212
|
+
|
|
213
|
+
## Gotchas
|
|
214
|
+
|
|
215
|
+
- SMART criteria look complete but often omit the "relevant" dimension — a task can be Specific, Measurable, Achievable, Time-bound and still irrelevant to the outcome. Check relevance explicitly.
|
|
216
|
+
- Pre-mortems feel pessimistic and get shortened under deadline pressure. Make the pre-mortem a first-class section with at least 5 named failure modes — a 2-bullet pre-mortem is theater.
|
|
217
|
+
- Risk registers bloat when stakeholders add low-probability items to be safe. Cap the register at 10 risks ranked by (probability × impact); everything below line 10 is noise.
|
|
218
|
+
- Plans authored by the person who will execute them are biased toward feasibility (they want to do it). Plans authored by someone who won't execute are biased toward ambition (they don't pay the cost). Mix both perspectives.
|
|
219
|
+
- "Success criteria: deploy to production" is the weakest criterion — it measures effort, not outcome. Replace with user-facing or metric-based criteria ("20% reduction in p95 latency sustained for 7 days").
|
|
220
|
+
|
|
221
|
+
## When NOT to Use
|
|
222
|
+
|
|
223
|
+
- For **actually generating** a plan with phases and task breakdown — use `/plan`
|
|
224
|
+
- For requirements capture before planning — use `/write-a-prd`
|
|
225
|
+
- For turning a plan into filed issues — use `/prd-to-issues`
|
|
226
|
+
- For stress-testing a plan's assumptions — use `/grill-me`
|
|
227
|
+
- For executing plans with agents — use `/orchestrate` or `/workflow`
|
|
228
|
+
- For a single-step fix that does not warrant a document — skip the plan entirely
|
|
@@ -60,12 +60,21 @@ app/plugins/<plugin-name>/
|
|
|
60
60
|
|
|
61
61
|
## Authoring Rules
|
|
62
62
|
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
63
|
+
- **MUST** keep packs domain-scoped — "security-pack", "mobile-pack", not "misc-pack"
|
|
64
|
+
- **MUST** reference existing toolkit assets before duplicating — packs extend, they do not fork
|
|
65
|
+
- **MUST** ship a valid `plugin.json` with `name`, `description`, `version`, `domain`, `type`, `status`, and `includes`
|
|
66
|
+
- **NEVER** have a pack silently alter default global install behavior — experimental packs are **opt-in only**
|
|
67
|
+
- **NEVER** copy an agent or skill file into a pack when referencing the toolkit-level version suffices; duplication creates drift
|
|
68
|
+
- **CRITICAL**: optional hooks bundled in a pack must be executable (`chmod +x`) and documented in the pack README with their install semantics
|
|
69
|
+
- **MANDATORY**: the pack README names supported runtimes (`claude`, `codex`, or `all`) and explains that the pack is not part of the default install
|
|
70
|
+
|
|
71
|
+
## Gotchas
|
|
72
|
+
|
|
73
|
+
- Plugin packs are discovered by scanning `app/plugins/*/plugin.json`. A pack with a missing or malformed `plugin.json` is silently ignored — no error surfaces. Check with `ls app/plugins/*/plugin.json` and `jq . app/plugins/*/plugin.json`.
|
|
74
|
+
- The `status: experimental` flag gates visibility in some install paths — marking a pack "stable" before it is audited can make it install by default for every user. Keep `experimental` until the pack has eaten its own dogfood.
|
|
75
|
+
- Packs that include hooks inherit the toolkit's hook merge rules (`_source: "ai-toolkit"`). Hooks without the `_source` tag survive `ai-toolkit update` and can leak into other packs' merge pools.
|
|
76
|
+
- Versions in `plugin.json` are separate from the toolkit version. A pack at v1.2 running inside toolkit v2.11 may still satisfy `requires.ai-toolkit: >=1.0.0` but mean nothing about actual compatibility — test against the current toolkit before tagging.
|
|
77
|
+
- Codex-runtime packs need matching `.agents/rules/` and `.codex/hooks.json` variants; a plugin that only ships Claude assets looks broken under Codex CLI. Declare runtime support explicitly.
|
|
69
78
|
|
|
70
79
|
## Validation Checklist
|
|
71
80
|
|
|
@@ -75,3 +84,11 @@ app/plugins/<plugin-name>/
|
|
|
75
84
|
- [ ] Optional hooks are executable and use `#!/bin/bash`
|
|
76
85
|
- [ ] `scripts/validate.py` passes
|
|
77
86
|
- [ ] Public docs mention the pack only after the manifest and README exist
|
|
87
|
+
|
|
88
|
+
## When NOT to Use
|
|
89
|
+
|
|
90
|
+
- For an individual **skill** (slash command or knowledge doc) — use `/skill-creator`
|
|
91
|
+
- For an individual **agent** — use `/agent-creator`
|
|
92
|
+
- For a single **hook** (not a pack) — use `/hook-creator`
|
|
93
|
+
- For an MCP server — use `/mcp-builder`
|
|
94
|
+
- For modifying an existing plugin pack — edit its files directly; this skill is create-only
|
package/app/skills/pr/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pr
|
|
3
|
-
description: "Create pull
|
|
3
|
+
description: "Create a GitHub pull request after running pre-flight checks (lint, typecheck, tests) and generating a structured summary from commit history. Use when the branch is ready to merge — not for drafting work-in-progress."
|
|
4
4
|
effort: medium
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
argument-hint: "[title or branch]"
|
|
@@ -127,3 +127,26 @@ gh pr edit --add-reviewer username
|
|
|
127
127
|
# Merge PR
|
|
128
128
|
gh pr merge --squash
|
|
129
129
|
```
|
|
130
|
+
|
|
131
|
+
## Rules
|
|
132
|
+
|
|
133
|
+
- **MUST** run lint + typecheck + tests locally before opening the PR
|
|
134
|
+
- **NEVER** force-push `main` or `master`
|
|
135
|
+
- **NEVER** add `Co-Authored-By: Claude` or other AI attribution to commits
|
|
136
|
+
- **CRITICAL**: PR body must include a Test plan checklist — no exceptions
|
|
137
|
+
- **MANDATORY**: commit messages follow conventional commits (`feat:`, `fix:`, `docs:` etc.)
|
|
138
|
+
|
|
139
|
+
## Gotchas
|
|
140
|
+
|
|
141
|
+
- `gh pr merge --squash` **drops** all original commit trailers, including `Co-Authored-By:` lines. If the PR had legitimate co-authors, note them in the squashed commit body or use `--rebase` instead.
|
|
142
|
+
- `gh` defaults to `github.com`; for GitHub Enterprise the host must be set per-repo with `gh auth login --hostname <host>` and `gh repo set-default`. Silent failures on enterprise usually mean the wrong host.
|
|
143
|
+
- Running `gh pr create` without `--body` opens an editor (`$EDITOR` or `vi`) — in non-interactive contexts this hangs indefinitely. Always pass `--body` or `--body-file`.
|
|
144
|
+
- The pre-flight `ruff check .` walks respecting `.gitignore` by default but `mypy src/` does not — if `src/` contains generated code excluded from git, mypy will still scan it and report spurious errors.
|
|
145
|
+
- `git diff main...HEAD` (triple dot) shows commits on HEAD since the merge-base; `git diff main..HEAD` (double dot) shows all differences including main's newer commits. Use triple-dot for PR-scope diffs.
|
|
146
|
+
|
|
147
|
+
## When NOT to Use
|
|
148
|
+
|
|
149
|
+
- For creating a commit (without a PR) — use `/commit`
|
|
150
|
+
- For reviewing a PR someone else opened — use `/review`
|
|
151
|
+
- For drafting release notes across many PRs — use `/docs` or a release script
|
|
152
|
+
- When the branch has uncommitted changes — commit first, then open the PR
|
|
@@ -100,9 +100,25 @@ Reference by number from the parent PRD:
|
|
|
100
100
|
|
|
101
101
|
## Rules
|
|
102
102
|
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
103
|
+
- **MUST** slice vertically — every issue cuts through schema, API, UI, tests end-to-end. Horizontal slices (all-schema, then all-API) defer integration risk.
|
|
104
|
+
- **MUST** create issues in dependency order so blockers have real issue numbers to reference
|
|
105
|
+
- **NEVER** close or modify the parent PRD issue — it is the reference anchor for every child issue
|
|
106
|
+
- **NEVER** include file paths, line numbers, or function names in issue bodies — they go stale before the issue is picked up
|
|
107
|
+
- **CRITICAL**: maximize parallelism. Independent issues have zero `Blocked by` entries; if every issue has blockers, the slicing is wrong.
|
|
108
|
+
- **MANDATORY**: every issue lists the user stories it addresses by number from the parent PRD — traceability matters more than brevity
|
|
109
|
+
|
|
110
|
+
## Gotchas
|
|
111
|
+
|
|
112
|
+
- `gh issue create` opens `$EDITOR` without `--body` or `--body-file`. In automation, this hangs silently. Always pass the body explicitly.
|
|
113
|
+
- Dependency chains longer than 3 hops (A blocks B blocks C blocks D) almost always mean the slicing is too thin. Collapse the chain into fewer, wider slices.
|
|
114
|
+
- GitHub issue numbers increment globally in the repo. Creating 5 issues with forward references (#124 blocks #125) requires the blocker to land before the blocked — order matters, and a mid-batch failure leaves dangling references.
|
|
115
|
+
- AFK issues (no human interaction) appear attractive but the label is aspirational. Real AFK requires green CI, clear acceptance criteria, and no design ambiguity — misclassifying HITL as AFK creates reopens.
|
|
116
|
+
- User stories referenced by "number from the PRD" drift if the PRD gets edited. Quote the story text inline if it is short, or pin to a PRD anchor (`#issue-42 > User Story 7`) to resist drift.
|
|
117
|
+
|
|
118
|
+
## When NOT to Use
|
|
119
|
+
|
|
120
|
+
- For breaking a PRD into a **plan** (phases, no issues yet) — use `/prd-to-plan`
|
|
121
|
+
- For writing the PRD itself — use `/write-a-prd`
|
|
122
|
+
- For filing a single bug — use `/qa-session` or `/triage-issue`
|
|
123
|
+
- For a plan that exists but has no PRD — use `/plan` then revisit this skill
|
|
124
|
+
- For triaging existing issues (not creating new ones) — this skill is create-only
|
|
@@ -114,7 +114,25 @@ Concise description of this vertical slice. End-to-end behavior, not layer-by-la
|
|
|
114
114
|
|
|
115
115
|
## Rules
|
|
116
116
|
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
117
|
+
- **MUST** slice vertically — every phase cuts through all layers (schema, API, UI, tests). Horizontal layer-by-layer phases defer integration risk to the end.
|
|
118
|
+
- **MUST** identify Architectural Decisions **before** slicing — decisions that apply across phases live in their own section, not repeated in each phase
|
|
119
|
+
- **NEVER** embed file paths, function names, or implementation details that couple the plan to current code — the plan outlives the code it describes
|
|
120
|
+
- **NEVER** write the plan file before the user approves the slicing — drafts burn tokens and invite scope drift
|
|
121
|
+
- **CRITICAL**: each phase is independently demoable on its own. If phase N only makes sense in combination with phase N+1, merge them.
|
|
122
|
+
- **MANDATORY**: the first phase ships **end-to-end** (however thin). Deferring any layer to a later phase defeats tracer-bullet discipline.
|
|
123
|
+
|
|
124
|
+
## Gotchas
|
|
125
|
+
|
|
126
|
+
- Architectural Decisions feel like premature commitment — "we can decide routes later". In practice, every phase needs a route to hit, so postponing them creates conflicting guesses across phases. Decide once, apply everywhere.
|
|
127
|
+
- PRDs with long lists of user stories tempt the planner to make each story a phase. User stories are requirements, not phases — group several stories into one vertical slice when they share architecture.
|
|
128
|
+
- "Demoable" means an external stakeholder can watch the feature work, not that a unit test passes. If a phase only ships backend API with no UI to exercise it, it is not demoable.
|
|
129
|
+
- Fetching the PRD with `gh issue view <n>` captures the body but not the comments. Crucial clarifications often live in the comments — include `--comments` or remind the user to paste important threads.
|
|
130
|
+
- Plans written against a moving PRD (the PRD is still being edited) invalidate on every edit. Freeze the PRD snapshot at plan-write time, reference the snapshot commit or comment ID.
|
|
131
|
+
|
|
132
|
+
## When NOT to Use
|
|
133
|
+
|
|
134
|
+
- For filing GitHub issues from a plan — use `/prd-to-issues`
|
|
135
|
+
- For writing the PRD itself — use `/write-a-prd`
|
|
136
|
+
- For planning without a PRD — use `/plan` (general-purpose)
|
|
137
|
+
- For stress-testing a plan that already exists — use `/grill-me`
|
|
138
|
+
- For refactor planning — use `/refactor-plan` (incremental commits, not tracer bullets)
|
|
@@ -76,3 +76,28 @@ Output a markdown report:
|
|
|
76
76
|
- [ ] Review [high-dependent file] with extra scrutiny
|
|
77
77
|
- [ ] Run integration tests covering [affected area]
|
|
78
78
|
```
|
|
79
|
+
|
|
80
|
+
## Rules
|
|
81
|
+
|
|
82
|
+
- **MUST** base risk scores on measurable signals (dependent count, coverage, diff size) — not vibes or adjective scales
|
|
83
|
+
- **MUST** name at least one specific action per high-risk file — "review carefully" is not an action
|
|
84
|
+
- **NEVER** predict regressions beyond what the signals justify. A single file with 20 dependents is a signal; a generic "this might break things" is noise.
|
|
85
|
+
- **NEVER** skip the test-coverage factor — a high-dependent file with 100% coverage is lower risk than a low-dependent file with none
|
|
86
|
+
- **CRITICAL**: the report ranks files by weighted risk score, not alphabetically. Readers will stop after the first 5 entries.
|
|
87
|
+
- **MANDATORY**: state the confidence level explicitly. Predictions from a 5-line diff are HIGH confidence; predictions from 500-line refactors are LOW.
|
|
88
|
+
|
|
89
|
+
## Gotchas
|
|
90
|
+
|
|
91
|
+
- `grep -rl "import.*from.*[target]"` is easily fooled by comments and string literals. Use the language's real AST tools (`ts-morph`, `ast-grep`, `pyflakes`) for accurate dependency graphs on anything beyond trivial diffs.
|
|
92
|
+
- Dynamic imports (`importlib.import_module`, `require(variable)`, JavaScript `await import()`) are invisible to grep. Flag explicitly when the target uses them.
|
|
93
|
+
- Test coverage reported by CI may exclude generated code, migrations, and `__init__.py`. "Has dedicated test = score 1" assumes a real assertion exists — check the test file rather than just the path match.
|
|
94
|
+
- A 5-line diff in a "core" file is often more dangerous than a 500-line diff in a leaf file. The `change_surface` weight alone is misleading; combine with `shared/core` weight for meaningful signals.
|
|
95
|
+
- Predictions about regressions are calibrated against the current test suite, not unknown production behaviors. A "low-risk" verdict means "tests likely pass", not "users will not notice".
|
|
96
|
+
|
|
97
|
+
## When NOT to Use
|
|
98
|
+
|
|
99
|
+
- For **executing** a change after prediction — use `/fix`, `/refactor`, or the relevant skill
|
|
100
|
+
- For PR review of logic quality — use `/review`
|
|
101
|
+
- For CI pipeline risk analysis — use `/ci-cd-patterns`
|
|
102
|
+
- For code quality metrics (complexity, duplication) — use `/analyze`
|
|
103
|
+
- For a brand-new codebase with no change history — this skill needs dependents to measure; use `/explore` first
|
|
@@ -101,10 +101,26 @@ After filing, share URLs and ask: "Next issue, or are we done?"
|
|
|
101
101
|
|
|
102
102
|
## Rules
|
|
103
103
|
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
106
|
-
- **
|
|
107
|
-
- **
|
|
108
|
-
- **
|
|
109
|
-
- **
|
|
110
|
-
- **
|
|
104
|
+
- **MUST** use the project's domain language from `UBIQUITOUS_LANGUAGE.md` — framework jargon in issues excludes non-engineering stakeholders
|
|
105
|
+
- **MUST** describe behaviors, not code — "sync service fails to apply patch" not "applyPatch() throws"
|
|
106
|
+
- **MUST** include reproduction steps — if they are not clear, ask the user rather than guess
|
|
107
|
+
- **NEVER** include file paths, line numbers, or function names in issue bodies — they go stale before triage
|
|
108
|
+
- **NEVER** over-interview. Cap clarifying questions at 2-3 per bug; more than that is signal the bug needs a QA session with a product owner, not more questions.
|
|
109
|
+
- **CRITICAL**: the developer who picks up the issue should understand it in 30 seconds. Wall-of-text reports get reopened for clarification.
|
|
110
|
+
- **MANDATORY**: when breaking one report into multiple issues, file them in dependency order so blockers have real issue numbers to reference
|
|
111
|
+
|
|
112
|
+
## Gotchas
|
|
113
|
+
|
|
114
|
+
- Domain language in `UBIQUITOUS_LANGUAGE.md` may be out of date. If it was last updated months ago and new features have shipped, the glossary is an input hint, not a source of truth — confirm terms with the user when unsure.
|
|
115
|
+
- "Intermittent" reports are often environmental (one user's browser, one region's data) rather than truly random. Always ask for "how often" and "when did it start" before labeling as race condition.
|
|
116
|
+
- `gh issue create` opens `$EDITOR` without `--body`. In automation this hangs — always pass the body file or inline body.
|
|
117
|
+
- Users often describe the **workaround** as if it were the bug ("I have to refresh the page"). Drill to the underlying behavior — "what fails before the refresh?" — otherwise the fix targets the symptom.
|
|
118
|
+
- Independent sub-issues from one bug report can duplicate work if each gets a different developer. Mention the parent QA session in every sub-issue so reviewers notice the pattern.
|
|
119
|
+
|
|
120
|
+
## When NOT to Use
|
|
121
|
+
|
|
122
|
+
- For triaging a **single** known bug with a proposed fix — use `/triage-issue`
|
|
123
|
+
- For creating issues from a PRD — use `/prd-to-issues`
|
|
124
|
+
- For debugging a reproducible error — use `/debug`
|
|
125
|
+
- For code review of a PR that addresses a bug — use `/review`
|
|
126
|
+
- For architecture-level problems — use `/architecture-audit`, not bug reports
|
|
@@ -202,3 +202,29 @@ docker exec {api-container} python3 scripts/evaluate_rag.py
|
|
|
202
202
|
# Detect gaps
|
|
203
203
|
docker exec {api-container} python3 scripts/knowledge_gaps.py --detect
|
|
204
204
|
```
|
|
205
|
+
|
|
206
|
+
## Rules
|
|
207
|
+
|
|
208
|
+
- **MUST** chunk by document structure (headers, lists, code fences), not by fixed byte/token count — structure-aware chunking recovers 20-40% of retrieval quality on technical docs
|
|
209
|
+
- **MUST** always use **hybrid search** (BM25 + vector) for keyword-heavy queries — pure vector search misses exact identifiers (function names, config keys)
|
|
210
|
+
- **NEVER** trust a single embedding model on multilingual corpora; pair with a bilingual model or translate queries at the edge
|
|
211
|
+
- **NEVER** index without content-hash change detection — full rebuilds on every change waste embedding budget and corrupt orphan tracking
|
|
212
|
+
- **CRITICAL**: every response includes verifiable citations (source path + exact chunk). A RAG answer without traceable sources is a hallucination wearing a badge.
|
|
213
|
+
- **MANDATORY**: evaluate with a golden dataset (faithfulness, relevancy, context precision) before promoting any pipeline change to production
|
|
214
|
+
|
|
215
|
+
## Gotchas
|
|
216
|
+
|
|
217
|
+
- Top-k cosine similarity is **not** relevance — semantically close chunks may be topically wrong. Always compare hybrid vs pure-vector scores on a held-out set before committing to one.
|
|
218
|
+
- Default embedding models (e.g., `text-embedding-ada-002`) underperform on long technical docs (>8k tokens). For long-form content consider chunking before embedding, not embedding then slicing.
|
|
219
|
+
- Chunk overlap (10-20%) helps narrative text but duplicates storage and token cost. Code and structured tables do not benefit from overlap — disable per content type.
|
|
220
|
+
- Cross-encoder rerankers (e.g., `bge-reranker`) add 100-300ms per query. For real-time UX, rerank only the top-20 candidates, not the top-100.
|
|
221
|
+
- RAG failure modes are structural (retrieval, routing, chunking), not prompt-level. Before "tuning the prompt", check retrieval metrics — a prompt fix on top of broken retrieval is theater.
|
|
222
|
+
- Query rewriting (HyDE, hypothetical doc generation) improves some queries and degrades others. A/B test before enabling globally; a blanket "always rewrite" often regresses simple lookups.
|
|
223
|
+
|
|
224
|
+
## When NOT to Load
|
|
225
|
+
|
|
226
|
+
- For **executing** a reindex — use `/index` (task skill)
|
|
227
|
+
- For measuring RAG quality — use `/evaluate` (task skill)
|
|
228
|
+
- For chunking documentation strategy without an index — this skill assumes you already have a vector store; use `/architecture-decision` for pipeline choice
|
|
229
|
+
- For MCP-specific retrieval via `smart_query()` — the tool is already built; reach for this skill only when tuning the underlying index
|
|
230
|
+
- For prompt engineering alone without retrieval concerns — use `/prompt-caching-patterns` or the relevant language skill
|
|
@@ -138,3 +138,29 @@ Teammate 1 completes first, then Teammate 2 acts on the plan.
|
|
|
138
138
|
- Want to validate architecture? → `/analyze` for code quality metrics
|
|
139
139
|
- Need tests before refactoring? → `/tdd` to build safety net first
|
|
140
140
|
- Architecture decision needed? → `/council` for multi-perspective evaluation
|
|
141
|
+
|
|
142
|
+
## Rules
|
|
143
|
+
|
|
144
|
+
- **MUST** run the full test suite before starting — a green baseline is the only way to tell the refactor did not break anything
|
|
145
|
+
- **MUST** preserve behavior end-to-end; if behavior must change, stop and ask — "while we're here" changes are how refactors introduce bugs
|
|
146
|
+
- **NEVER** mix refactoring with feature changes in the same commit — they fail review and rollback differently
|
|
147
|
+
- **NEVER** refactor untested code without adding tests first — the refactor has nothing to assert against
|
|
148
|
+
- **CRITICAL**: commits stay small and individually reversible. A 2000-line refactor commit cannot be code-reviewed and cannot be bisected.
|
|
149
|
+
- **MANDATORY**: dead-code cleanup is part of the refactor per Constitution Art. VI.1 — orphaned references left behind from a refactor are a quality regression, not "later work"
|
|
150
|
+
|
|
151
|
+
## Gotchas
|
|
152
|
+
|
|
153
|
+
- "Behavior-preserving" refactors still change **observable** things: timing, memory allocation, error message text, log line format. Downstream consumers may rely on these — scan for log parsers or monitoring rules before changing prose in exceptions.
|
|
154
|
+
- IDE rename refactors miss dynamic references (string-keyed dicts, reflection, `getattr`, dynamic imports). After a rename, grep for the old name in strings and comments — the IDE will not.
|
|
155
|
+
- Git history diffing is confused by combined move + content changes. Split moves into their own commit (`git mv` + tiny commit) so later reviewers can use `git log --follow`.
|
|
156
|
+
- Preserving backward compatibility is a spectrum. "Keep the old function as a thin wrapper" sounds safe but often defers the cleanup forever — prefer deprecate-with-warning followed by a scheduled removal.
|
|
157
|
+
- Refactor-to-DRY abstractions made from 2 use cases often need to be torn down when the 3rd use case arrives (Rule of Three). Resist abstracting until the third repetition makes the shape obvious.
|
|
158
|
+
- Test suites that rely on mocks frequently pass during refactors that silently break real behavior (the mock reflects the old shape). Run integration tests, not just unit, before marking done.
|
|
159
|
+
|
|
160
|
+
## When NOT to Use
|
|
161
|
+
|
|
162
|
+
- For **planning** a refactor (no execution) — use `/refactor-plan`
|
|
163
|
+
- For architectural audit of shallow modules — use `/architecture-audit`
|
|
164
|
+
- For fixing a specific bug — use `/fix` or `/debug`
|
|
165
|
+
- For adding a feature — use `/plan` then the relevant language skill
|
|
166
|
+
- When tests do not exist or are red — write tests first (`/tdd`) before refactoring
|
|
@@ -105,9 +105,26 @@ What is explicitly NOT part of this refactor.
|
|
|
105
105
|
|
|
106
106
|
## Rules
|
|
107
107
|
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
- **
|
|
108
|
+
- **MUST** present >=3 alternative approaches with trade-offs before committing to one
|
|
109
|
+
- **MUST** break the refactor into commits small enough to roll back individually — a commit that cannot be reverted is not tiny
|
|
110
|
+
- **MUST** verify test coverage of the affected area before planning; insufficient coverage is a blocker, not a warning
|
|
111
|
+
- **NEVER** embed file paths, code snippets, or function names in the issue body — the plan outlives the code
|
|
112
|
+
- **NEVER** ask for review after creating the issue — file it immediately, share the URL, iterate in comments
|
|
113
|
+
- **CRITICAL**: dead-code cleanup is **per step**, not deferred (Constitution Art. VI.1). "We'll delete the old code later" is only acceptable during explicit expand-contract phases, and the cleanup step must be in the plan.
|
|
114
|
+
- **MANDATORY**: the Out of Scope section names what is NOT part of this refactor — scope clarity prevents reviewer confusion
|
|
115
|
+
|
|
116
|
+
## Gotchas
|
|
117
|
+
|
|
118
|
+
- "Tiny" is relative to the reviewer's context. A 20-line commit that touches the hot path is not tiny in practice — tiny means **tractable**, not short.
|
|
119
|
+
- Tests for refactors are often omitted with "the existing tests cover it". Verify by running the suite with coverage in the affected area, not by asking.
|
|
120
|
+
- Rebasing a long chain of tiny commits is painful when the target branch moves. Recommend landing the chain weekly and rebasing on `main` before each review round.
|
|
121
|
+
- GitHub issue RFCs tend to get stale if the refactor drags. Add a "Status" line that updates with each landed commit so readers see progress without scrolling through comments.
|
|
122
|
+
- Expand-contract refactors with double-writes silently leak cost — both paths are live, both pay resources. Set a hard deadline in the plan for when the old path is removed.
|
|
123
|
+
|
|
124
|
+
## When NOT to Use
|
|
125
|
+
|
|
126
|
+
- For **executing** a refactor directly — use `/refactor`
|
|
127
|
+
- For architecture-level audit without a specific refactor in mind — use `/architecture-audit`
|
|
128
|
+
- For creating a PRD (product requirements) — use `/write-a-prd`
|
|
129
|
+
- For a plan without the GitHub RFC step — use `/plan` or `/plan-writing`
|
|
130
|
+
- For interface design of a single module — use `/design-an-interface`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rollback
|
|
3
|
-
description: "Roll back a deployment
|
|
3
|
+
description: "Roll back a git commit, database migration, or deployment to a previous known-good state with safety checks and health verification. Use when the user wants to revert recent changes safely — not to undo local edits or halt the whole system."
|
|
4
4
|
effort: medium
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
argument-hint: "[target: git/db/deploy]"
|
|
@@ -85,3 +85,29 @@ Before any rollback:
|
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
> **CRITICAL: Always confirm with the user before executing destructive rollback operations.**
|
|
88
|
+
|
|
89
|
+
## Rules
|
|
90
|
+
|
|
91
|
+
- **MUST** confirm the current state AND the target state before rolling back — surface the diff in plain English
|
|
92
|
+
- **MUST** verify a recent backup exists (for DB rollbacks) or explicitly warn the user that none was found
|
|
93
|
+
- **NEVER** roll back without an explicit "yes" from the user — rollbacks are irreversible in the user-experience sense even when technically reversible
|
|
94
|
+
- **NEVER** `git reset --hard` on a branch others have pulled from — it rewrites shared history
|
|
95
|
+
- **CRITICAL**: after any rollback, run a health check (`/health` or the project's equivalent) to confirm the target state is stable — a "successful" rollback to a broken baseline is worse than the original state
|
|
96
|
+
- **MANDATORY**: log the rollback with timestamp, scope, and reason — post-mortems need this trail
|
|
97
|
+
|
|
98
|
+
## Gotchas
|
|
99
|
+
|
|
100
|
+
- `git revert` creates a **new commit** that undoes the target commit. The reverted commit is still in history — if the target commit was sensitive (secret, PII), revert alone does not remove it. Use history rewriting tools for that.
|
|
101
|
+
- Database migration rollbacks sometimes **lose data**. A forward migration that added a NOT NULL column with a default, then populated it with user data, cannot restore the column contents on rollback — the data is gone.
|
|
102
|
+
- Kubernetes `kubectl rollout undo` rolls back to the previous ReplicaSet, not to a specific version. If you need "rollback to v1.2.3 specifically", track deployments by image tag and use `kubectl set image`, not `rollout undo`.
|
|
103
|
+
- Heroku and similar PaaS platforms `rollback` restores the slug but not environment config that changed after the rollback target was built — new env vars or add-ons may break the rolled-back version.
|
|
104
|
+
- `git reset --soft` preserves staged changes, `--mixed` (default) preserves working tree, `--hard` discards both. Wrong flag = lost work; always state the flag explicitly in the confirmation prompt.
|
|
105
|
+
- Restoring a DB backup on top of an active database can cause data loss between the backup time and the restore time. Take a fresh snapshot before the restore, even when rolling back — the current (broken) state might contain post-backup user writes.
|
|
106
|
+
|
|
107
|
+
## When NOT to Use
|
|
108
|
+
|
|
109
|
+
- For emergency halt of all agent activity — use `/panic`
|
|
110
|
+
- For undoing local uncommitted edits — use `git checkout` directly, not this skill
|
|
111
|
+
- For an incident with user-facing impact — use `/workflow incident-response` for coordinated response
|
|
112
|
+
- For planned schema changes — use `/migrate` with a forward rollback migration, not this skill after-the-fact
|
|
113
|
+
- For a feature flag off-switch — toggle the flag; rollback is a heavier tool than needed
|
|
@@ -100,3 +100,30 @@ For authorization patterns (RBAC, ABAC), see [reference/authorization.md](refere
|
|
|
100
100
|
For input validation patterns (SQL injection, XSS, Pydantic), see [reference/input-validation.md](reference/input-validation.md).
|
|
101
101
|
|
|
102
102
|
For OAuth2 flows, CSRF protection, and audit logging, see [reference/oauth-csrf-audit.md](reference/oauth-csrf-audit.md).
|
|
103
|
+
|
|
104
|
+
## Rules
|
|
105
|
+
|
|
106
|
+
- **MUST** validate all input at the trust boundary, not inside business logic — deep validation allows bad data to spread before rejection
|
|
107
|
+
- **MUST** use parameterized queries (prepared statements) for every SQL interaction — string concatenation is SQL injection
|
|
108
|
+
- **NEVER** store secrets (API keys, tokens, passwords) in code, config files, or git history — use the platform's secret manager
|
|
109
|
+
- **NEVER** log passwords, tokens, PII, or PHI — even at debug level. Logs reach aggregation systems, backups, and disk snapshots.
|
|
110
|
+
- **NEVER** roll your own crypto. Use vetted libraries (bcrypt/argon2 for passwords, libsodium for crypto) and accept their defaults.
|
|
111
|
+
- **CRITICAL**: authentication (who you are) and authorization (what you can do) are distinct concerns. Confusing them produces privilege escalation bugs; AuthN passes → AuthZ still runs.
|
|
112
|
+
- **MANDATORY**: every endpoint is authenticated and authorized by default. Public endpoints are explicit opt-outs, not unmarked defaults.
|
|
113
|
+
|
|
114
|
+
## Gotchas
|
|
115
|
+
|
|
116
|
+
- JWT tokens signed with `none` algorithm are valid-looking tokens with no signature. Libraries that trust the `alg` header field accept them — always validate `alg` against an allowlist, never use the token's own declaration.
|
|
117
|
+
- `bcrypt` has a 72-byte password length cap; longer passwords are silently truncated, making "UniqueLongPassword..." collide with "UniqueLong...". Pre-hash with SHA-256 before bcrypt for >72 char passwords.
|
|
118
|
+
- `SameSite=Lax` cookies are **sent** on top-level navigations (including POST from a malicious site) in some browsers. CSRF protection requires either `SameSite=Strict` or explicit CSRF tokens; relying on `Lax` alone is insufficient for state-changing endpoints.
|
|
119
|
+
- `Content-Security-Policy` with `unsafe-inline` allows any inline script to run — negating most of CSP's value. Remove `unsafe-inline` and refactor to external scripts, even if it means extra files.
|
|
120
|
+
- Environment variables leak via `printenv` in debug endpoints, `/proc/<pid>/environ` on Linux, and process listings. Prefer mounting secrets as files (Docker secrets, Kubernetes secrets) for defense in depth.
|
|
121
|
+
- Rate limiting by IP address is bypassed by CDN proxies and legitimate shared NAT. Apply rate limits at the **authenticated user** level when possible; IP-level is a coarse last resort.
|
|
122
|
+
|
|
123
|
+
## When NOT to Load
|
|
124
|
+
|
|
125
|
+
- For dependency vulnerability scanning — use `/cve-scan`
|
|
126
|
+
- For HIPAA-specific healthcare compliance — use `/hipaa-validate`
|
|
127
|
+
- For threat modeling of a new architecture — delegate to the `security-architect` agent
|
|
128
|
+
- For penetration testing and CVE exploitation — delegate to `security-auditor` agent
|
|
129
|
+
- For content moderation (LLM safety filters) — use `/content-moderation-patterns`
|
|
@@ -130,8 +130,25 @@ The `/skill-audit` slash command wraps this scanner with Claude's analysis for r
|
|
|
130
130
|
|
|
131
131
|
## Rules
|
|
132
132
|
|
|
133
|
-
-
|
|
134
|
-
- HIGH
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
133
|
+
- **MUST** remain read-only by default — file modifications require the explicit `--fix` flag
|
|
134
|
+
- **MUST** exit with non-zero status on any HIGH finding so CI pipelines can gate merges
|
|
135
|
+
- **NEVER** auto-fix HIGH-severity findings — only the human owner decides on dangerous code
|
|
136
|
+
- **NEVER** silence findings by adding exceptions in the audit config; either fix the code or document why the pattern is safe in the skill body
|
|
137
|
+
- **CRITICAL**: scan both `app/skills/` and `app/agents/` — agents without tool restrictions are the same risk class as skills with broad `allowed-tools`
|
|
138
|
+
- **MANDATORY**: every finding names a specific fix (replace `eval()` with `ast.literal_eval()`, add missing `allowed-tools`). A finding without a fix is triage noise.
|
|
139
|
+
|
|
140
|
+
## Gotchas
|
|
141
|
+
|
|
142
|
+
- Regex-based secret detection catches canonical patterns (`sk-...`, `ghp_...`) but misses custom API key formats used by internal services. Augment the regex list with project-specific patterns before trusting "0 HIGH findings".
|
|
143
|
+
- `--fix` on `allowed-tools` infers minimal tool sets from imports, but skills that shell out via Bash may need tools not visible in the static scan. Review auto-added restrictions before merging.
|
|
144
|
+
- Knowledge skills (`user-invocable: false`) with Bash access are HIGH because they auto-load and can act without user triggering. Legitimate exceptions (e.g., `research-mastery` calling `smart_query()`) should be explicitly whitelisted in the audit config with a comment.
|
|
145
|
+
- The scanner flags `eval(` even inside docstrings and commented-out code. Context-aware scanning is hard; the alternative is reviewing each HIGH flag manually — the scan errs on the side of false positives.
|
|
146
|
+
- CI integration with `--ci` exits 1 on any HIGH, which **blocks the commit**. A sudden pattern match (e.g., a legitimate new use of `subprocess.run`) can block unrelated PRs. Keep a fast path for pre-approving new patterns.
|
|
147
|
+
|
|
148
|
+
## When NOT to Use
|
|
149
|
+
|
|
150
|
+
- For general code-quality metrics (complexity, coverage, duplication) — use `/analyze`
|
|
151
|
+
- For dependency CVE scans — use `/cve-scan`
|
|
152
|
+
- For HIPAA-specific audits — use `/hipaa-validate`
|
|
153
|
+
- For live pentesting of a deployed app — delegate to the `security-auditor` agent
|
|
154
|
+
- When the project has its own security scanner (semgrep, snyk) — prefer it; `/skill-audit` is toolkit-specific
|
|
@@ -48,7 +48,7 @@ Create a new skill following the Agent Skills standard.
|
|
|
48
48
|
|
|
49
49
|
## Writing Guidelines
|
|
50
50
|
|
|
51
|
-
- **Description**: third person ("Generates...", "Provides..."), include searchable key terms
|
|
51
|
+
- **Description**: third person ("Generates...", "Provides..."), **min 50 chars**, include searchable key terms **and a trigger hint** (e.g., "Use when..."). Short descriptions cause over-triggering — adjacent skills fight for the same query.
|
|
52
52
|
- **Name**: lowercase, hyphens, max 64 chars -- match the directory name
|
|
53
53
|
- **Length**: SKILL.md under 500 lines; use `reference/` for overflow
|
|
54
54
|
- **Be concise**: Claude is smart -- give structure, not lectures
|
|
@@ -57,6 +57,26 @@ Create a new skill following the Agent Skills standard.
|
|
|
57
57
|
- **Use `$ARGUMENTS`**: place it early so user input is visible
|
|
58
58
|
- **Tables over prose**: for options, patterns, mappings
|
|
59
59
|
|
|
60
|
+
## Mandatory Sections (meta-architect audit criteria)
|
|
61
|
+
|
|
62
|
+
Every SKILL.md must contain all five, or it will lower the toolkit quality score:
|
|
63
|
+
|
|
64
|
+
1. **Description ≥50 chars** with trigger hint in frontmatter
|
|
65
|
+
2. **At least one concrete example** — fenced code block or `## Example` section
|
|
66
|
+
3. **Hard rules** using uppercase markers: `MUST`, `NEVER`, `CRITICAL`, `MANDATORY`, or `DO NOT`
|
|
67
|
+
4. **"When NOT to Use" section** — list 2-3 adjacent skills and the boundary between them
|
|
68
|
+
5. **Under 500 lines** — split into `reference/` if needed
|
|
69
|
+
|
|
70
|
+
These map directly to the mutation strategies in `meta-architect.md`:
|
|
71
|
+
`add_example`, `add_constraint`, `add_edge_case`, `restructure`.
|
|
72
|
+
|
|
73
|
+
### Rules vs Gotchas — different semantic buckets
|
|
74
|
+
|
|
75
|
+
Split the "hard rules" criterion into two sections when both apply:
|
|
76
|
+
|
|
77
|
+
- **`## Rules`** — prescriptive process constraints (always-true MUST / NEVER): *"MUST form a testable hypothesis before changing code"*, *"NEVER force-push main"*. Required in every skill.
|
|
78
|
+
- **`## Gotchas`** — environment-specific traps the agent would miss without being told, taken from [Anthropic's best practices](https://agentskills.io/skill-creation/best-practices.md#gotchas-sections). Example from their docs: *"The `users` table uses soft deletes. Queries must include `WHERE deleted_at IS NULL` or results will include deactivated accounts."* Add this section only when real domain traps exist — do not pad with a `(none)` placeholder.
|
|
79
|
+
|
|
60
80
|
## Directory Structure
|
|
61
81
|
|
|
62
82
|
```
|
|
@@ -74,7 +94,7 @@ Only create subdirectories when the skill needs them. Most skills are a single S
|
|
|
74
94
|
```markdown
|
|
75
95
|
---
|
|
76
96
|
name: {name}
|
|
77
|
-
description: "{Third-person description with
|
|
97
|
+
description: "{Third-person description, min 50 chars, with trigger hint like 'Use when...'}"
|
|
78
98
|
argument-hint: "[hint]"
|
|
79
99
|
allowed-tools: Read, Grep, Glob
|
|
80
100
|
---
|
|
@@ -97,25 +117,46 @@ $ARGUMENTS
|
|
|
97
117
|
2. **Step two**
|
|
98
118
|
3. **Step three**
|
|
99
119
|
|
|
100
|
-
##
|
|
120
|
+
## Example
|
|
101
121
|
|
|
102
|
-
|
|
122
|
+
\`\`\`
|
|
123
|
+
/{name} example-argument
|
|
124
|
+
\`\`\`
|
|
125
|
+
|
|
126
|
+
{Expected observable behavior.}
|
|
103
127
|
|
|
104
128
|
## Rules
|
|
105
129
|
|
|
106
|
-
- {
|
|
107
|
-
- {
|
|
130
|
+
- **MUST** {non-negotiable rule 1}
|
|
131
|
+
- **NEVER** {forbidden action}
|
|
132
|
+
- **CRITICAL**: {safety constraint}
|
|
133
|
+
|
|
134
|
+
## Gotchas
|
|
135
|
+
|
|
136
|
+
- {environment-specific trap the agent would miss — concrete, not general}
|
|
137
|
+
- {non-obvious behavior of a tool, API, or data layout}
|
|
138
|
+
|
|
139
|
+
## When NOT to Use
|
|
140
|
+
|
|
141
|
+
- For {adjacent use case} -- use `/{other-skill}` instead
|
|
142
|
+
- For {another case} -- use `/{another-skill}`
|
|
143
|
+
- If {precondition} is not met
|
|
108
144
|
```
|
|
109
145
|
|
|
146
|
+
Leave out `## Gotchas` entirely when the skill has no domain-specific traps — it is not mandatory, and a stub with nothing concrete is worse than no section.
|
|
147
|
+
|
|
110
148
|
## Quality Checklist
|
|
111
149
|
|
|
112
150
|
Before finalizing, verify:
|
|
113
151
|
|
|
114
|
-
- [ ] Description
|
|
115
|
-
- [ ]
|
|
152
|
+
- [ ] Description ≥50 chars, third-person, with trigger hint
|
|
153
|
+
- [ ] At least one concrete code-fenced example
|
|
154
|
+
- [ ] `## Rules` section with prescriptive MUST / NEVER / CRITICAL / MANDATORY
|
|
155
|
+
- [ ] `## Gotchas` section when the domain has real environment-specific traps (otherwise omit)
|
|
156
|
+
- [ ] `## When NOT to Use` section naming 2-3 adjacent skills
|
|
157
|
+
- [ ] SKILL.md under 500 lines
|
|
116
158
|
- [ ] No time-sensitive information (versions, dates)
|
|
117
159
|
- [ ] Consistent terminology throughout
|
|
118
|
-
- [ ] Examples are concrete, not abstract
|
|
119
160
|
- [ ] File references max 1 level deep
|
|
120
161
|
- [ ] Workflows have numbered steps
|
|
121
162
|
- [ ] Frontmatter fields match classification type
|