/agent-teams-simplify-and-harden
Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests
$ npx -y skills add pskoett/pskoett-ai-skills --skill agent-teams-simplify-and-harden --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/agent-teams-simplify-and-harden
Context preview
The summary Claude sees to decide when to auto-load this skill.
Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests
SKILL.md
agent-teams-simplify-and-harden.SKILL.mdname: agent-teams-simplify-and-harden
description: "Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests pass, and auditors find zero issues or the loop cap is reached. Use when: implementing features from a spec or plan, hardening existing code, fixing a batch of issues, or any multi-file task that benefits from a build-verify-fix cycle."
Agent Teams Simplify & Harden
Install
gh skill install pskoett/pskoett-skills agent-teams-simplify-and-harden
Fallback using the Agent Skills CLI:
npx skills add pskoett/pskoett-skills/skills/agent-teams-simplify-and-harden
A two-phase team loop that produces production-quality code: **implement**, then **audit using simplify + harden passes**, then **fix audit findings**, then **re-audit**, repeating until the codebase is solid or the loop cap is reached.
When to Use
- Implementing multiple features from a spec or plan
- Hardening a codebase after a batch of changes
- Fixing a list of issues or gaps identified in a review
- Any task touching 5+ files where quality gates matter
Environment Requirements
The procedure below uses multi-agent team tools (`TeamCreate`, `TaskCreate`, `TaskUpdate`, `SendMessage`, `TeamDelete`) plus subagent spawning (`general-purpose` and `Explore` agent types). These exist in Claude Code-style environments with agent teams enabled. If your environment lacks team tools but can spawn subagents, skip the team/task tooling and orchestrate the same phases directly: spawn implementation subagents, then audit subagents, tracking tasks in a markdown checklist. If your environment cannot spawn subagents at all (e.g. GitHub Copilot chat), do not use this skill — run the sequential `simplify-and-harden` skill instead, and ask in chat for each phase's findings.
Pipeline Integration
This skill replaces stages 2–4 of the standard pipeline (execution, review, learning) with a team-based loop. It can follow `plan-interview` or run standalone — every upstream artifact is optional.
[plan-interview] → [agent-teams-simplify-and-harden] → [self-improvement]
├─ intent frame (team lead)
├─ implement (parallel agents)
├─ audit (parallel agents)
├─ drift check (team lead, between rounds)
└─ learning loop output → self-improvementWhen a plan file from `plan-interview` exists, the skill extracts tasks from it. When no plan exists, the team lead runs a brief inline planning phase. Context-surfing runs as a lightweight drift check for the team lead between loop rounds — sub-agents are short-lived and don't need it.
The Pattern
┌──────────────────────────────────────────────────────────┐
│ TEAM LEAD (you) │
│ │
│ Phase 1: IMPLEMENT (+ document pass on fix rounds) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ impl-1 │ │ impl-2 │ │ impl-3 │ ... │
│ │ (general │ │ (general │ │ (general │ │
│ │ purpose) │ │ purpose) │ │ purpose) │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────┐ │
│ │ Verify: compile + tests │ │
│ └─────────────────────────────────────┘ │
│ │ │
│ Phase 2: SIMPLIFY & HARDEN AUDIT │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ simplify │ │ harden │ │ spec │ ... │
│ │ auditor │ │ auditor │ │ auditor │ │
│ │ (Explore)│ │ (Explore)│ │ (Explore)│ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ Exit conditions met? │
│ YES → Produce summary. Ship it. │
│ NO → back to Phase 1 with findings as tasks │
│ (max 3 audit rounds) │
└──────────────────────────────────────────────────────────┘
Loop Limits and Exit Conditions
The loop exits when ANY of these are true:
1. **Clean audit**: All auditors report zero findings 2. **Low-only round**: All findings in a round are severity `low` -- fix them inline (team lead or a single impl agent) and exit without re-auditing 3. **Loop cap reached**: 3 audit rounds have completed. After the third round, fix remaining critical/high findings inline and exit. Log any unresolved medium/low findings in the final summary.
**Budget guidance:** Track the cumulative diff growth across rounds. If fix rounds have added more than 30% on top of the original implementation diff, tighten the scope: skip medium/low simplify findings and focus only on harden patches and spec gaps.
Step-by-Step Procedure
0. Plan and Frame
**If a plan file exists** (from `plan-interview` at `docs/plans/plan-NNN-<slug>.md` or user-provided): read it, extract the implementation checklist, and use those as the task list for step 2.
**If no plan exists**, run a brief inline planning interview:
1. What needs to be built, fixed, or hardened? (features, bugs, targets) 2. What's the spec or source of truth? (doc, issue, PR, or verbal description) 3. What are the acceptance criteria?
Turn the answers into a concrete task list. This is not a full `plan-interview` — just enough to break the work into parallelizable units.
**Int
Read more
name: agent-teams-simplify-and-harden description: "Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests pass, and auditors find zero issues or the loop cap is reached. Use when: implementing features from a spec or plan, hardening existing code, fixing a batch of issues, or any multi-file task that benefits from a build-verify-fix cycle."
Agent Teams Simplify & Harden
Install
gh skill install pskoett/pskoett-skills agent-teams-simplify-and-harden
Fallback using the Agent Skills CLI:
npx skills add pskoett/pskoett-skills/skills/agent-teams-simplify-and-harden
A two-phase team loop that produces production-quality code: **implement**, then **audit using simplify + harden passes**, then **fix audit findings**, then **re-audit**, repeating until the codebase is solid or the loop cap is reached.
When to Use
- Implementing multiple features from a spec or plan
- Hardening a codebase after a batch of changes
- Fixing a list of issues or gaps identified in a review
- Any task touching 5+ files where quality gates matter
Environment Requirements
The procedure below uses multi-agent team tools (`TeamCreate`, `TaskCreate`, `TaskUpdate`, `SendMessage`, `TeamDelete`) plus subagent spawning (`general-purpose` and `Explore` agent types). These exist in Claude Code-style environments with agent teams enabled. If your environment lacks team tools but can spawn subagents, skip the team/task tooling and orchestrate the same phases directly: spawn implementation subagents, then audit subagents, tracking tasks in a markdown checklist. If your environment cannot spawn subagents at all (e.g. GitHub Copilot chat), do not use this skill — run the sequential `simplify-and-harden` skill instead, and ask in chat for each phase's findings.
Pipeline Integration
This skill replaces stages 2–4 of the standard pipeline (execution, review, learning) with a team-based loop. It can follow `plan-interview` or run standalone — every upstream artifact is optional.
[plan-interview] → [agent-teams-simplify-and-harden] → [self-improvement]
├─ intent frame (team lead)
├─ implement (parallel agents)
├─ audit (parallel agents)
├─ drift check (team lead, between rounds)
└─ learning loop output → self-improvementWhen a plan file from `plan-interview` exists, the skill extracts tasks from it. When no plan exists, the team lead runs a brief inline planning phase. Context-surfing runs as a lightweight drift check for the team lead between loop rounds — sub-agents are short-lived and don't need it.
The Pattern
┌──────────────────────────────────────────────────────────┐ │ TEAM LEAD (you) │ │ │ │ Phase 1: IMPLEMENT (+ document pass on fix rounds) │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ impl-1 │ │ impl-2 │ │ impl-3 │ ... │ │ │ (general │ │ (general │ │ (general │ │ │ │ purpose) │ │ purpose) │ │ purpose) │ │ │ └──────────┘ └──────────┘ └──────────┘ │ │ │ │ │ │ │ ▼ ▼ ▼ │ │ ┌─────────────────────────────────────┐ │ │ │ Verify: compile + tests │ │ │ └─────────────────────────────────────┘ │ │ │ │ │ Phase 2: SIMPLIFY & HARDEN AUDIT │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ simplify │ │ harden │ │ spec │ ... │ │ │ auditor │ │ auditor │ │ auditor │ │ │ │ (Explore)│ │ (Explore)│ │ (Explore)│ │ │ └──────────┘ └──────────┘ └──────────┘ │ │ │ │ │ │ │ ▼ ▼ ▼ │ │ Exit conditions met? │ │ YES → Produce summary. Ship it. │ │ NO → back to Phase 1 with findings as tasks │ │ (max 3 audit rounds) │ └──────────────────────────────────────────────────────────┘
Loop Limits and Exit Conditions
The loop exits when ANY of these are true:
1. **Clean audit**: All auditors report zero findings 2. **Low-only round**: All findings in a round are severity `low` -- fix them inline (team lead or a single impl agent) and exit without re-auditing 3. **Loop cap reached**: 3 audit rounds have completed. After the third round, fix remaining critical/high findings inline and exit. Log any unresolved medium/low findings in the final summary.
**Budget guidance:** Track the cumulative diff growth across rounds. If fix rounds have added more than 30% on top of the original implementation diff, tighten the scope: skip medium/low simplify findings and focus only on harden patches and spec gaps.
Step-by-Step Procedure
0. Plan and Frame
**If a plan file exists** (from `plan-interview` at `docs/plans/plan-NNN-<slug>.md` or user-provided): read it, extract the implementation checklist, and use those as the task list for step 2.
**If no plan exists**, run a brief inline planning interview:
1. What needs to be built, fixed, or hardened? (features, bugs, targets) 2. What's the spec or source of truth? (doc, issue, PR, or verbal description) 3. What are the acceptance criteria?
Turn the answers into a concrete task list. This is not a full `plan-interview` — just enough to break the work into parallelizable units.
**Int
A collection of skills for AI agents. Follows the Agent Skills specification. This repository is my personal skill testing ground.
Other skills on pskoett-ai-skills.
- /context-surfing
Monitors context window health throughout a session and rides peak context quality for maximum output fidelity. Activates automatically after plan-interview and intent-framed-agent. Stays active through execution and hands off cleanly to simplify-and-harden and self-improvement
Open skill - /control-session-orchestrator
Control-plane workflow for coordinating multi-agent, multi-session project work from a single Codex, GitHub Copilot, or agent-app control session. Use this skill whenever the user asks to orchestrate agents, create or steer worker sessions, run a workflow-like effort, fan out
Open skill - /eval-creator-ci
[Beta] CI-only eval regression runner using gh-aw (GitHub Agentic Workflows). Runs all eval cases in .evals/ on a schedule or per-PR, reports pass/fail results, and can block merges on regressions. Also creates new eval cases from promoted patterns flagged by
Open skill - /eval-creator
[Beta] Creates permanent eval cases from promoted learnings and runs regression checks against them. Turns failures into test cases that prevent silent regression. This is the outer loop''s regress-test step. Use when a learning is promoted and has a clear pass/fail condition,
Open skill - /intent-framed-agent
Frames coding-agent work sessions with explicit intent capture and drift monitoring. Use when a session transitions from planning/Q&A to implementation for coding tasks, refactors, feature builds, bug fixes, or other multi-step execution where scope drift is a risk.
Open skill - /learning-aggregator-ci
[Beta] CI-only learning aggregation workflow using gh-aw (GitHub Agentic Workflows). Scans .learnings/ files on a schedule, groups entries by pattern_key, identifies promotion-ready patterns, and posts a gap report as a PR or issue comment. Use when: you want automated
Open skill

