ai-toolkit-rules
Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…
Audits codebase for architectural friction, shallow modules; proposes RFCs. Triggers: improve architecture, shallow modules, deepen modules, reduce coupling.
Claude Code
$ npx -y skills add softspark/ai-toolkit --skill architecture-audit --agent claude-code
Codex
$ npx skills add softspark/ai-toolkit --skill architecture-audit -a codex -y
Cursor
$ npx skills add softspark/ai-toolkit --skill architecture-audit -a cursor -y
Gemini CLI
$ npx skills add softspark/ai-toolkit --skill architecture-audit -a gemini-cli -y
GitHub Copilot
$ npx skills add softspark/ai-toolkit --skill architecture-audit -a github-copilot -y
OpenCode
$ npx skills add softspark/ai-toolkit --skill architecture-audit -a opencode -y
Windsurf
$ npx skills add softspark/ai-toolkit --skill architecture-audit -a windsurf -y
name: architecture-audit description: "Audits codebase for architectural friction, shallow modules; proposes RFCs. Triggers: improve architecture, shallow modules, deepen modules, reduce coupling." user-invocable: true effort: high argument-hint: "[area to audit or 'full codebase']" allowed-tools: Read, Grep, Glob, Bash, Agent
$ARGUMENTS
Explore a codebase organically, surface architectural friction, and propose module-deepening refactors as GitHub issue RFCs.
/architecture-audit [area to audit or 'full codebase']
1. **Explores** codebase organically — friction IS the signal 2. **Presents** deepening candidates to user 3. **Frames** problem space for chosen candidate 4. **Spawns** 3+ parallel sub-agents for radically different interface designs 5. **Compares** and recommends 6. **Files** RFC as GitHub issue
A **deep module** (Ousterhout) has a small interface hiding a large implementation. Deep modules enhance testability, AI navigation, and enable boundary testing.
A **shallow module** has a large interface with thin implementation — avoid.
Use Agent (subagent_type=Explore) to navigate the codebase naturally. Note friction:
Numbered list. For each candidate show:
| Field | Content | |-------|---------| | Cluster | Which modules/concepts are involved | | Why coupled | Shared types, call patterns, co-ownership | | Dependency category | In-process, Local-substitutable, Ports & Adapters, or True external (see reference/) | | Test impact | What existing tests would be replaced by boundary tests |
Do NOT propose interfaces yet. Ask: "Which would you like to explore?"
For the chosen candidate, write a user-facing explanation:
Show to user, then immediately proceed to step 4.
Spawn 3+ sub-agents in parallel via Agent tool. Each gets a different constraint:
| Agent | Constraint | |-------|-----------| | Agent 1 | Minimize interface — 1-3 entry points max | | Agent 2 | Maximize flexibility — many use cases and extension | | Agent 3 | Optimize for most common caller — default case trivial | | Agent 4 | Ports & adapters pattern (if cross-boundary) |
Each outputs: interface signature, usage example, what it hides, dependency strategy, trade-offs.
Present sequentially, compare in prose, give opinionated recommendation.
Use `gh issue create` with template below. Don't ask for review.
<issue-template>
Architectural friction:
Durable guidance NOT coupled to file paths:
</issue-template>
| Category | Description | Deepenable? | |----------|-------------|-------------| | In-process | Pure computation, no I/O | Always | | Local-substitutable | Has local test stand-ins (PGLite, in-memory FS) | If stand-in exists | | Remote but owned | Your services across network (Ports & Adapters) | Via port injection | | True external | Third-party (Stripe, Twilio) — mock at boundary | Via mock injection |
**Replace, don't layer.** Old unit tests on shallow modules are waste once boundary tests exist — delete them. Tests assert on observable outcomes through public interface, not internal state.
AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling.
Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…
Searches past coding sessions for observations, decisions, context. Triggers: mem-search, recall session, past work, prior…
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG, EAA, ARIA, contrast, keyboard, screen…
Creates new specialized agents with frontmatter, tools, delegation. Triggers: new agent, create agent, agent scaffold,…
Analyzes code quality, complexity, patterns across codebase. Triggers: quality report, hotspot scan, code analysis, architecture…
API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.