agent-audit
Audit agents spawned in the current/last run against the agent-selection taxonomy
Turn Pattern B from agent-resilience-discipline into a one-keystroke agent brief for a single-file deliverable < 300 lines.
> /plugin marketplace add heymegabyte/claude-skillsHow it fires
How this command gets triggered: by you, by Claude, or both.
/prepare-skeleton-briefContext preview
What this command does when you run it.
Turn Pattern B from agent-resilience-discipline into a one-keystroke agent brief for a single-file deliverable < 300 lines.
name: prepare-skeleton-brief description: Turn Pattern B from agent-resilience-discipline into a one-keystroke agent brief for a single-file deliverable < 300 lines.
Generates a complete, copy-paste-ready Agent brief for a single-file skeleton deliverable, following Pattern B from `rules/agent-resilience-discipline.md`.
/prepare-skeleton-brief src/worker/routes/invoices.ts "Hono route handler for invoice CRUD with Drizzle D1"
1. Parse `<target-path>` and `<description>` from args. 2. Infer file extension → language → code fence marker. 3. Detect existing sibling files in the same directory to surface as context hints. 4. Read `rules/agent-resilience-discipline.md` (if present) and extract the Pattern B prompt template — look for the block that starts with "Pattern B" or "single-file skeleton". 5. Synthesize the full agent brief in the format below. 6. Print the brief to stdout (user copies it into an `Agent` tool call).
## Agent Brief — Skeleton: <basename> **Role:** Skeleton author — writes the initial file, nothing else. **Scope:** ONE file: `<target-path>` — < 300 lines, no stubs, no TODOs. **Description:** <description> ### Context (read-only) - Sibling files: <list of up to 5 siblings> - Stack: <inferred stack from extension + project root> - Contracts to honour: <relevant Zod schemas or types found via grep> ### Deliverable Write `<target-path>` with the content below as the starting structure. Flesh out EVERY function body — no empty functions, no placeholder comments. Respect the project's import style and naming conventions. ```<lang> // <target-path> // <description> // Generated skeleton — flesh out before shipping. <SCAFFOLD — filled in by the skill at runtime based on extension>
Return the final file content only — no preamble, no explanation. File will be written to `<target-path>` by the caller. Max 300 lines.
## Scaffold hints by extension
| Extension | Scaffold opener |
|-----------|-----------------|
| `.ts` | `import { z } from 'zod'` + typed fn signatures |
| `.tsx` | React 19 functional component + Tailwind className |
| `.py` | `from __future__ import annotations` + typed dataclass |
| `.sql` | `-- Migration: <basename>` + CREATE TABLE skeleton |
| `.md` | `# <title>` + section headers |
| `.json` | `{}` with required top-level keys inferred from description |
| other | bare file with comment header |
## Execution script (runs in-process)
```bash
TARGET="$1"
DESCRIPTION="$2"
if [[ -z "$TARGET" || -z "$DESCRIPTION" ]]; then
echo "Usage: /prepare-skeleton-brief <target-path> <description>"
exit 1
fi
BASENAME=$(basename "$TARGET")
DIR=$(dirname "$TARGET")
EXT="${BASENAME##*.}"
# Collect siblings (up to 5)
SIBLINGS=$(ls "$DIR" 2>/dev/null | grep -v "^${BASENAME}$" | head -5 | tr '\n' ', ')
echo "## Agent Brief — Skeleton: ${BASENAME}"
echo ""
echo "**Role:** Skeleton author — writes the initial file, nothing else."
echo "**Scope:** ONE file: \`${TARGET}\` — < 300 lines, no stubs, no TODOs."
echo "**Description:** ${DESCRIPTION}"
echo ""
echo "### Context (read-only)"
echo "- Sibling files: ${SIBLINGS:-none}"
echo "- Extension: .${EXT}"
echo ""
echo "### Deliverable"
echo "Write \`${TARGET}\` fully fleshed — no empty fn bodies, no TODO lines."
echo ""
echo "### Non-goals"
echo "- Do NOT create any other file."
echo "- Do NOT modify existing files."
echo ""
echo "### Output format"
echo "Return the final file content only. Max 300 lines."14-category autonomous product-building OS for 32+ AI coding tools. One-line prompts → deployed products.
Repo: heymegabyte/claude-skills
Audit agents spawned in the current/last run against the agent-selection taxonomy
Run the Agent Diversity Review gate and emit the result table
Meta-analyze the effectiveness of a /loop arc — per-iteration metrics, LOC delta trend, saturation detection, and a keep/lengthen/delete recommendation.
Audit the rules/ directory for missing foundational principles; output gap list with priority and justification
Validate ~/.claude/settings.json hooks block — event names, file existence, executability, matcher syntax; --fix repairs common issues
Catch Resend-class bug (isError: false on HTTP 4xx/5xx) across all MCP server tool handlers