Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill penetration-testing -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/penetration-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/penetration-testing/

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.

From the same set127

terraform-aws Provisions AWS infrastructure with Terraform, manages state, and configures modules. Useful for declarative cloud deployments and IaC workflows. CX Codex +1 387installs windows-hardening An agent skill that hardens Windows Server to Microsoft security baselines and CIS benchmarks: account policy, Group Policy, Defender, SMB. CX Codex +1 388installs audit-logging A skill for setting up centralized audit logging, retention and SIEM forwarding. Useful when you need an action trail for compliance or incident review. CX Codex +1 385installs redis A skill that walks the agent through Redis setup: caching, queues, Sentinel, cluster mode. Useful when a project needs Redis configured. CX Codex +1 379installs prompt-injection-defense Defends LLM applications against direct and indirect prompt injection attacks. It is designed for securing RAG pipelines and agentic tool-calling workflows. CX Codex +1 372installs kustomize Customizes Kubernetes manifests declaratively without templating. Helps structure base configurations and environment overlays across dev and production. CX Codex +1 370installs disaster-recovery A skill for disaster recovery planning: RTO and RPO targets, replication strategies, failover drills. Useful when you need a continuity plan on paper. CX Codex +1 367installs kubernetes-hardening Generates hardened Kubernetes manifests with strict security contexts, network policies, and RBAC rules. Useful when preparing workloads for security compliance. CX Codex +1 366installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor