$npx -y skills add softspark/ai-toolkit --skill ai-toolkit-rulesMandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every technical, coding, debugging, review, architecture, DevOps, data, or file-editing task in Chat or Cowork.
| 1 | # AI Toolkit Rules |
| 2 | |
| 3 | Apply every relevant rule below before acting. Treat MUST/NEVER language as mandatory. |
| 4 | |
| 5 | ## Source: `app/rules/claude-toolkit-rules.md` |
| 6 | |
| 7 | # Claude Toolkit |
| 8 | |
| 9 | Shared AI development toolkit — lifecycle hooks, safety constitution, multi-platform support. |
| 10 | |
| 11 | ## Skill Tiers |
| 12 | |
| 13 | - **Tier 1** — single-agent: `/debug`, `/review`, `/refactor`, `/analyze`, `/docs`, `/plan`, `/explain`, `/tdd`, `/triage-issue` |
| 14 | - **Tier 1.5** — planning: `/write-a-prd` → `/prd-to-plan` → `/prd-to-issues`; design: `/design-an-interface`, `/architecture-audit`, `/refactor-plan` |
| 15 | - **Tier 2** — multi-agent: `/workflow <type>` (feature-development, backend-feature, frontend-feature, api-design, database-evolution, test-coverage, security-audit, debugging, incident-response, spike, codebase-onboarding, performance-optimization, infrastructure-change, application-deploy, proactive-troubleshooting) |
| 16 | - **Tier 3** — custom: `/orchestrate <desc>` (3–6 agents) | `/swarm <mode> <desc>` (map-reduce | consensus | relay) |
| 17 | |
| 18 | ## Path Safety |
| 19 | - NEVER guess or hallucinate user home directory paths |
| 20 | - Use `~` or `$HOME` instead of hardcoded `/Users/<username>/` or `/home/<username>/` |
| 21 | - When an absolute path is needed, run `echo $HOME` first to get the correct value |
| 22 | |
| 23 | ## User Preferences |
| 24 | |
| 25 | - **Style:** Direct & efficient. No pleasantries. Measurable results. |
| 26 | - **Methodology:** Provide >=3 alternatives. Use Socratic questioning. |
| 27 | - **Review:** Apply "Devil's Advocate" critique to decisions. |
| 28 | |
| 29 | ## Source: `app/rules/git-conventions.md` |
| 30 | |
| 31 | # Git Conventions |
| 32 | |
| 33 | - Do NOT add `Co-Authored-By: Claude` or any AI co-authorship to commits |
| 34 | - Do NOT add Claude signatures or attribution to commit messages |
| 35 | - Conventional commits format: `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:` |
| 36 | |
| 37 | ## Source: `app/rules/output-mode.md` |
| 38 | |
| 39 | # Output Mode |
| 40 | |
| 41 | `output-mode: concise` |
| 42 | |
| 43 | Default response mode for this project is **concise**. The `brand-voice` skill (when present in ai-toolkit) auto-loads its `concise` rules; assistants without that skill should still apply the directives below. |
| 44 | |
| 45 | ## Concise Mode Directives |
| 46 | |
| 47 | - **No preamble.** Skip "I'll now...", "Sure, let me...", "Great question!" and similar warm-ups. Start with the answer. |
| 48 | - **Lead with the result.** Conclusion or output first; explanation only if asked or non-obvious. |
| 49 | - **Max 3 sentences per closed question.** Yes/no, single-fact, or "where is X" answers stay under three sentences. |
| 50 | - **Tables and lists over prose** when comparing options, listing steps, or showing values. |
| 51 | - **No trailing summaries.** If the diff or output already shows what changed, do not restate it. |
| 52 | - **Drop filler adjectives.** No "nice", "great", "powerful", "robust" unless the user asked for evaluation. |
| 53 | - **Cite file paths as `path:line`** instead of paragraphs describing where things live. |
| 54 | - **Reserve longer prose** for: architecture proposals, trade-off analyses, plans with risks. Everything else: terse. |
| 55 | |
| 56 | ## When to escalate to verbose |
| 57 | |
| 58 | - User explicitly asks: "explain in detail", "walk me through", "give me the full picture". |
| 59 | - Reporting a non-obvious failure mode where missing context would mislead. |
| 60 | - Architecture / RFC / ADR / trade-off documents — those have their own structure. |
| 61 | |
| 62 | ## How to override |
| 63 | |
| 64 | - Per-session: `/brand-voice default` (or `/brand-voice strict` for even tighter) |
| 65 | - Per-project: change this rule's `output-mode:` value in the project's `CLAUDE.md` |
| 66 | - Permanent removal: re-run `ai-toolkit install --skip rules` or strip the `<!-- TOOLKIT:output-mode -->` block manually |
| 67 | |
| 68 | ## Source: `app/rules/quality-gates.md` |
| 69 | |
| 70 | # Quality Gates & Mandatory Practices |
| 71 | |
| 72 | ## MANDATORY PRACTICES |
| 73 | 1. **Plan First:** Tasks >1h require Plan, Success Criteria, and Pre-Mortem. |
| 74 | 2. **Quality Gates:** |
| 75 | * `ruff check .` (0 errors) |
| 76 | * `mypy --strict src/` (0 errors) |
| 77 | * `pytest --cov=src` (>70% coverage) |
| 78 | * **Type Safety:** 100% public APIs, >60% internal. |
| 79 | 3. **Security:** No secrets in code, sanitization, auth z/n. |
| 80 | |
| 81 | ## Source: `app/rules/common/coding-style.md` |
| 82 | |
| 83 | # Universal Coding Style |
| 84 | |
| 85 | ## Principles |
| 86 | - KISS: simplest solution that works. Clever code is a liability. If 200 lines could be 50, rewrite. |
| 87 | - DRY: extract when you repeat 3+ times, not before. |
| 88 | - YAGNI: do not build features "just in case." No abstractions for single-use code. |
| 89 | - Prefer immutability: use `const`, `final`, `val`, `let` by default. |
| 90 | - Fail fast: validate inputs at boundaries, return early on errors. |
| 91 | - State assumptions before coding. If uncertain or multiple interpretations exist, ask — don't pick silently. |
| 92 | |
| 93 | ## Naming |
| 94 | - Use descriptive names that reveal intent (`remainingRetries`, not `r`). |
| 95 | - Boolean variables/functions: prefix with `is`, `has`, `can`, `should`. |
| 96 | - Functions: verb |