Skip to content

Workflows & Agents

Workflow skills chain multiple tools into multi-step engagements. Subagent personas provide specialized roles for different phases of a security assessment.

Each workflow verifies scope, runs numbered steps with -j -x flags, and delivers a structured summary at the end.

Comprehensive reconnaissance against a target — host discovery, DNS enumeration, SSL inspection, and subdomain enumeration.

/recon localhost

Steps:

  1. Host discovery (nmap ping sweeps)
  2. Port scanning (nmap service detection)
  3. DNS records (dig A, MX, NS, TXT, CNAME)
  4. Zone transfer attempt (dig AXFR)
  5. SSL/TLS inspection (curl certificate check)
  6. Subdomain enumeration (gobuster DNS, if installed)

Output: Structured summary of hosts, ports/services, DNS records, TLS details, and subdomains.

Manage the target scope file that controls which targets security tools can scan.

/scope # Show current scope (default)
/scope show # Show current scope
/scope init # Create scope with localhost defaults
/scope add <target> # Add a target (requires confirmation)
/scope remove <target> # Remove a target (requires confirmation)
/scope clear # Remove all targets (requires confirmation)

The scope file lives at .pentest/scope.json and is checked by the PreToolUse hook before every tool invocation. See Safety & Scope for details on how scope validation works.

Three specialized personas for different phases of a security assessment. Each runs in an isolated context with its own set of tools and preloaded skills.

/pentester

Offensive testing specialist with full Bash access and 6 preloaded workflow skills. Orchestrates multi-tool attack workflows.

/defender

Defensive analyst with read-only access. Categorizes findings, assesses risk, and provides remediation guidance.

/analyst

Report synthesis specialist with write access. Correlates findings across scans and produces structured deliverables.

Offensive pentesting specialist. Invoke with a target to run a full engagement:

/pentester localhost

Tools available: Read, Grep, Glob, Bash

Preloaded skills: pentest-conventions, recon, scan, fuzz, crack, sniff

The pentester selects the appropriate workflow(s) based on the target type:

Target TypeStarting Workflow
IP address or domainrecon, then scan
Web application URLscan, then fuzz
Hash filecrack
Network interface or pcapsniff

Delivers findings organized by severity with specific evidence and recommended next steps.

Defensive security analyst. Invoke after scanning completes to get remediation guidance:

/defender

Tools available: Read, Grep, Glob (read-only — cannot execute commands or modify files)

Preloaded skills: pentest-conventions

For each finding, the defender provides:

  • Attack vector — how the vulnerability is exploited
  • Impact — what an attacker gains
  • Exploitability — difficulty level
  • Remediation — specific fix with priority
  • Detection — how to detect exploitation attempts

Concludes with an overall security posture rating, systemic issues, and quick wins.

Report synthesis specialist. Invoke after multiple scans to generate a comprehensive report:

/analyst "DVWA Assessment"

Tools available: Read, Grep, Glob, Write (can write report files but cannot execute commands)

Preloaded skills: pentest-conventions, report

The analyst correlates findings across all scan results:

  • Merges overlapping findings from different tools
  • Identifies attack chains (where multiple findings combine for greater impact)
  • Produces a structured report with finding IDs, CVSS scores, and remediation roadmap
  • Writes the report to report-YYYY-MM-DD.md
PersonaToolsPreloaded SkillsUse Case
/pentesterRead, Grep, Glob, Bashpentest-conventions, recon, scan, fuzz, crack, sniffActive scanning and testing
/defenderRead, Grep, Globpentest-conventionsPost-scan remediation guidance
/analystRead, Grep, Glob, Writepentest-conventions, reportReport generation and correlation

A complete engagement using Claude Code, from scope to report:

/scope init # 1. Define allowed targets
/scope add 192.168.1.100 # 2. Add engagement target
/recon 192.168.1.100 # 3. Discover hosts and services
/scan http://192.168.1.100:8080 # 4. Scan for vulnerabilities
/fuzz http://192.168.1.100:8080 # 5. Discover hidden content
/crack /tmp/hashes.txt # 6. Crack extracted hashes
/defender # 7. Get defensive recommendations
/analyst "Engagement Report" # 8. Generate final report

Each step builds on the previous — recon discovers services, scan finds vulnerabilities, fuzz reveals hidden paths, and the analyst synthesizes everything into a deliverable.