penetration-testing · bagelhole — Claude Code skill: phased pentest runs
Walks your agent through pentest phases: recon, scanning, exploitation, reporting. Useful when you need to validate your own security controls.
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a claude-codeWhat penetration-testing does
The skill gives the agent a five-phase order of work: reconnaissance, scanning, exploitation, post-exploitation and reporting. Each phase comes with concrete steps, from passive information gathering and DNS enumeration to verifying found vulnerabilities and assessing risk.
It ships ready-made commands for common tools: dig, host, subfinder and whois for recon, nmap with -sV -sC -p- for ports and services, plus nikto, dirb, sqlmap and curl for web checks. A separate block covers rules of engagement: what is in scope, what is out, the testing window and an emergency contact. Written authorization and a clearly defined scope are required up front — running these commands against addresses you do not own is not something to do casually.
The skill stays at the basic level. It is not a full audit, and it does not replace manual XSS testing, for which the text points you to Burp Suite. Reach for it when you want the check split into steps and the report not forgotten.
What it helps with
- split a security check into phases without dropping steps
- gather domain and subdomain information before testing
- scan ports and identify services on a host
- test a web app for SQL injection and directory traversal
- write down scope and testing window before starting
Example prompts for the agent
- Run reconnaissance on target.com: DNS, subdomains, WHOIS
- Scan ports and services on target.com with nmap
- Write a pentest report by phase with risk assessment and remediation
How to install penetration-testing
1Skills CLI (Vercel)
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a claude-code2Manually: put the files in place
~/.claude/skills/penetration-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/penetration-testing/
1Skills CLI (Vercel)
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a codex2Manually: put the files in place
.agents/skills/penetration-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a cursor2Manually: put the files in place
.cursor/skills/penetration-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install BagelHole/DevOps-Security-Agent-Skills penetration-testing2Manually: put the files in place
.github/skills/penetration-testing/SKILL.md1Skills CLI (Vercel)
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/BagelHole/DevOps-Security-Agent-Skills --path security/operations/penetration-testingManually: put the files in place
.devin/skills/penetration-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about penetration-testing
How do I install penetration-testing in Claude?
Run npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a claude-code. The skill file then lands at ~/.claude/skills/penetration-testing/SKILL.md.
What does penetration-testing do?
It guides the agent through five pentest phases: reconnaissance, scanning, exploitation, post-exploitation and reporting. Each phase lists commands for specific tools and keeps risk assessment in view.
What do I need before testing starts?
Written authorization and a defined scope: what is in, what is out, the testing window and an emergency contact. The skill asks you to pin these down first.
Source text
SKILL.md · MIT
---
name: penetration-testing
description: Perform basic penetration testing and security assessments. Use reconnaissance, vulnerability discovery, and exploitation techniques. Use when validating security controls or assessing system security.
license: MIT
metadata:
author: devops-skills
version: "1.0"
---
# Penetration Testing
Validate security controls through authorized testing.
## Phases
```yaml
pentest_phases:
1_reconnaissance:
- Passive information gathering
- DNS enumeration
- Network mapping
2_scanning:
- Port scanning
- Service identification
- Vulnerability scanning
3_exploitation:
- Attempt exploitation
- Verify vulnerabilities
- Document findings
4_post_exploitation:
- Privilege escalation
- Lateral movement
- Data access
5_reporting:
- Document findings
- Risk assessment
- Remediation recommendations
```
## Reconnaissance
```bash
# DNS enumeration
dig example.com ANY
host -l example.com
# Subdomain discovery
subfinder -d example.com
# WHOIS
whois example.com
```
## Scanning
```bash
# Port scan
nmap -sV -sC -p- target.com
# Web scanning
nikto -h https://target.com
dirb https://target.com
# Vulnerability scan
nmap --script vuln target.com
```
## Web Testing
```bash
# SQL injection test
sqlmap -u "http://target.com/page?id=1"
# XSS testing
# Use Burp Suite or manual testing
# Directory traversal
curl "http://target.com/file?path=../../../etc/passwd"
```
## Rules of Engagement
```yaml
scope:
in_scope:
- target.com
- api.target.com
out_of_scope:
- production-db.target.com
- third-party services
testing_window: "Weekdays 2-6 AM UTC"
emergency_contact: "[email protected]"
```
## Best Practices
- Always get written authorization
- Define clear scope
- Document everything
- Report critical findings immediately
- Safe exploitation techniques only
## Related Skills
- [dast-scanning](../../scanning/dast-scanning/) - Automated testing
- [vulnerability-scanning](../../scanning/vulnerability-scanning/) - Vulnerability discovery
© devops-skills · MIT · BagelHole/DevOps-Security-Agent-Skills
Similar skills
Everything for Security →penetration-testing by other authors comes first.