purple-team

purple-team is a skill for Claude Code from gaasher/Agent-Loop-Skills. It costs 183 tokens per session (2,619 once invoked), scanned A, original, MIT.

A workflow for hardening a guardrail, classifier, content filter, prompt, or API by repeatedly attacking it and fixing the failures. A red team finds ways to bypass or break the target, while a blue team patches it.

In plain words
What is it for?
Use it when you own or are authorised to test a runnable safety or decision system. It produces a reviewable set of patches and records the history of the attack-and-fix cycles.
Why use it?
It tests whether fixes hold up against fresh attacks instead of assuming the first patch is enough. The process continues until a new attack pass finds no new failure classes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Claude Code.

Part of the Agent-Loop-Skills plugin — 25 skills shipped together

Good fit Use it when you own or are authorised to test a runnable safety or decision system. It produces a reviewable set of patches and records the history of the attack-and-fix cycles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gaasher/agent-loop-skills/purple-team
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gaasher/Agent-Loop-Skills --skill purple-team
Clone the repo
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills

Made for: Claude Code.

Or install Agent-Loop-Skills, the plugin that ships this one along with the rest of its 25 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for purple-team

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaasher/agent-loop-skills/purple-team/github.svg)](https://agentmods.dev/skills/gaasher/agent-loop-skills/purple-team)
Your own site
<a href="https://agentmods.dev/skills/gaasher/agent-loop-skills/purple-team"><img src="https://agentmods.dev/badge/skills/gaasher/agent-loop-skills/purple-team/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for purple-team

Your own site · 80×15
<a href="https://agentmods.dev/skills/gaasher/agent-loop-skills/purple-team"><img src="https://agentmods.dev/badge/skills/gaasher/agent-loop-skills/purple-team.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,619 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 145
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00183 $0.02619
Opus 5 $0.00092 $0.01309
Sonnet 5 $0.00037 $0.00524
Haiku 4.5 $0.00018 $0.00262

Measured 9d ago against content hash d1673718824e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

purple-team scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

loops/purple-team/SKILL.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 hosts without subagent dispatch, run each phase inline (serial) per the role files — still correct, but the same context plays both sides, so be deliberate about not letting the fix bias the re-verify. Not for unauthorized targets.

Setup

Resolve bindings interactively. If loop.run.yaml exists, load it, confirm the values in one line, and skip to the loop. Otherwise: on Claude Code (the AskUserQuestion tool is available) infer a likely value per binding and recommend it; on other hosts ask each as a quoted prompt. Then write loop.run.yaml (format: examples/run.example.yaml) and confirm before creating any other files.

The phases reuse the sibling skills, so the bindings are their union — one shared loop.run.yaml drives both. The same file is <target_files> to blue (writable) and the program behind <target_cmd> to red (read-only); the same path is red's <failures_log> and blue's <catalogue>.

Read the full file on GitHub · 147 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 147 lines · 183 tokens per session scan A d1673718824e

Subscribe to this mod's changes

purple-team is a skill published in the GitHub repository gaasher/Agent-Loop-Skills (166 stars, last pushed 2mo ago), licensed MIT. It adds 183 tokens to every session and 2,619 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sn-image-base

Base-layer skill for the SenseNova-Skills project, providing low-level APIs for image generation, recognition (VLM), and text optimization (LLM). This skill does not preprocess inputs; it only calls backend services and returns results. This skill is not user-facing and is intended for upper-layer skills only.

OpenSenseNova/SenseNova-Skills · 66 tokens

sn-search-academic

An academic research tool for finding papers and encyclopedia entries, reading papers in full or by section, and tracing references and citations. It supports structured literature research.

OpenSenseNova/SenseNova-Skills · 31 tokens

ppt-analysis

A parser for PowerPoint presentations in .pptx or older .ppt format that extracts their contents and flags slides needing image-based inspection.

OpenSenseNova/SenseNova-Skills · 51 tokens

excel-data-analysis-and-report-generation

A skill for extracting, categorising, counting, and comparing data from Excel spreadsheets. It can produce summary tables with totals, percentages, and cross-tabulations.

OpenSenseNova/SenseNova-Skills · 30 tokens

sn-da-non-spreadsheet-analysis

A skill for extracting and analysing content from Word files, PDFs, and PowerPoint presentations. It can work with text, tables, numbers, charts, formatting, and information across multiple documents.

OpenSenseNova/SenseNova-Skills · 234 tokens

large-file-conditional-formatting

An Excel analysis step that counts rows, calculates average values for a selected entity over time, and creates a styled report with color-based formatting. It can switch to Parquet, a column-based data format, for larger files.

OpenSenseNova/SenseNova-Skills · 60 tokens