purple-team

Orchestrates red-team attack and blue-team fix loops to harden guardrails and classifiers.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/xlinh2301/EditCTC --skill purple-team-xlinh2301
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: purple-team
Source: https://github.com/xlinh2301/EditCTC/tree/main/.agents/skills/purple-team
Command: npx skills add https://github.com/xlinh2301/EditCTC --skill purple-team-xlinh2301

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Hardening a guardrail, classifier, or prompt requires both finding failures and fixing them, but running attack and defense in one pass lets the same context grade its own work. This Skill closes that gap by running red-team and blue-team phases as independent agents in a find, fix, re-verify cycle until a fresh attack pass finds nothing new. ## Core Features & Use Cases - Closed-loop hardening: Repeats find, fix, and re-verify cycles against a frozen target until a fresh attack pass stays dry or a cycle budget is hit. - Independent red and blue agents: Spawns attacker and defender as separate subagents so neither grades its own work, with an inline serial fallback on hosts without subagent dispatch. - Regression-gated fixes with PR handoff: Every patch must keep functional tests green and avoid breaking holdout inputs, and the run ends by opening a pull request with the cycle ledger and patch set. - Use Case: You own a prompt-injection guardrail and want it actually hardened, not just scanned. The loop finds distinct bypass classes, patches the guardrail source one class at a time under a regression gate, re-attacks the patched version, and opens a PR with the verified fixes. ## Quick Start Ask the agent to run the purple-team loop against your guardrail script with its oracle and test command, and let it iterate attack and fix cycles until it opens a hardening pull request.

Frequently Asked Questions about purple-team

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I harden a guardrail against prompt injection attacks?▼

Run a closed find, fix, re-verify loop: a red-team pass finds distinct failure classes against the frozen guardrail, a blue-team pass patches the source one class at a time under a regression gate, and a fresh attack re-verifies. Repeat until a new attack pass finds zero new classes.

What is the difference between red-team, blue-team, and purple-team testing?▼

Red-team only finds failures and produces a catalogue, while blue-team only fixes a pre-existing catalogue. Purple-team orchestrates both as independent agents in a repeating cycle, re-attacking after each fix until the target stays dry, then opens a pull request.

Can I run attack and defense loops without subagent support?▼

Yes, the phases degrade to inline serial execution on hosts without subagent dispatch. The loop stays correct, but the same context plays both sides, so the re-verify pass must use mostly fresh payloads and new attack angles to avoid bias.

Does automated red-teaming require authorization for the target system?▼

Yes, this loop drives real attacks against the target, so it must only run on systems you own or are explicitly authorized to test. It is not intended for unauthorized targets or one-shot scans of third-party systems.

What happens if the fix introduces a new vulnerability?▼

The re-verify pass is a fresh attack, not a replay, so it surfaces new classes the fix introduced, such as over-blocks. Those become the next cycle's catalogue, and any patch that breaks holdout inputs or tests is reverted by the regression gate.