npx skills add ...
npx skills add reason-machines/security-skills --skill pentest-ai-agents
Claude Code subagents for offensive security research, penetration testing planning, recon analysis, exploit research, detection engineering, and security reporting
npx skills add reason-machines/security-skills --skill pentest-ai-agents
Skill by ara.so — Security Skills collection.
pentest-ai-agents transforms Claude Code into an offensive security research assistant through 35 specialized subagents. Each agent carries deep domain knowledge in specific areas: recon, web testing, Active Directory, cloud security, mobile/wireless pentesting, social engineering, payload crafting, reverse engineering, exploit chaining, detection engineering, and forensics.
The agents route automatically based on task description—no manual agent selection needed. They understand 80+ offensive security tools (nmap, nuclei, BloodHound, Impacket, Sliver, Ghidra, etc.) and can plan engagements, analyze recon data, research exploits, chain attacks, build detections, and write reports.
This copies agent files to ~/.claude/agents/ and is idempotent (safe to re-run for updates).
The --tools flag installs underlying offensive security tools via apt/brew/pacman + pipx/go/cargo.
| Flag | Behavior |
|---|---|
--global | Install to ~/.claude/agents/ (all projects) |
--project | Install to .claude/agents/ (current project) |
--lite | Use Haiku for Tier 1 advisory agents (cost optimization) |
--tools | Install underlying tools (nmap, nuclei, BloodHound, etc.) |
All Tier 2 agents enforce scope guards—they require explicit engagement scope declaration and refuse out-of-scope actions.
Once installed, just describe your task in Claude Code:
Claude routes to the appropriate specialist automatically.
Check which underlying tools are installed:
Output shows ✔ (installed) or ✘ (missing) per tool with install hints.
Track engagement findings in persistent SQLite:
Schema includes cve, tool_used, mitre_attack, remediation columns.
Generate handoff reports between work sessions:
Produces Markdown with: what was accomplished, current state, immediate next actions, blockers.
Tier 2 agents require explicit scope before executing tools:
Agents refuse actions outside declared IP ranges, domains, and time windows.
All agents enforce scope guards that refuse:
engagement-planner produces:
recon-advisor (Tier 2):
ffuf -u http://10.10.10.50/FUZZ -w /usr/share/wordlists/dirb/common.txtad-attacker:
bloodhound-python or parses existing JSONexploit-chainer:
payload-crafter:
Includes AMSI bypass snippets and ETW patching patterns.
detection-engineer:
reverse-engineer:
Provides Ghidra Python scripts for automated key extraction from common crypto libraries (OpenSSL, mbedTLS).
phishing-operator:
Includes SMTP relay setup, domain reputation warming, and email header crafting to evade SPF/DKIM/DMARC.
ctf-solver:
dcode.fr substitution, quipqiupCovers crypto, steganography (zsteg, steghide), forensics, binary exploitation, web challenges.
Agents drive these tools (installable via install.sh --tools):
Recon: nmap, masscan, rustscan, subfinder, amass, httpx, theHarvester, sherlock, holehe, maigret
Web: ffuf, gobuster, feroxbuster, sqlmap, dalfox, Commix, dirsearch, whatweb
Vulnerability: nuclei, nikto, nmap NSE, RouterSploit
AD: BloodHound, Impacket, NetExec, Certipy, kerbrute, Responder
Credentials: Hydra, Hashcat, John, cupp, CeWL, Crunch, hashid, haiti
Cloud: aws-cli, azure-cli, gcloud, Trivy, Prowler, ScoutSuite, Pacu
Containers: kubectl, kube-hunter, peirates, CDK
C2: Sliver, Mythic, Havoc, Cobalt Strike
LLM: Garak, PyRIT, Promptfoo
Mobile: Frida, Objection, jadx, apktool, MobSF
Wireless: aircrack-ng, hcxdumptool, bettercap
Social: GoPhish, Evilginx, dnstwist
Payloads: msfvenom, Donut
RE: Ghidra, Radare2, Binwalk, dnSpy
Forensics: Volatility 3, exiftool, YARA, Wireshark
Run bash db/doctor.sh to audit installed tools.
Cost comparison (per 1M tokens input):
Tier 1 agents handle ~80% of interactions (planning, analysis, recommendations). Using Haiku for Tier 1 cuts costs by ~60% with minimal quality impact.
Agents use structured tool output parsing to minimize repeated context:
Reduces token usage by 10-50× for large scan outputs.
Run agents with local models via Ollama:
Tested models:
mixtral:8x7b: Good for Tier 1 advisory agentsllama3:70b: Comparable to Haiku for planning/analysiscodellama:34b: Decent for exploit POC generationLimitations: Local models struggle with complex exploit chaining and detection rule generation. Recommend hybrid mode: local for Tier 1, Claude Sonnet for Tier 2.
Symptom: Claude doesn't invoke the right agent for your task.
Fix: Be more explicit in task description:
Or use slash commands:
Symptom: Agent recommends command, but tool isn't installed.
Fix:
Symptom: Tier 2 agent refuses to run commands: "No engagement scope declared."
Fix: Declare scope first:
Include: IP ranges, domains, authorizing party, time window.
Symptom: database is locked error when adding findings.
Fix:
Symptom: Agent recommends deprecated tool or technique.
Fix: Update agents:
Agents track tool updates via community feedback. File issues for outdated recommendations.
Authorized testing only. All agents enforce scope guards:
Hard refusals for:
Users are responsible for obtaining proper authorization before testing. pentest-ai-agents is a research and education tool. Unauthorized testing is illegal.
Contributions welcome:
agents/)db/tools.json)detection-engineer ruleset)See CONTRIBUTING.md for guidelines.
MIT License - see LICENSE
Planning & OSINT:
- engagement-planner: Phased pentest plans with MITRE ATT&CK mappings
- threat-modeler: STRIDE/DREAD threat modeling
- opsec-anonymizer: Operator identity hygiene, source IP design
- osint-collector: Domain recon, email harvesting, social profiling
- recon-advisor: Parses nmap/nuclei/BloodHound, prioritizes targets
Vulnerability Discovery:
- vuln-scanner: nuclei, nikto, nmap NSE, RouterSploit orchestration
- web-hunter: ffuf, gobuster, sqlmap, dalfox, Commix
- api-security: API testing (GraphQL, REST, gRPC)
- bizlogic-hunter: Business logic flaws, race conditions, IDOR
- bug-bounty: Bug bounty workflow optimization
- llm-redteam: OWASP LLM Top 10, prompt injection, RAG poisoning
Infrastructure Attacks:
- ad-attacker: BloodHound, Impacket, NetExec, Certipy, Kerberos abuse
- cloud-security: AWS/Azure/GCP misconfig, SCPs, IAM abuse
- cicd-redteam: Pipeline exploitation, artifact poisoning
- container-breakout: Docker/K8s escape, runc/cri-o CVEs, RBAC abuse
Specialized Domains:
- mobile-pentester: Frida, Objection, jadx, MobSF
- wireless-pentester: aircrack-ng, hcxtools, bettercap
- social-engineer: Social engineering campaigns
- phishing-operator: GoPhish, Evilginx, dnstwist
Post-Exploitation:
- privesc-advisor: Linux/Windows privilege escalation
- c2-operator: Sliver/Mythic/Havoc/Cobalt Strike profiles
- payload-crafter: msfvenom, Donut, custom loaders
- swarm-orchestrator: Multi-agent attack coordination
Analysis & Reverse Engineering:
- reverse-engineer: Ghidra, Radare2, Binwalk, dnSpy
- malware-analyst: Volatility 3, YARA, sandbox analysis
- forensics-analyst: Incident response, memory/disk analysis
- ctf-solver: CTF challenge solver (crypto, stego, pwn, web)
Exploit Development:
- exploit-chainer: Multi-step attack composition
- attack-planner: Attack graph generation, path optimization
- poc-validator: Exploit proof-of-concept validation
- credential-tester: Hydra, Hashcat, credential stuffing
Defense & Reporting:
- detection-engineer: Sigma, Splunk SPL, Elastic KQL, Sentinel KQL
- stig-analyst: DISA STIG compliance auditing
- report-generator: Executive summaries, technical findings, CVSS scoring"Plan an internal pentest for a 500-endpoint AD environment, 2-week window."
"I have a domain user, where do I look first in BloodHound?"
"Convert this SharpHound EXE into shellcode for an EDR test."
"Run a phishing simulation against acme-corp.com."
"Reverse this firmware image and analyze the crypto protocol."# Get agent recommendation + concrete next commands
/recommend "phish a small SaaS team's IT department"
# Filter agents by domain
/agents-for web
/agents-for cloud
/agents-for active-directory
# List all agents
/agents# Audit all tools grouped by agent
bash db/doctor.sh
# Audit specific agent's toolchain
bash db/doctor.sh --agent ad-attacker
# Machine-readable output
bash db/doctor.sh --json# Initialize new engagement
bash findings.sh init acme-corp-2026
# Add a finding (auto-routed from agent output)
bash findings.sh add --severity critical --title "Domain Admin in Kerberoastable SPN" \
--description "SVC_SQL account has adminCount=1 and servicePrincipalName set" \
--cve CVE-2022-12345 --cvss 8.8 --host dc01.acme.local --tool bloodhound
# Show engagement stats
bash findings.sh stats
# Export findings as JSON
bash findings.sh export
# Export as Markdown report
bash findings.sh export --format mdbash handoff.sh# Anthropic API key (required)
export ANTHROPIC_API_KEY="sk-ant-..."
# Optional: Model overrides
export PENTEST_TIER1_MODEL="claude-3-5-haiku-20241022" # Advisory agents
export PENTEST_TIER2_MODEL="claude-3-7-sonnet-20250219" # Execution agents
# Optional: Findings database path
export PENTEST_FINDINGS_DB="$HOME/.pentest/findings.db"
# Optional: Tool installation preferences
export PENTEST_PACKAGE_MANAGER="apt" # apt, brew, pacman, yum# In Claude Code, declare scope first:
"Engagement scope: 10.10.10.0/24, acme-corp.com, authorized by Jane Doe <jane@acme.com>, 2026-05-01 to 2026-05-15"
# Then request actions:
"Run full port scan on 10.10.10.0/24"
"Enumerate SMB shares on discovered hosts"# In Claude Code:
"Plan a 2-week external pentest for fintech-startup.io. Assume no prior credentials. Focus on web app, API, and cloud infrastructure."# Run recon tools (outside Claude):
nmap -sV -sC -oA acme-scan 10.10.10.0/24
nuclei -l hosts.txt -severity critical,high -json -o nuclei.json
# In Claude Code:
"Analyze acme-scan.xml and nuclei.json. Prioritize targets for initial access."# After obtaining BloodHound JSON:
"I have domain user alice@acme.local. BloodHound data is in ./bloodhound/. Show me paths to Domain Admins and recommend attacks."