pentest-r1-autonomous-penetration-testing — Claude Code skill
pentest-r1-autonomous-penetration-testing guides setup of a two-stage reinforcement learning pipeline for autonomous penetration testing. Ideal for training security models in interactive sandboxes.
no license 271 installs ★ 13 updated 2026-10-09
npx skills add reason-machines/security-skills --skill pentest-r1-autonomous-penetration-testing -a claude-codeWhat pentest-r1-autonomous-penetration-testing does
This skill guides the setup of LLM training for penetration testing. The first phase runs grpo_stage1.py. It trains a base model via GRPO and LoRA using 500 expert walkthrough records.
The second phase runs grpo_multi_turn_stage2.py inside an intercode-ctf Docker sandbox. A reward class scores command attempts, penalizing errors and giving points when flags are captured.
Executing this pipeline requires Python 3.11.11, Docker, and NVIDIA Container Toolkit. Without proper GPU support, policy optimization scripts cannot run.
What it helps with
- configure two-stage reinforcement learning for security agents
- run offline GRPO training on expert pentest logs
- set up interactive
intercode-ctfDocker challenge environments - implement reward logic for command outputs and flag discovery
Example prompts for the agent
- Help me build the intercode-ctf Docker container for online training
- Configure the Stage 1 LoRA settings and run
grpo_stage1.py - Show how
PentestRewardModelscores CTF command responses
How to install pentest-r1-autonomous-penetration-testing
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill pentest-r1-autonomous-penetration-testing -a claude-code2Manually: put the files in place
~/.claude/skills/pentest-r1-autonomous-penetration-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pentest-r1-autonomous-penetration-testing/
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill pentest-r1-autonomous-penetration-testing -a codex2Manually: put the files in place
.agents/skills/pentest-r1-autonomous-penetration-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill pentest-r1-autonomous-penetration-testing -a cursor2Manually: put the files in place
.cursor/skills/pentest-r1-autonomous-penetration-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/security-skills skills/pentest-r1-autonomous-penetration-testing2Manually: put the files in place
.github/skills/pentest-r1-autonomous-penetration-testing/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill pentest-r1-autonomous-penetration-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/security-skills --path skills/pentest-r1-autonomous-penetration-testingManually: put the files in place
.devin/skills/pentest-r1-autonomous-penetration-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill pentest-r1-autonomous-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 pentest-r1-autonomous-penetration-testing
How do I install pentest-r1-autonomous-penetration-testing in Claude Code?
Run npx skills add reason-machines/security-skills --skill pentest-r1-autonomous-penetration-testing -a claude-code.
What does this skill do?
It provides setup steps and configuration patterns for training security models using offline GRPO on walkthrough data and online interactive CTF Docker sandboxes.
What prerequisites are needed before starting the training scripts?
You need Python 3.11.11, Docker, and NVIDIA Container Toolkit. GPU acceleration also requires the CUDA 12.4 runtime.