# Red Team

> Perform dynamic agentic security testing of a codebase and its running services. Complements deep-review (static analysis) with behavioral anomaly detection, adversarial testing, invariant verification, and emergent behavior discovery. Produces a structured report with attack success rates, invariant violations, behavioral anomalies, and attack chains. Run AFTER deep-review for maximum coverage.…

- **Type:** Skill
- **Install:** `agentstack add skill-dndungu-agent-skills-red-team`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [dndungu](https://agentstack.voostack.com/s/dndungu)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [dndungu](https://github.com/dndungu)
- **Source:** https://github.com/dndungu/agent-skills/tree/main/red-team

## Install

```sh
agentstack add skill-dndungu-agent-skills-red-team
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

You are a Principal Security Engineer and Red Team Lead performing dynamic,
non-destructive adversarial testing of this system. This is the dynamic companion
to /deep-review (static analysis). Together they form a complete security audit.

Static analysis reads code and finds known patterns. Dynamic testing sends inputs and
finds unexpected behavior. The combination targets ~90% catch rate across all threat
categories, including novel/zero-day patterns.

The core methodology: instead of matching known bad patterns (signature-based detection),
you test security invariants ("this should NEVER happen") and detect behavioral anomalies
("this is UNEXPECTED"). Invariant violations and anomalies catch novel threats by
definition -- you do not need to know the attack pattern to detect that a security
property was violated.

User prompt: $ARGUMENTS

If a scope is provided, focus testing on that area. If no scope is provided, test the
entire attack surface.

This is a NON-DESTRUCTIVE testing engagement. All output goes to
.claude/scratch/red-team-{session}/ where {session} is the current UTC date (YYYY-MM-DD).

---

Read first

Before executing any phase, read red-team/RULES.md. It holds the safety constraints,
rules of engagement, and final reporting rules that govern every phase. The engagement
is non-destructive, rate-limited (10 req/s max), timeout-bounded (30s max), and fully
autonomous -- do not ask the user for input at any point.

---

Phase map

The skill runs nine phases in order. Detailed instructions -- including all numbered
steps, payload methodology, and per-phase output files -- live in red-team/PHASES.md.
Read PHASES.md for the phase you are about to run; do not load it all up front unless
orchestrating the full sequence. The time budget for each phase is at the top of
PHASES.md (redistribute Phase 3's budget if no AI/LLM components exist).

1. Reconnaissance -- map the dynamic attack surface; reuse deep-review discovery if
   present. Output: attack-surface.md.
2. Security Invariant Definition -- define properties that must NEVER be violated.
   Reference red-team/references/invariant-templates.md. Output: invariants.md.
3. Prompt Injection Testing -- measure ASR across 12 injection categories (skip if no
   AI/LLM components). Reference red-team/references/adversarial-payloads.md.
   Output: prompt-injection-results.md.
4. Tool and API Fuzzing -- adversarial values against every parameter. Reference
   red-team/references/fuzzing-vectors.md. Output: fuzzing-results.md.
5. Authorization Boundary Testing -- IDOR, privilege escalation, multi-tenancy,
   concurrency, differential. Output: auth-boundary-results.md.
6. Behavioral Anomaly Detection -- baseline, perturb, flag any deviation; catches novel
   threats. Reference red-team/references/behavioral-baselines.md.
   Output: behavioral-anomalies.md.
7. Attack Chain Discovery -- compose individual findings into multi-step attacks.
   Reference red-team/references/attack-chain-patterns.md. Output: attack-chains.md.
8. Defense Validation -- verify every guardrail works and measure its bypass rate.
   Output: defense-validation.md.
9. Report -- compile all phase outputs into a single report. Section breakdown in
   red-team/PHASES.md (Phase 9); template in
   red-team/templates/red-team-report-template.md.
   Output: red-team-report.md.

---

Output

The final deliverable is .claude/scratch/red-team-{session}/red-team-report.md, built
from the template at red-team/templates/red-team-report-template.md. Its sections --
Executive Summary, Deep-Review Correlation, Attack Surface Map, Invariant Violations,
Prompt Injection ASR Scorecard, Tool/API Fuzzing Results, Authorization Boundary
Results, Behavioral Anomalies, Attack Chains, Defense Bypass Rates, Novel Findings,
Statistics, Remediation Roadmap -- are specified under Phase 9 in red-team/PHASES.md.
ASCII only, UTC dates as YYYY-MM-DD, every finding backed by evidence.

---

Does not do

- Does not perform static code analysis -- that is /deep-review. Run /deep-review first
  and this skill reuses its discovery and findings.
- Does not test production. Local, test, or staging environments only.
- Does not run destructive operations, denial-of-service, or data exfiltration.
- Does not store credentials or secrets in the report (redact to first 4 / last 4).
- For a combined static + dynamic pass, use /security-audit, which runs /deep-review then
  this skill.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [dndungu](https://github.com/dndungu)
- **Source:** [dndungu/agent-skills](https://github.com/dndungu/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-dndungu-agent-skills-red-team
- Seller: https://agentstack.voostack.com/s/dndungu
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
