thinking-partner
A deterministic thinking partner that challenges assumptions and applies mental models to sharpen decisions, solve problems, and think more clearly. Use this…
Run audit, prioritize findings, auto-fix via quick tasks, test, and commit.
$ npx -y skills add SienkLogic/plan-build-run --skill audit-fix --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/audit-fixContext preview
The summary Claude sees to decide when to auto-load this skill.
Run audit, prioritize findings, auto-fix via quick tasks, test, and commit.
name: audit-fix description: "Run audit, prioritize findings, auto-fix via quick tasks, test, and commit." allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion argument-hint: "[--max N] [--severity high|medium|all] [--dry-run] [--from DATE] [--to DATE] [--today]"
**STOP -- DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes tokens. Begin executing Step 0 immediately.**
You are running the **audit-fix** skill. Your job is to run a session audit, parse findings, classify which are auto-fixable, and spawn executor agents to fix them one-by-one with atomic commits. The pipeline stops on the first test failure.
This skill **chains audit -> prioritize -> fix -> test -> commit** in a single command.
---
**Before ANY tool calls**, display this banner:
+--------------------------------------------------------------+ | PLAN-BUILD-RUN > AUDIT-FIX | +--------------------------------------------------------------+
Then proceed to Step 1.
Reference: `skills/shared/context-budget.md` for the universal orchestrator rules. Reference: `skills/shared/agent-type-resolution.md` for agent type fallback when spawning Task() subagents.
Additionally for this skill:
---
Parse `$ARGUMENTS` for:
| Argument | Default | Description | |----------|---------|-------------| | `--max N` | 5 | Maximum number of findings to fix | | `--severity LEVEL` | `medium` | Minimum severity threshold: `high` = Critical+High only, `medium` = +Medium, `all` = +Low | | `--dry-run` | false | List fixable findings without executing fixes | | `--from DATE` | Start of today | Passed through to audit agent | | `--to DATE` | Now | Passed through to audit agent | | `--today` | true (default) | Shorthand for today's audit window |
If no date arguments provided, default to `--today`.
Display:
Max fixes: {N}
Severity threshold: {level}
Mode: {dry-run or execute}---
Spawn a `Task(subagent_type: "pbr:audit")` to collect findings:
Task({
subagent_type: "pbr:audit",
prompt: "Run a full audit for this project.
Date range: {from} to {to} (or --today)
Mode: full
Write the audit report to .planning/audits/ as usual.
CRITICAL: Include a ## Consolidated Findings section with findings
categorized by severity (Critical, High, Medium, Low).
Each finding must have an ID (e.g., H1, M3), description, and evidence.
Output: ## AUDIT COMPLETE when done."
})After the audit agent completes, check for `## AUDIT COMPLETE`. If absent, warn and attempt to read any partial report.
Read the latest audit report from `.planning/audits/` (glob for the most recent `*-session-audit.md` or `*-consolidated-audit.md`).
---
Read the audit report's `## Consolidated Findings` section. Extract findings by severity:
Build a list of findings at or above the severity threshold (`--severity` flag).
---
For each finding at or above the severity threshold, classify as:
Display a classification table:
Findings at severity >= {threshold}: {N}
Auto-fixable: {N}
Manual-only (skipped): {N}
Auto-fixable findings:
{ID}: {description} [severity]
...
Manual-only findings (skipped):
{ID}: {description} [severity] -- {reason}
...If `--dry-run` flag is set: display the full classification table and STOP. Do not execute any fixes.
+--------------------------------------------------------------+
| PLAN-BUILD-RUN > AUDIT-FIX DRY RUN COMPLETE |
+--------------------------------------------------------------+
{classification table above}
To execute fixes, run: /pbr:audit-fix --max {N}---
**Scope guard (CRITICAL):**
For each auto-fixable finding (up to `--max`), ordered by severity (Critical first, then High, Medium, Low):
a. Display: `[{i}/{total}] Fixing {ID}: {description}`
b. Spawn `Task(subagent_type: "pbr:executor")` with a prompt describing the fix:
Task({
subagent_type: "pbr:executor",
prompt: "You are executor. Fix this audit finding.
<files_to_read>
CRITICAL: Read these files BEFORE any other action:
1. CLAUDE.md -- project instructions
</files_to_read>
Finding ID: {ID}
Severity: {severity}
Description: {description}
Evidence: {evidence from audit report}Plan it. Build it. Run it. A Claude Code plugin for structured development with context-engineered agents.
Repo: SienkLogic/plan-build-run
A deterministic thinking partner that challenges assumptions and applies mental models to sharpen decisions, solve problems, and think more clearly. Use this…
Review past Claude Code sessions for PBR workflow compliance and UX quality.
Run multiple phases hands-free. Chains discuss, plan, build, and verify automatically.
Manage backlog items — ideas not ready for active planning. Add, review, promote, or remove.
Start a new project. Deep questioning, research, requirements, and roadmap.
Execute all plans in a phase. Spawns agents to build in parallel, commits atomically.