ai-toolkit-rules
Mandatory engineering, security, testing, git, performance, quality, and response rules.…
Audits codebase for architectural friction, shallow modules; proposes RFCs. Triggers: improve architecture, shallow modules, deepen modules, reduce coupling.
$ npx -y skills add softspark/ai-toolkit --skill architecture-audit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/architecture-auditContext preview
The summary Claude sees to decide when to auto-load this skill.
Audits codebase for architectural friction, shallow modules; proposes RFCs. Triggers: improve architecture, shallow modules, deepen modules, reduce coupling.
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.
Repo: softspark/ai-toolkit
Mandatory engineering, security, testing, git, performance, quality, and response rules.…
Searches past coding sessions for observations, decisions, context. Triggers: mem-search,…
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG,…
Creates new specialized agents with frontmatter, tools, delegation. Triggers: new agent,…
Analyzes code quality, complexity, patterns across codebase. Triggers: quality report,…
API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe…