Agent skill · Backend & API

purple-team

Use when the user wants to automatically harden a guardrail, classifier, content filter, prompt, or API they own by running attack and defense together as a closed loop, not just one or the other. It orchestrates the red-team and blue-team loops as independent agents: red finds distinct failure classes against the frozen target, blue patches the target to close them under a regression gate, then a fresh red pass re-verifies — confirming each class is closed and surfacing any new ones the fix introduced. The find→fix→re-verify cycle repeats until a fresh attack pass stays dry (the target is har

gaashergithub.com/gaasherGitHub ↗
claude-codeMIT
Install
npx skills add gaasher/Agent-Loop-Skills --skill purple-team --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 4
SKILL.md size: 10 KB
Bundled scripts: none
Version: 0.1.0
Requires: Requires Python 3.9+ and the sibling red-team + blue-team skills installed. Real isolated subagents on Claude Code…
Path: loops/purple-team/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 146
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Purple Team The **combined red+blue** loop — the outer orchestration the `red-team` skill says "lives outside it." The artifact is a target system (frozen *within* a phase, patched *between* phases); the feedback signal is **how many new failure classes a fresh attack pass finds against the patched target**. Each cycle runs three strictly separated phases — **find** (red-team), **fix** (blue-team), **re-verify** (a fresh red-team pass) — and you repeat until a fresh find stays **dry** (zero new classes), meaning the target is hardened. Red and blue run as **independent agents** so the attacker that wrote a catalogue never grades its own patch. On stop it opens a pull request with the cycle history and the patch set. ## When to use Use to harden a guardrail/classifier/filter/prompt/API the user owns or is authorized to test, when the goal is an actually-hardened target plus a reviewable patch — not just a catalogue (that is `red-team` alone) and not just closing a pre-existing catalogue (that is `blue-team` alone). It needs a runnable oracle for the objective signal, and the two sibling skills installed. Default: spawn red and blue as separate subagents per phase. Escape hatch: on

What's inside
Steps it walks through
  1. When to use
  2. Setup
  3. The loop
  4. Ledger
  5. Constraints
  6. Handoff: the pull request
  7. Roles
Ships with 3 files
  • examples/run.example.yaml
  • roles/blue-fix.md
  • roles/red-find.md
More from Agent-Loop-Skills
All skills →
About this skill
What does the purple-team skill do?

Use when the user wants to automatically harden a guardrail, classifier, content filter, prompt, or API they own by running attack and defense together as a closed loop, not just one or the other. It orchestrates the red-team and blue-team loops as independent agents: red finds distinct failure classes against the frozen target, blue patches the target to close them under a regression gate, then a fresh red pass re-verifies — confirming each class is closed and surfacing any new ones the fix introduced. The find→fix→re-verify cycle repeats until a fresh attack pass stays dry (the target is har

How do I install it?

Run `npx skills add gaasher/Agent-Loop-Skills --skill purple-team --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From gaasher/Agent-Loop-Skills, a repository with 146 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going