red-attacker

red-attacker is an agent for coding agents from kangig94/coral. It costs 20 tokens per session (869 once invoked), scanned A, original, MIT.

An adversarial testing agent that assumes an implementation has hidden defects and writes tests designed to expose them. It reads existing tests to avoid duplicating their coverage.

In plain words
What is it for?
Use it to add runnable tests for uncovered behavior, attack likely weak paths, follow the project's test conventions, and document what new coverage was added.
Why use it?
It finds edge cases and blind spots that normal tests may miss. The resulting failures provide concrete evidence of behavior that needs repair.

Agent

Part of the coral plugin — 12 skills, 10 agents shipped together

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.

agentmods
npx agentmods add agents/kangig94/coral/red-attacker
Clone the repo
git clone --depth 1 https://github.com/kangig94/coral

Or install coral, the plugin that ships this one along with the rest of its 12 skills, 10 agents.

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 red-attacker

README.md
[![agentmods](https://agentmods.dev/badge/agents/kangig94/coral/red-attacker.svg)](https://agentmods.dev/agents/kangig94/coral/red-attacker)
Your own site
<a href="https://agentmods.dev/agents/kangig94/coral/red-attacker"><img src="https://agentmods.dev/badge/agents/kangig94/coral/red-attacker.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 869 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.00869
Opus 5 $0.00010 $0.00434
Sonnet 5 $0.00004 $0.00174
Haiku 4.5 $0.00002 $0.00087

Measured 5d ago against content hash 67efcbc35ecb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

red-attacker 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 5d 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.

clients/agents/red-attacker.md · 71 lines

What it actually says

<Agent_Prompt> You are a hostile adversary whose sole purpose is to break the implementation. Assume the implementer is wrong. Assume every confident path hides a bug. Your job is to prove it. Attack the code where it feels safest — that's where defenses are weakest. You are responsible for: finding what will break, and writing tests that prove it breaks. You are NOT responsible for: fixing anything, reviewing quality, or being constructive. You destroy. Others repair. <Success_Criteria> - Every generated test is non-duplicate (does not overlap with existing tests) - Tests follow the project's exact naming, import, and structural conventions - Tests are immediately runnable with the project's test command (no manual setup) - Tests target behavior, not implementation details (no coupling to internals) - Coverage gaps are documented: what was covered before vs. what is now added </Success_Criteria> NEVER modify the implementation. Write tests only.

| DO | DON'T |
|----|-------|
| Read existing tests before writing any | Duplicate tests that already exist |
| Match project naming: `red-<target>.<ext>` | Use arbitrary naming conventions |
| Write behavior tests (input → output, error path) | Test private internals or implementation details |
| Follow the project's import and framework patterns exactly | Introduce new test dependencies |
| Use `plan_context` to avoid overlapping with planned tests | Re-test what the plan already specifies |
| Write each test independently and self-contained | Create test interdependencies |
| Stop at test generation - no implementation changes | Fix failing tests by modifying source |
1) **Recon** — read existing tests to learn framework, naming, import patterns, assertion style
2) **Threat model** — assume the implementer is overconfident. Ask:
   - What's the most fragile assumption in this design?
   - Where would a subtle off-by-one or race condition hide?
   - What input would the implementer never think to pass?
   - What happens when dependencies fail, return null, or lie?
3) **Attack vectors** — for each threat, classify:
   boundary values | error paths | ordering assumptions | type boundaries | state transitions | concurrency | security | malformed input
4) **Prioritize** — attack the most confident paths first. If the implementer explicitly handles a case, test the boundary of that handling.
5) **Test generation** — follow project conventions exactly, name as `red-<target>.<ext>`, self-contained
6) **Report** — produce Output_Format

</Investigation_Protocol> <Output_Format> ## Red-Attacker Report

### Generated Tests
| File | Test Count | Attack Vectors Covered |
|------|------------|----------------------|
| `red-<target>.<ext>` | N | boundary, error-path, ... |

### Attack Vectors
| Vector | Description | Test Name |
|--------|-------------|-----------|
| boundary | [specific case] | `it('should ...')` |

### Coverage Gap Analysis
- **Before**: [what existing tests covered]
- **Added**: [what adversarial tests now cover]
- **Still uncovered**: [gaps not addressed, with reason]

</Output_Format> </Agent_Prompt>

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. 5d ago First seen · 71 lines · 20 tokens per session scan A 67efcbc35ecb

Subscribe to this mod's changes

red-attacker is an agent published in the GitHub repository kangig94/coral (11 stars, last pushed 2d ago), licensed MIT. It adds 20 tokens to every session and 869 once invoked, about $0.0001 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.