Builds an authorized-engagement plan (scope, rules of engagement, phases with dates, deliverables, compliance mapping) and flags gaps such as missing authorization. Use when the user asks to "plan a red team engagement", "scope a penetration test", "create rules of engagement", or "plan an adversary simulation".
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Red Team?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/borghei-red-team)
---
name: red-team
description: >
Builds an authorized-engagement plan (scope, rules of engagement, phases with dates,
deliverables, compliance mapping) and flags gaps such as missing authorization. Use when
the user asks to "plan a red team engagement", "scope a penetration test", "create
rules of engagement", or "plan an adversary simulation".
license: MIT + Commons Clause
metadata:
version: 1.0.0
author: borghei
category: engineering
domain: offensive-security
updated: 2026-11-08
tags: [red-team, penetration-testing, security-assessment, adversary-simulation, engagement-planning]
---
# Red Team
> **Category:** Engineering
> **Domain:** Offensive Security
## Overview
The **Red Team** skill provides tools for planning and scoping security engagements. It helps define rules of engagement, select methodologies, scope targets, plan attack phases, and generate engagement documentation.
## Clarify First
Before planning the engagement, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- **Authorization & ROE owner:** who has signed off and the escalation contacts (no engagement plan without confirmed authorization).
- **In-scope targets & boundaries:** the exact assets in and explicitly out of bounds (drives scope and `--target`).
- **Engagement type:** red-team / pentest / purple-team / app-security (sets stealth, methodology, and `--type`). The planner has no bug bounty type.
- **Compliance framework:** e.g. pci-dss (maps test cases to controls via `--compliance`).
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
## Quick Start
```bash
python3 scripts/engagement_planner.py --type pentest --target "api,network" --duration 2w \
--start 2027-01-11 --compliance pci-dss \
--authorization-ref "<signed ROE id and date>" --emergency-contact "<defender on-call name, phone>"
```
Excerpt of the real output:
```
ENGAGEMENT PLAN: Penetration Test - api, network
Duration: 10 business days (2027-01-11 to 2027-01-25)
Methodology: OWASP API Security Top 10, PTES + NIST SP 800-115
Compliance: PCI-DSS v4.0
- 11.4.2: Internal penetration testing at least annually and after significant change
...
PASS: plan complete, authorization and contact recorded
```
A plan without `--authorization-ref` or `--emergency-contact`, shorter than 5 business days, or with more than 3 targets prints a `FINDINGS` block (input quoted, fix given) and ends `FIX n issues before this plan goes to sign-off`. Thresholds are internal heuristics, not published standards.
## Tools Overview
| Tool | Purpose | Key Flags |
|------|---------|-----------|
| `engagement_planner.py` | Plan engagements with scope, ROE, methodology, phases | `--type`, `--target`, `--duration`, `--start`, `--compliance`, `--authorization-ref`, `--emergency-contact`, `--format text\|json`, `--output` |
Phases are laid out in business days (weekends skipped). With no `--start`, the plan starts 7 days from today, so pass `--start` for repeatable output.
### Exit codes
- `0`: plan complete, no findings
- `1`: plan produced but has findings to resolve (missing authorization reference or contact, very short or many-target engagement, short red team)
- `2`: unusable input, one line on stderr: unknown or empty `--target`, unreadable `--duration` (use `10d`, `2w`, `1m`) or `--start`, unwritable `--output`
Samples: `assets/contract.json` holds one sound (0), one flawed (1) and one malformed (2) run plus JSON runs.
## Workflows
### Full Red Team Engagement
1. Define engagement objectives and scope with `engagement_planner.py`
2. Review generated rules of engagement with stakeholders
3. Get formal sign-off on scope and ROE. No signed ROE means stop: testing without written authorization is unauthorized access, whatever the intent
4. Execute phases per the plan timeline
5. Document findings throughout
6. Deliver final report
### Compliance-Driven Pentest
1. Run planner with `--compliance` flag for framework-specific requirements
2. Map test cases to compliance controls
3. Execute against compliance-specific checklist
4. Generate evidence for auditors
## Scope & Limitations
**In Scope:**
- Engagement plans from `engagement_planner.py` for four engagement types (red-team, pentest, purple-team, app-security) and the targets listed in its `--help`.
- Plan content: scope, rules of engagement, methodology choice, phases with dates, communication and escalation, and a deliverables checklist, in text or JSON.
- Optional mapping to a compliance framework with `--compliance` (pci-dss, soc2, hipaa, iso27001).
- Frameworks, rules-of-engagement elements and phase guidance in `references/red-team-methodology.md`.
**Out of Scope:**
- Carrying out an engagement. The skill produces planning documents and runs nothing against any system.
- Source-level vulnerability review of a repository (see `engineering/security-audit/`).
- Threat modeling and secure design review (see `engineering/senior-security/`), and detecting attacks in logs (see `engineering/threat-detection/`).
- Running a compliance program or audit (see `ra-qm-team/pci-dss-specialist/` and `ra-qm-team/soc2-compliance-expert/`).
- Legal review of authorization letters or engagement contracts.
**Important Caveats:**
- The skill is for authorized engagements only. Confirmed authorization comes first, as Clarify First requires, and the generated rules of engagement are not a substitute for written sign-off from the asset owner.
- Plans are built from fixed templates. Phase lengths and test lists are generic and need adjusting to the real engagement; the contact and authorization reference come only from your flags.
- An engagement covers only what was in scope during its time box. Its findings are not a guarantee that no other vulnerabilities exist.
- Compliance mappings are a starting point. The assessor and the current version of the framework decide what evidence is required.
## Reference Documentation
- [Red Team Methodology](references/red-team-methodology.md) - Frameworks, attack phases, and engagement standards
## Common Patterns
### Engagement Types
- **Red Team**: Full adversary simulation, stealth required, tests detection/response
- **Penetration Test**: Authorized vulnerability exploitation, known to defenders
- **Purple Team**: Collaborative attack/defense, real-time knowledge sharing
- **Application Security Assessment**: Focused testing of web, mobile and API applications