From m2ai-skills-pack
Evaluate an agent codebase against 12 infrastructure primitives (permission model, token budget, crash recovery, tool assembly, streaming events, state machine, provenance, stop reasons, boot sequence, verification harness, memory decay, health checks) and return a severity-ranked gap analysis with prioritized upgrade path. Use when auditing agent architecture, reviewing agent readiness, or planning what infrastructure to build next.
How this skill is triggered — by the user, by Claude, or both
Slash command
/m2ai-skills-pack:agent-architecture-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Evaluates an existing agent codebase against 12 production infrastructure primitives derived from Claude Code's internal architecture. Returns a gap analysis ranked by severity with a phased upgrade path.
Evaluates an existing agent codebase against 12 production infrastructure primitives derived from Claude Code's internal architecture. Returns a gap analysis ranked by severity with a phased upgrade path.
Use when the user says "audit my agent", "agent architecture review", "what infrastructure am I missing", "agent readiness check", "12 primitives", "production readiness audit", or asks whether their agent system is ready for production.
Determine what to audit:
Scan for agent infrastructure signals:
Score each primitive as PRESENT, PARTIAL, or MISSING. For each, check specific indicators:
1. Permission Model
2. Token Budget Guardian
3. Crash Recovery / Checkpointing
4. Health Check / Doctor
5. Tool Pool Assembly
6. Streaming Event System
7. State Machine with Idempotency
8. Stop Reason Taxonomy
9. Staged Boot Sequence
10. Verification Harness
11. Memory with Decay and Provenance
12. Provenance-Aware Context Assembly
Produce a scorecard:
Agent Architecture Audit
========================
Codebase: [path or name]
Date: [today]
Day-One Primitives (Critical)
1. Permission Model [PRESENT / PARTIAL / MISSING]
2. Token Budget Guardian [PRESENT / PARTIAL / MISSING]
3. Crash Recovery [PRESENT / PARTIAL / MISSING]
4. Health Check [PRESENT / PARTIAL / MISSING]
Week-One Primitives (Important)
5. Tool Pool Assembly [PRESENT / PARTIAL / MISSING]
6. Streaming Events [PRESENT / PARTIAL / MISSING]
7. State Machine + Idem. [PRESENT / PARTIAL / MISSING]
8. Stop Reason Taxonomy [PRESENT / PARTIAL / MISSING]
Month-One Primitives (Maturity)
9. Staged Boot Sequence [PRESENT / PARTIAL / MISSING]
10. Verification Harness [PRESENT / PARTIAL / MISSING]
11. Memory Decay/Provenance [PRESENT / PARTIAL / MISSING]
12. Context Provenance [PRESENT / PARTIAL / MISSING]
Score: X/12 (PRESENT=1, PARTIAL=0.5, MISSING=0)
Rating: [PRODUCTION-READY / NEARLY-READY / SIGNIFICANT-GAPS / EARLY-STAGE]
Rating thresholds:
For each MISSING or PARTIAL primitive, provide:
Order the upgrade path chronologically:
Recommended Upgrade Path
========================
Sprint 1 (This week):
- [Primitive] -- [What to build] -- [Complexity]
Sprint 2 (Next week):
- [Primitive] -- [What to build] -- [Complexity]
Sprint 3+ (Month):
- [Primitive] -- [What to build] -- [Complexity]
Lead with the scorecard. Follow with the upgrade path. Keep explanations tight -- this is a diagnostic tool, not a tutorial.
Technique derived from Nate's Newsletter (2026-04-03): "Your Agent Is 80% Plumbing" -- 12 infrastructure primitives mapped from Claude Code's leaked source architecture, organized into day-one/week-one/month-one priority tiers.
npx claudepluginhub m2ai-portfolio/m2ai-skills-pack --plugin m2ai-skills-packGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.