ctf-kit
CLAUDE.md12 starsChanged 9 months agoMITView on GitHub
AI-Assisted Capture The Flag Challenge Solver CTF Kit is a toolkit that helps security researchers and CTF players solve challenges faster using AI support, with specialized skills for different challenge categories (crypto, forensics, OSINT, web, pwn, reversing, stego, misc). CTF Kit is distributed as a Claude Code Plugin. Users install it with /plugin install and all skills become available as /ctf-kit:* in any project. The .claude/commands/ directory is kept for backward compatibility when working inside the ctf-kit repo itself.
- Installs packages
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 155
All tools follow the same pattern defined in docs/plan/tool-integrations.md:
- Distinctive: line 207
Never modify user's existing files
- Very specific: line 213
When implementing features, refer to these planning documents in docs/plan/:
- Distinctive: line 222
Use type hints everywhere
- Distinctive: line 224
Keep functions small and focused
- Distinctive: line 225
Prefer composition over inheritance
- Distinctive: line 226
Use dataclasses for data structures
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CTF Kit - Development Instructions
AI-Assisted Capture The Flag Challenge Solver
Project Overview
CTF Kit is a toolkit that helps security researchers and CTF players solve challenges faster using AI support, with specialized skills for different challenge categories (crypto, forensics, OSINT, web, pwn, reversing, stego, misc).
Architecture
ctf-kit/
├── .claude-plugin/
│ └── plugin.json # Claude Code plugin manifest
├── skills/ # Plugin skills (SKILL.md format)
│ ├── analyze/SKILL.md # /ctf-kit:analyze
│ ├── crypto/SKILL.md # /ctf-kit:crypto
│ ├── forensics/SKILL.md # /ctf-kit:forensics
│ ├── stego/SKILL.md # /ctf-kit:stego
│ ├── web/SKILL.md # /ctf-kit:web
│ ├── pwn/SKILL.md # /ctf-kit:pwn
│ ├── reverse/SKILL.md # /ctf-kit:reverse
│ ├── osint/SKILL.md # /ctf-kit:osint
│ └── misc/SKILL.md # /ctf-kit:misc
├── .claude/
│ └── commands/ # In-repo slash commands (backward compat)
├── src/ctf_kit/
│ ├── __init__.py
│ ├── cli.py # Main CLI entry point (Typer)
│ ├── config.py # Configuration management
│ ├── competition.py # Competition management
│ ├── commands/ # CLI subcommands
│ │ ├── __init__.py
│ │ ├── analyze.py
│ │ ├── check.py
│ │ ├── competition.py
│ │ ├── flag.py
│ │ ├── here.py
│ │ ├── init.py
│ │ ├── run.py
│ │ ├── status.py
│ │ └── writeup.py
│ ├── skills/ # AI agent skills (Python)
│ │ ├── __init__.py
│ │ ├── base.py # Base skill class
│ │ ├── analyze.py # /ctf-kit:analyze
│ │ ├── crypto.py # /ctf-kit:crypto
│ │ ├── forensics.py # /ctf-kit:forensics
│ │ ├── stego.py # /ctf-kit:stego
│ │ ├── web.py # /ctf-kit:web
│ │ ├── pwn.py # /ctf-kit:pwn
│ │ ├── reversing.py # /ctf-kit:reverse
│ │ ├── osint.py # /ctf-kit:osint
│ │ └── misc.py # /ctf-kit:misc
│ ├── integrations/ # Tool wrappers
│ │ ├── __init__.py
│ │ ├── base.py # BaseTool class, ToolResult
│ │ ├── basic/ # file, strings
│ │ ├── crypto/ # xortool, rsactftool, hashcat, hashid, john
│ │ ├── archive/ # bkcrack
│ │ ├── encoding/ # cyberchef
│ │ ├── forensics/ # binwalk, foremost, tshark, volatility
│ │ ├── stego/ # zsteg, steghide, exiftool
│ │ ├── web/ # sqlmap, gobuster, ffuf, nikto
│ │ ├── pwn/ # pwntools, ropgadget, checksec
│ │ ├── reversing/ # radare2, ghidra
│ │ ├── osint/ # sherlock, theharvester, dig, shodan, whois
│ │ └── misc/ # qrencode, zbarimg
│ └── utils/
│ ├── __init__.py
│ └── file_detection.py # Detect file types, magic bytes
├── docker/
│ └── pwn/Dockerfile # linux/amd64 pwn toolbox (gdb, pwndbg, pwntools)
├── tests/
├── docs/
│ ├── plan/ # Planning documents (reference)
│ │ ├── project-plan.md
│ │ ├── skills-analysis.md
│ │ ├── tool-integrations.md
│ │ └── competition-workflow.md
│ ├── legacy-commands/ # Old slash command definitions (reference only)
│ └── user-guide/
├── pyproject.toml
├── README.md
└── CLAUDE.md # This filePlugin Structure
CTF Kit is distributed as a Claude Code Plugin. Users install it with /plugin install and all skills become available as /ctf-kit:* in any project. The .claude/commands/ directory is kept for backward compatibility when working inside the ctf-kit repo itself.
Tech Stack
- Language: Python 3.11+
- CLI Framework: Typer (with Rich for output)
- Package Manager: uv
- Testing: pytest
- AI Agents: Claude Code, GitHub Copilot, Cursor, Gemini CLI
Development Commands
# Install in development mode
uv pip install -e ".[dev]"
# Run CLI
ctf --help
# Run tests
pytest
# Type checking
mypy src/
# Linting
ruff check src/Implementation Priority
Phase 1: Foundation (Current)
- ✅ Planning documents complete
- 🔲 Project skeleton with pyproject.toml
- 🔲 CLI framework (init, check, run commands)
- 🔲 Base tool integration class
- 🔲 Configuration system
Phase 2: Core Skills
- 🔲
/ctf.analyze- File analysis and categorization - 🔲
/ctf.crypto- Crypto tools (xortool, RsaCtfTool) - 🔲
/ctf.misc- Encoding chains, CyberChef operations
Phase 3: Tool Integrations
- 🔲 Crypto: xortool, hashcat, john
- 🔲 Archive: bkcrack, fcrackzip
- 🔲 Forensics: binwalk, volatility3, tshark
- 🔲 Stego: zsteg, steghide, exiftool
Phase 4: Advanced Skills
- 🔲
/ctf.forensics - 🔲
/ctf.stego - 🔲
/ctf.web - 🔲
/ctf.pwn - 🔲
/ctf.reverse - 🔲
/ctf.osint
Key Design Decisions
Tool Integration Pattern
All tools follow the same pattern defined in docs/plan/tool-integrations.md:
class BaseTool(ABC):
name: ClassVar[str]
description: ClassVar[str]
category: ClassVar[ToolCategory]
binary_names: ClassVar[list[str]]
install_commands: ClassVar[dict[str, str]]
@property
def is_installed(self) -> bool
@abstractmethod
def run(self, *args, **kwargs) -> ToolResult
def parse_output(self, stdout, stderr) -> dict[str, Any]
@dataclass
class ToolResult:
success: bool
tool_name: str
command: str
stdout: str
stderr: str
parsed_data: dict[str, Any] | None = None
artifacts: list[Path] | None = None
suggestions: list[str] | None = None
error_message: str | None = None
execution_time: float = 0.0Skill Pattern
Skills are AI-facing interfaces that orchestrate tools:
class BaseSkill(ABC):
name: ClassVar[str]
description: ClassVar[str]
category: ClassVar[str]
tool_names: ClassVar[list[str]] # Tool names loaded from registry
@abstractmethod
def analyze(self, path: Path) -> SkillResult
@abstractmethod
def suggest_approach(self, analysis: dict[str, Any]) -> list[str]
def run_tool(self, name: str, *args, **kwargs) -> ToolResult | NoneUser Workflow
CTF Kit adds .ctf/ folders inside user's existing challenge folders:
- Never modify user's existing files
- Support both flat and nested folder structures
- Work with user's preferred AI agent
Reference Documents
When implementing features, refer to these planning documents in docs/plan/:
- project-plan.md - Overall architecture, CLI design, implementation phases
- skills-analysis.md - How AI should interact with each category
- tool-integrations.md - Complete tool wrapper specifications (40+ tools)
- competition-workflow.md - User workflow during competitions
Code Style
- Use type hints everywhere
- Docstrings for all public functions
- Keep functions small and focused
- Prefer composition over inheritance
- Use dataclasses for data structures
- Rich console output for user feedback
Testing Strategy
- Unit tests for tool integrations (mock subprocess calls)
- Integration tests with actual tools (marked as slow)
- Sample CTF challenges in
tests/fixtures/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

