Pentest
Synthesis skill for authorized offensive-security engagements. Produces
scope-gated plans, checklists, and structured findings — never vendored C2,
webshells, or autonomous exploit execution.
Scope: Pre-authorized penetration testing methodology and reporting. NOT for
unauthorized testing, malware/C2 operations, static pre-deploy audits
(security-scanner), or synthetic CTF-only puzzles (ctf-*).
Canonical Vocabulary
| Term |
Definition |
| ROE |
Rules of Engagement — signed authorization document defining targets, dates, contacts, and prohibited actions |
| scope gate |
Mandatory scope_check.py pass before any recon, web, API, or OSINT offensive planning |
| target |
Host, URL, CIDR, or application explicitly listed in the signed ROE |
| phase |
Engagement stage from scripts/phases.py — each requires an active scope gate |
| triage |
Route a signal to canonical playbook + optional external skill via methodology-router.md |
| external index |
Planning lock pentest-external-skill-index.json via manifest + lookup_external_slug.py |
| finding |
Structured JSON record of a suspected issue with severity, evidence, and remediation guidance |
| playbook |
Checklist-driven methodology loaded from references/playbooks/ — planning only |
| synthesis |
Agent-authored plan/checklist/report assembled from references and operator context |
| external runner |
Optional third-party CLI (e.g. Strix) the operator runs manually — this skill does not install or invoke attacks |
| fail-closed |
Deny all offensive planning when scope is missing, expired, or target-out-of-scope |
Tier Boundaries
| Tier |
Skill |
When to use |
ROE required |
Executes attacks |
| Static audit |
security-scanner |
Pre-deployment SAST, secrets, deps, compliance heuristics |
No |
No — read-only code scan |
| Authorized pentest |
pentest (this skill) |
Live apps/APIs under signed engagement |
Yes |
No — planning/checklists only; operator runs approved tools |
| CTF / lab |
ctf-* |
Isolated challenge boxes, training flags, synthetic vuln labs |
No (lab policy instead) |
Only inside designated lab scope |
Redirect rules:
- "Scan my repo for secrets/CVEs before merge" → security-scanner
- "Hack this site without permission" → refuse — no ROE, no planning
- "Solve this HTB/CTF box" → ctf-* skills — not production pentest
- "We have signed ROE for staging.example.com" → pentest after scope gate
Scope Gate (Mandatory)
Before recon, web, api, osint, or any extended phase mode (network, cloud, mobile, wireless, llm, internal, binary, blockchain, post-exploit):
- Obtain
--target, --roe-file, and the requested --phase from the operator.
- Run:
uv run python scripts/scope_check.py \
--target "<host-or-url>" \
--roe-file "<path-to-roe.json>" \
--phase "<mode>"
- Parse JSON stdout. If
ok is false or exit code is non-zero → stop. Present
deny_reason and load references/scope-and-roe.md for remediation.
- Record
engagement_id, phase, and allowed_phases from the scope result in session notes.
- Never proceed to playbooks, external runners, or attack-sounding commands without
a passing scope gate in the current session.
Empty or partial scope requests (target without ROE, ROE without target, expired
ROE, out-of-scope host) are denied fail-closed.
Dispatch
| $ARGUMENTS |
Mode |
Action |
doctor |
doctor |
Run scripts/doctor.py — skill asset and policy readiness |
scope <target> |
scope |
Run scripts/scope_check.py with --roe-file, --target, and --phase; echo restricted_phases when ROE-gated |
triage <signal> |
triage |
Load references/methodology-router.md; map signal → playbook + external slug |
recon <target> |
recon |
Scope gate → references/playbooks/recon.md |
web <target> |
web |
Scope gate → references/playbooks/web.md (+ injection/auth playbooks as needed) |
api <target> |
api |
Scope gate → references/playbooks/api.md |
osint <target> |
osint |
Scope gate → references/playbooks/osint.md (passive only per ROE) |
network <target> |
network |
Scope gate → references/playbooks/network.md |
cloud <target> |
cloud |
Scope gate → references/playbooks/cloud.md |
mobile <target> |
mobile |
Scope gate → references/playbooks/mobile.md |
wireless <target> |
wireless |
Scope gate → references/playbooks/wireless.md (explicit ROE) |
llm <target> |
llm |
Scope gate → references/playbooks/llm.md |
internal <target> |
internal |
Scope gate → references/playbooks/internal.md |
binary <target> |
binary |
Scope gate → references/playbooks/binary.md |
blockchain <target> |
blockchain |
Scope gate → references/playbooks/blockchain.md |
post-exploit <target> |
post-exploit |
Scope gate → references/playbooks/post-exploit.md (explicit ROE only) |
validate |
validate |
Run scripts/check.py; verify findings JSON against schema |
report |
report |
Aggregate session findings via scripts/findings_emit.py patterns |
help or (empty) |
help |
Show modes, scope gate, tier boundaries, reference index |
| Unrecognized |
— |
Ask for clarification; do not assume authorization |
Mode: doctor
Read-only environment and policy checks. No offensive actions.
- Run:
uv run python scripts/doctor.py --format json
- When the skill is globally installed, set
WAGENTS_REPO_ROOT to the agents clone so
repo-root and lock-index checks can resolve planning/research-lock/.
- Present checks grouped by
ok, warn, fail.
- If
forbidden-tooling is fail, stop — engagement cannot use this skill until
operator removes C2/webshell references from the request.
- Load
references/external-runners.md only when operator asks about optional CLIs.
Mode: scope
Validate authorization before any other offensive mode.
- Require
--target, --roe-file, and --phase. If any are missing, run
scope_check.py without them to produce the deny JSON and explain required fields.
- On pass: summarize
engagement_id, phase, allowed_phases, restricted_phases,
expires_at, and in-scope target match.
- On deny: cite
deny_reason; do not load playbooks.
Mode: triage
Route methodology depth without loading all upstream repos.
- Parse signal from
$ARGUMENTS (e.g. sqli, xss, kerberos, llm-injection).
- Load
references/methodology-router.md — resolve canonical slug from dedup table.
- Load matching
references/playbooks/*.md section (one file at a time).
- Surface
install_command via scripts/lookup_external_slug.py only when operator requests deeper upstream body.
- Quarantine: EXT-084 entries are inspect-only — never auto-install.
Mode: recon
Post-authorization attack-surface planning only.
- Pass scope gate (see Scope Gate).
- Confirm
recon is in allowed_phases from scope result.
- Load
references/playbooks/recon.md (and references/osint.md when passive).
- Produce a phased plan: asset inventory hypotheses, DNS/WHOIS/certificate angles,
technology fingerprinting commands the operator may run — do not run them from
this skill's scripts.
- Emit planned checkpoints as draft findings only after operator supplies evidence.
Mode: web
Web application testing planning only.
- Pass scope gate; confirm
web in allowed_phases.
- Load
references/playbooks/web.md one section at a time.
- Build a prioritized test checklist mapped to OWASP categories — no exploit payloads
executed by skill scripts.
- For each confirmed issue the operator reports, emit via
findings_emit.py (pass
--scope-json from the current scope gate result when binding findings to engagement).
Mode: api
API security testing planning only.
- Pass scope gate; confirm
api in allowed_phases.
- Load
references/playbooks/api.md.
- Produce authn/authz, input validation, rate-limit, and BOLA test matrices.
- Reference OpenAPI/GraphQL discovery steps for the operator; never call live targets
from bundled scripts.
Mode: osint
Passive open-source intelligence planning only.
- Pass scope gate; confirm
osint in allowed_phases.
- Load
references/osint.md.
- Stay within ROE
prohibited_actions — no social engineering, harassment, or
out-of-scope third-party data collection.
- Output source list, query templates, and verification steps for the operator.
Mode: post-exploit
Post-exploitation planning only when ROE explicitly allows it.
- Pass scope gate; confirm
post-exploit in allowed_phases (see restricted_phases in scope JSON).
- Load
references/playbooks/post-exploit.md.
- Produce containment-aware persistence/lateral-movement planning matrices — no C2
install commands, implants, or live exploitation from bundled scripts.
- Refuse C2/Havoc/Sliver/Cobalt Strike skill installs; document-only upstream references only.
Mode: validate
Deterministic skill and findings validation.
- Run:
uv run python scripts/check.py
- If validating ad-hoc findings JSON, compare against
references/findings-schema.md.
- Report validation status; do not mutate ROE or targets.
Mode: report
Session report synthesis.
- Collect findings emitted during the engagement (JSON lines or array).
- Validate each record against
references/findings-schema.md.
- Group by severity; include scope metadata (
engagement_id, target, ROE hash).
- Use
scripts/findings_emit.py --aggregate when normalizing operator-supplied notes.
- Executive summary must state authorization basis and prohibited actions respected.
Mode: help
- Show dispatch table, scope gate steps, and tier boundary table.
- List reference files with read-when guidance.
- Remind: this skill does not install Strix or other runners — see
references/external-runners.md.
Help (empty)
Show dispatch table, scope gate steps, tier boundaries, and reference index. Offer examples:
/pentest help
/pentest doctor
/pentest scope staging.example.com
/pentest recon staging.example.com
/pentest web https://staging.example.com/app
/pentest api https://staging.example.com/api
/pentest osint staging.example.com
/pentest validate
/pentest report
Reference File Index
Load ONE reference at a time. Do not preload all references.
| File |
Content |
Read When |
references/scope-and-roe.md |
ROE format, scope gate policy, deny reasons |
Scope deny or ROE questions |
references/findings-schema.md |
JSON finding fields and severity rules |
Emitting or validating findings |
references/methodology-router.md |
Compact signal → playbook → slug routing |
triage or depth routing |
references/external-skill-index.manifest.json |
Pointer to planning-lock full index |
Operator requests upstream body |
references/playbooks/*.md |
Phase and technique checklists (22 files) |
Matching phase after scope pass |
references/osint.md |
Passive OSINT templates (legacy index) |
recon or osint after scope pass |
references/provenance.md |
Synthesis sources, hybrid repos, no C2 policy |
Methodology questions or audit trail |
references/external-runners.md |
Optional external CLIs (Strix, etc.) — no install |
Operator asks about tooling |
Scripts
| Script |
When to Run |
scripts/phases.py |
SSOT for VALID_PHASES (imported by scope/findings) |
scripts/scope_check.py |
Always before offensive planning — fail-closed without ROE |
scripts/doctor.py |
doctor mode or pre-engagement readiness |
scripts/findings_emit.py |
Emit or aggregate structured findings JSON (schema v1.1) |
scripts/lookup_external_slug.py |
Resolve signal/slug install metadata from planning lock |
scripts/validate_external_index.py |
Maintainer check for planning-lock index policy |
scripts/check.py |
validate mode or CI/skill maintenance |
Critical Rules
- Scope gate first — no recon, web, api, or osint planning without passing
scope_check.py
- Fail-closed — missing
--target or --roe-file denies immediately
- No attack execution in scripts — bundled Python is planning, validation, and JSON only
- No C2 or webshell vendoring — refuse requests for implants, reverse shells, or malware staging
- No unauthorized testing — without signed ROE, redirect to security-scanner (static) or refuse
- CTF is not pentest — redirect synthetic lab work to ctf-* skills
- Operator-run tools only — cite commands for the operator; skill scripts do not probe targets
- Respect ROE phases — deny playbooks when phase not in
allowed_phases
- Respect prohibited_actions — DOS, social engineering, production data exfiltration when banned
- Structured findings — use
findings_emit.py and references/findings-schema.md
- Load ONE reference at a time — progressive disclosure
- Present plan before deep checklist — approval gate for invasive operator steps
- Never store live credentials — redact secrets in findings and reports
- External runners are optional — document in
external-runners.md; never auto-install Strix
- Read-only ROE — scripts validate ROE files; they do not create or modify authorization
1---2name: pentest3description: Authorized pentest planning with mandatory ROE scope gate. Synthesizes phase checklists and findings. NOT for static audit (security-scanner), CTF labs (ctf-*), or C2/webshell tooling.4license: MIT5---67# Pentest89Synthesis skill for **authorized** offensive-security engagements. Produces10scope-gated plans, checklists, and structured findings — never vendored C2,11webshells, or autonomous exploit execution.1213**Scope:** Pre-authorized penetration testing methodology and reporting. NOT for14unauthorized testing, malware/C2 operations, static pre-deploy audits15(security-scanner), or synthetic CTF-only puzzles (ctf-*).1617## Canonical Vocabulary1819| Term | Definition |20|------|------------|21| **ROE** | Rules of Engagement — signed authorization document defining targets, dates, contacts, and prohibited actions |22| **scope gate** | Mandatory `scope_check.py` pass before any recon, web, API, or OSINT offensive planning |23| **target** | Host, URL, CIDR, or application explicitly listed in the signed ROE |24| **phase** | Engagement stage from `scripts/phases.py` — each requires an active scope gate |25| **triage** | Route a signal to canonical playbook + optional external skill via `methodology-router.md` |26| **external index** | Planning lock `pentest-external-skill-index.json` via manifest + `lookup_external_slug.py` |27| **finding** | Structured JSON record of a suspected issue with severity, evidence, and remediation guidance |28| **playbook** | Checklist-driven methodology loaded from `references/playbooks/` — planning only |29| **synthesis** | Agent-authored plan/checklist/report assembled from references and operator context |30| **external runner** | Optional third-party CLI (e.g. Strix) the operator runs manually — this skill does not install or invoke attacks |31| **fail-closed** | Deny all offensive planning when scope is missing, expired, or target-out-of-scope |3233## Tier Boundaries3435| Tier | Skill | When to use | ROE required | Executes attacks |36|------|-------|-------------|--------------|------------------|37| **Static audit** | security-scanner | Pre-deployment SAST, secrets, deps, compliance heuristics | No | No — read-only code scan |38| **Authorized pentest** | pentest (this skill) | Live apps/APIs under signed engagement | **Yes** | No — planning/checklists only; operator runs approved tools |39| **CTF / lab** | ctf-* | Isolated challenge boxes, training flags, synthetic vuln labs | No (lab policy instead) | Only inside designated lab scope |4041**Redirect rules:**4243- "Scan my repo for secrets/CVEs before merge" → **security-scanner**44- "Hack this site without permission" → **refuse** — no ROE, no planning45- "Solve this HTB/CTF box" → **ctf-*** skills — not production pentest46- "We have signed ROE for staging.example.com" → **pentest** after scope gate4748## Scope Gate (Mandatory)4950Before **recon**, **web**, **api**, **osint**, or any extended phase mode (`network`, `cloud`, `mobile`, `wireless`, `llm`, `internal`, `binary`, `blockchain`, `post-exploit`):51521. Obtain `--target`, `--roe-file`, and the requested `--phase` from the operator.532. Run:5455```bash56uv run python scripts/scope_check.py \57 --target "<host-or-url>" \58 --roe-file "<path-to-roe.json>" \59 --phase "<mode>"60```61623. Parse JSON stdout. If `ok` is false or exit code is non-zero → **stop**. Present63 `deny_reason` and load `references/scope-and-roe.md` for remediation.644. Record `engagement_id`, `phase`, and `allowed_phases` from the scope result in session notes.655. Never proceed to playbooks, external runners, or attack-sounding commands without66 a passing scope gate in the current session.6768**Empty or partial scope requests** (target without ROE, ROE without target, expired69ROE, out-of-scope host) are denied fail-closed.7071## Dispatch7273| $ARGUMENTS | Mode | Action |74|------------|------|--------|75| `doctor` | doctor | Run `scripts/doctor.py` — skill asset and policy readiness |76| `scope <target>` | scope | Run `scripts/scope_check.py` with `--roe-file`, `--target`, and `--phase`; echo `restricted_phases` when ROE-gated |77| `triage <signal>` | triage | Load `references/methodology-router.md`; map signal → playbook + external slug |78| `recon <target>` | recon | Scope gate → `references/playbooks/recon.md` |79| `web <target>` | web | Scope gate → `references/playbooks/web.md` (+ injection/auth playbooks as needed) |80| `api <target>` | api | Scope gate → `references/playbooks/api.md` |81| `osint <target>` | osint | Scope gate → `references/playbooks/osint.md` (passive only per ROE) |82| `network <target>` | network | Scope gate → `references/playbooks/network.md` |83| `cloud <target>` | cloud | Scope gate → `references/playbooks/cloud.md` |84| `mobile <target>` | mobile | Scope gate → `references/playbooks/mobile.md` |85| `wireless <target>` | wireless | Scope gate → `references/playbooks/wireless.md` (explicit ROE) |86| `llm <target>` | llm | Scope gate → `references/playbooks/llm.md` |87| `internal <target>` | internal | Scope gate → `references/playbooks/internal.md` |88| `binary <target>` | binary | Scope gate → `references/playbooks/binary.md` |89| `blockchain <target>` | blockchain | Scope gate → `references/playbooks/blockchain.md` |90| `post-exploit <target>` | post-exploit | Scope gate → `references/playbooks/post-exploit.md` (explicit ROE only) |91| `validate` | validate | Run `scripts/check.py`; verify findings JSON against schema |92| `report` | report | Aggregate session findings via `scripts/findings_emit.py` patterns |93| `help` or *(empty)* | help | Show modes, scope gate, tier boundaries, reference index |94| Unrecognized | — | Ask for clarification; do not assume authorization |9596## Mode: doctor9798Read-only environment and policy checks. No offensive actions.991001. Run: `uv run python scripts/doctor.py --format json`1012. When the skill is globally installed, set `WAGENTS_REPO_ROOT` to the agents clone so102 `repo-root` and lock-index checks can resolve `planning/research-lock/`.1033. Present checks grouped by `ok`, `warn`, `fail`.1044. If `forbidden-tooling` is `fail`, stop — engagement cannot use this skill until105 operator removes C2/webshell references from the request.1065. Load `references/external-runners.md` only when operator asks about optional CLIs.107108## Mode: scope109110Validate authorization before any other offensive mode.1111121. Require `--target`, `--roe-file`, and `--phase`. If any are missing, run113 `scope_check.py` without them to produce the deny JSON and explain required fields.1142. On pass: summarize `engagement_id`, `phase`, `allowed_phases`, `restricted_phases`,115 `expires_at`, and in-scope target match.1163. On deny: cite `deny_reason`; do not load playbooks.117118## Mode: triage119120Route methodology depth without loading all upstream repos.1211221. Parse signal from `$ARGUMENTS` (e.g. `sqli`, `xss`, `kerberos`, `llm-injection`).1232. Load `references/methodology-router.md` — resolve canonical slug from dedup table.1243. Load matching `references/playbooks/*.md` section (one file at a time).1254. Surface `install_command` via `scripts/lookup_external_slug.py` only when operator requests deeper upstream body.1265. **Quarantine:** EXT-084 entries are inspect-only — never auto-install.127128## Mode: recon129130Post-authorization attack-surface **planning** only.1311321. Pass scope gate (see Scope Gate).1332. Confirm `recon` is in `allowed_phases` from scope result.1343. Load `references/playbooks/recon.md` (and `references/osint.md` when passive).1354. Produce a phased plan: asset inventory hypotheses, DNS/WHOIS/certificate angles,136 technology fingerprinting **commands the operator may run** — do not run them from137 this skill's scripts.1385. Emit planned checkpoints as draft findings only after operator supplies evidence.139140## Mode: web141142Web application testing **planning** only.1431441. Pass scope gate; confirm `web` in `allowed_phases`.1452. Load `references/playbooks/web.md` one section at a time.1463. Build a prioritized test checklist mapped to OWASP categories — no exploit payloads147 executed by skill scripts.1484. For each confirmed issue the operator reports, emit via `findings_emit.py` (pass149 `--scope-json` from the current scope gate result when binding findings to engagement).150151## Mode: api152153API security testing **planning** only.1541551. Pass scope gate; confirm `api` in `allowed_phases`.1562. Load `references/playbooks/api.md`.1573. Produce authn/authz, input validation, rate-limit, and BOLA test matrices.1584. Reference OpenAPI/GraphQL discovery steps for the operator; never call live targets159 from bundled scripts.160161## Mode: osint162163Passive open-source intelligence **planning** only.1641651. Pass scope gate; confirm `osint` in `allowed_phases`.1662. Load `references/osint.md`.1673. Stay within ROE `prohibited_actions` — no social engineering, harassment, or168 out-of-scope third-party data collection.1694. Output source list, query templates, and verification steps for the operator.170171## Mode: post-exploit172173Post-exploitation **planning** only when ROE explicitly allows it.1741751. Pass scope gate; confirm `post-exploit` in `allowed_phases` (see `restricted_phases` in scope JSON).1762. Load `references/playbooks/post-exploit.md`.1773. Produce containment-aware persistence/lateral-movement **planning matrices** — no C2178 install commands, implants, or live exploitation from bundled scripts.1794. Refuse C2/Havoc/Sliver/Cobalt Strike skill installs; document-only upstream references only.180181## Mode: validate182183Deterministic skill and findings validation.1841851. Run: `uv run python scripts/check.py`1862. If validating ad-hoc findings JSON, compare against `references/findings-schema.md`.1873. Report validation status; do not mutate ROE or targets.188189## Mode: report190191Session report synthesis.1921931. Collect findings emitted during the engagement (JSON lines or array).1942. Validate each record against `references/findings-schema.md`.1953. Group by severity; include scope metadata (`engagement_id`, `target`, ROE hash).1964. Use `scripts/findings_emit.py --aggregate` when normalizing operator-supplied notes.1975. Executive summary must state authorization basis and prohibited actions respected.198199## Mode: help2002011. Show dispatch table, scope gate steps, and tier boundary table.2022. List reference files with read-when guidance.2033. Remind: this skill does not install Strix or other runners — see204 `references/external-runners.md`.205206### Help _(empty)_207208Show dispatch table, scope gate steps, tier boundaries, and reference index. Offer examples:209210```text211/pentest help212/pentest doctor213/pentest scope staging.example.com214/pentest recon staging.example.com215/pentest web https://staging.example.com/app216/pentest api https://staging.example.com/api217/pentest osint staging.example.com218/pentest validate219/pentest report220```221222## Reference File Index223224Load ONE reference at a time. Do not preload all references.225226| File | Content | Read When |227|------|---------|-----------|228| `references/scope-and-roe.md` | ROE format, scope gate policy, deny reasons | Scope deny or ROE questions |229| `references/findings-schema.md` | JSON finding fields and severity rules | Emitting or validating findings |230| `references/methodology-router.md` | Compact signal → playbook → slug routing | `triage` or depth routing |231| `references/external-skill-index.manifest.json` | Pointer to planning-lock full index | Operator requests upstream body |232| `references/playbooks/*.md` | Phase and technique checklists (22 files) | Matching phase after scope pass |233| `references/osint.md` | Passive OSINT templates (legacy index) | `recon` or `osint` after scope pass |234| `references/provenance.md` | Synthesis sources, hybrid repos, no C2 policy | Methodology questions or audit trail |235| `references/external-runners.md` | Optional external CLIs (Strix, etc.) — no install | Operator asks about tooling |236237## Scripts238239| Script | When to Run |240|--------|-------------|241| `scripts/phases.py` | SSOT for `VALID_PHASES` (imported by scope/findings) |242| `scripts/scope_check.py` | **Always** before offensive planning — fail-closed without ROE |243| `scripts/doctor.py` | `doctor` mode or pre-engagement readiness |244| `scripts/findings_emit.py` | Emit or aggregate structured findings JSON (schema v1.1) |245| `scripts/lookup_external_slug.py` | Resolve signal/slug install metadata from planning lock |246| `scripts/validate_external_index.py` | Maintainer check for planning-lock index policy |247| `scripts/check.py` | `validate` mode or CI/skill maintenance |248249## Critical Rules2502511. **Scope gate first** — no recon, web, api, or osint planning without passing `scope_check.py`2522. **Fail-closed** — missing `--target` or `--roe-file` denies immediately2533. **No attack execution in scripts** — bundled Python is planning, validation, and JSON only2544. **No C2 or webshell vendoring** — refuse requests for implants, reverse shells, or malware staging2555. **No unauthorized testing** — without signed ROE, redirect to security-scanner (static) or refuse2566. **CTF is not pentest** — redirect synthetic lab work to ctf-* skills2577. **Operator-run tools only** — cite commands for the operator; skill scripts do not probe targets2588. **Respect ROE phases** — deny playbooks when phase not in `allowed_phases`2599. **Respect prohibited_actions** — DOS, social engineering, production data exfiltration when banned26010. **Structured findings** — use `findings_emit.py` and `references/findings-schema.md`26111. **Load ONE reference at a time** — progressive disclosure26212. **Present plan before deep checklist** — approval gate for invasive operator steps26313. **Never store live credentials** — redact secrets in findings and reports26414. **External runners are optional** — document in `external-runners.md`; never auto-install Strix26515. **Read-only ROE** — scripts validate ROE files; they do not create or modify authorization