Skip to main content
skill CX Codex

hackthebox — Claude Code skill: CTF challenge automation

A skill for HackTheBox competitions that spins up machines, handles credentials, delegates attacks to subagents, and posts breach reports to Slack.

MIT 213 installs ★ 632 updated 2026-07-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add transilienceai/communitytools --skill hackthebox -a claude-code
Open on GitHub

What hackthebox does

hackthebox automates the HackTheBox competition workflow — starting machines, running reconnaissance, organizing exploits, and submitting flags. The skill reads credentials from environment variables (HTB_USER, HTB_PASS, HTB_TOKEN), verifies VPN connectivity for machine-type challenges, and scaffolds directories for reconnaissance, findings, and artifacts.

At its core is an orchestrator that spawns one coordinator subagent per target machine. Each coordinator maintains its own attack-chain.md and experiments.md, tracks exploit attempts with mandatory skeptic checkpoints, and returns a completion summary. The orchestrator does not solve inline — it queues and monitors subagents, then triggers /skill-update and posts the result to Slack.

Requires HackTheBox token and Anthropic API key in environment. Machine challenges need active VPN; the skill checks connectivity and provides setup instructions if needed.

What it helps with

  • Automate machine exploitation and flag submission on HackTheBox
  • Coordinate multiple attack chains across concurrent targets
  • Track reconnaissance, experiments, and attempt counts per machine
  • Generate completion reports and push results to Slack
  • Enforce structured attack documentation and decision checkpoints

Example prompts for the agent

  • Exploit a machine and submit both user and root flags
  • Start a box, verify network access, and begin reconnaissance immediately
  • Spawn coordinators for five targets and collect breach reports after all complete

How to install hackthebox

1Skills CLI (Vercel)

npx skills add transilienceai/communitytools --skill hackthebox -a claude-code

2Manually: put the files in place

~/.claude/skills/hackthebox/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/hackthebox/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about hackthebox

How do I install hackthebox in Claude Code?

Run npx skills add transilienceai/communitytools --skill hackthebox -a claude-code, then check ~/.claude/skills/hackthebox/SKILL.md.

What does this skill do?

Manages the full HackTheBox workflow: reads credentials, checks VPN, spawns coordinator subagents for each target, and collects breach reports with flag submissions.

What environment variables are required?

HTB_USER, HTB_PASS, HTB_TOKEN, and ANTHROPIC_API_KEY. Optionally SLACK_BOT_TOKEN and HTB_SLACK_CHANNEL_ID for notifications.

Source text

SKILL.md · MIT
---
name: hackthebox
description: HackTheBox platform operations and automations to solve challenges, machines and capture the flags hacking competitions
context: fork
---

## Workflow
- [workflow.md](reference/workflow.md) — Complete workflow with commands. Read this for each step

### Steps
1. Get Credentials — `python3 .claude/tools/env-reader.py HTB_USER HTB_PASS HTB_TOKEN ANTHROPIC_API_KEY SLACK_BOT_TOKEN HTB_SLACK_CHANNEL_ID`
2. Only for "Machine" kind of competition -> Verify vpn is running, otherwise download the vpn file from the platform and instruct the user on how to enable it
3. Generate output dirs — `mkdir -p YYMMDD_<name>/{recon,findings,logs,artifacts,tools,reports}` for each challenge. **Do not seed `attack-chain.md` or `experiments.md` from the orchestrator** — those are the coordinator subagent's first action (see `skills/coordination/reference/spawning-recipes.md`).
4. To achieve the tasks given by the user, when possible use the HTB_TOKEN, otherwise login to the platform using playwright at https://account.hackthebox.com/login and fill the login form with the HTB_USER and HTB_PASS
5. If necessary, start the machines
6. If necessary, check network connectivity to the machines
7. Spawn coordinator subagent per target — `Agent(name="coordinator-{tag}", run_in_background=True, ...)` per `spawning-recipes.md`. **Never run the P0-P6 coordinator workflow inline in the orchestrator session** — the bookkeeping discipline (attack-chain.md, experiments.md, goal_attempts counting, mandatory skeptic at experiments 5/15/25) requires the subagent boundary. Max N concurrent agents, queue-based spawning.
8. Post-solve Phase 3 — parent orchestrator (not coordinator) always runs `/skill-update` + Slack after each coordinator returns its PHASE3_SUMMARY (see workflow.md step 8)

## References
- [workflow.md](reference/workflow.md) — Workflow overview with credentials, VPN, setup, and coordinator spawn
- [spawning-recipes.md](../coordination/reference/spawning-recipes.md) — Coordinator agent spawn prompt templates (exploitation, flag submission, completion report, stats)
- [completion-report-schema.md](../../formats/htb-completion-report.md) — Challenge completion report structure & template
- [slack-notifications.md](reference/slack-notifications.md) — Slack completion notification format & examples
- [platform-navigation.md](reference/platform-navigation.md) — Platform site navigation guide
- [vpn-pool-routing.md](reference/vpn-pool-routing.md) — VPN pool isolation. Pre-flight check before spawning any machine (release_arena vs dedivip_lab vs others)
- [vpn-setup.md](reference/vpn-setup.md) — VPN connectivity troubleshooting
- [anti-bot-bypass.md](../reconnaissance/reference/anti-bot-bypass.md) — Cloudflare/Turnstile detection evasion

© transilienceai · MIT · transilienceai/communitytools

Similar skills

All skills for Security →

From the same set42

The whole set →
api-security api-security is a Claude Code skill that tests REST, GraphQL, WebSocket, and Web-LLM interfaces for authorization flaws and injection bugs across large endpoint collections. CX Codex +1 220installs web-app-logic web-app-logic — a skill for finding vulnerabilities in web application logic that automated scanners miss: workflow bypass, race conditions, access control flaws, cache poisoning, and information disclosure. CX Codex +1 219installs source-code-scanning source-code-scanning guides automated SAST, CVE scanning across project dependencies, and secrets detection to locate vulnerabilities before deployment. CX Codex +1 217installs techstack-identification techstack-identification is a Claude Code skill that finds a company’s technology stack from public signals. It delegates research to specialist sub-skills and combines their findings in a report. CX Codex +1 215installs server-side server-side guides security testing for SSRF, HTTP request smuggling, path traversal, and deserialization flaws in server code. CX Codex +1 213installs authentication This skill checks login flows, tokens, 2FA, CAPTCHA, and bot detection. Use it to examine auth bypasses and weaknesses in authentication controls. CX Codex +1 212installs infrastructure The infrastructure skill tests network services, protocols, and perimeter security. Use it for authorized assessments that need structured checks and captured evidence. CX Codex +1 211installs ai-threat-testing ai-threat-testing is a Claude Code skill that tests LLM applications for OWASP Top 10 vulnerabilities with 10 specialized agents. CX Codex +1 210installs

Project sponsors

Companies that keep this analytics open