CTF Challenge

CTF Challenge is a skill for Claude Code, Codex from buzzer-re/Rikugan. It costs 15 tokens per session (652 once invoked), scanned A, original, MIT.

A guide for solving capture-the-flag reverse-engineering puzzles, where you inspect a program to find a hidden answer called a flag.

In plain words
What is it for?
Use it to inspect binaries, locate input checks, identify encoding or encryption steps, search for flag patterns, and solve the resulting constraints.
Why use it?
It gives a focused path through the program instead of encouraging broad, time-consuming analysis.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect binaries, locate input checks, identify encoding or encryption…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/buzzer-re/rikugan/ctf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add buzzer-re/Rikugan --skill ctf
Clone the repo
git clone --depth 1 https://github.com/buzzer-re/Rikugan

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for CTF Challenge

README.md
[![agentmods](https://agentmods.dev/badge/skills/buzzer-re/rikugan/ctf.svg)](https://agentmods.dev/skills/buzzer-re/rikugan/ctf)
Your own site
<a href="https://agentmods.dev/skills/buzzer-re/rikugan/ctf"><img src="https://agentmods.dev/badge/skills/buzzer-re/rikugan/ctf.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 652 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00652
Opus 5 $0.00008 $0.00326
Sonnet 5 $0.00003 $0.00130
Haiku 4.5 $0.00002 $0.00065

Measured 7d ago against content hash 36f3cb96c895, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

CTF Challenge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rikugan/skills/builtins/ctf/SKILL.md · 62 lines

How it starts

The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Task: CTF Challenge. You are solving a capture-the-flag reverse engineering challenge. The goal is finding the flag.

Approach

Be targeted and efficient. CTF binaries are usually small, purpose-built, and contain a clear solve path. Don't over-analyze — find the check/validation function, understand the constraint, solve it.

Workflow

  1. get_binary_info + list_functions — orient yourself, find main or entry (batch these)
  2. decompile_function on main — identify the input path and validation logic
  3. Trace the check function: usually a comparison, hash check, or transformation chain
  4. Identify the algorithm: XOR, custom cipher, hash, math constraints, maze/game, VM-based
  5. search_strings for flag format strings (CTF{, flag{, HTB{, etc.)
  6. Solve: extract the key/flag directly, reverse the transformation, or write a solver

Common Patterns

  • Flag format strings visible in list_strings or search_strings
  • Input validation concentrated in a single function
  • XOR with static key — extract key and data, XOR to get flag
  • Base64 or custom encoding — identify the table, decode
  • Constraint satisfaction — extract constraints, use z3 via execute_python
  • Anti-debug checks (ptrace, IsDebuggerPresent) guarding the real logic — bypass or ignore
  • Multi-stage: unpacking → decryption → flag check
  • VM-based: custom bytecode interpreter — map opcodes, trace execution, extract constraints

Solving Strategies

Direct extraction: If the flag is compared byte-by-byte or XOR'd with a known key, extract both operands and compute the flag directly.

Constraint solving: For complex validation (many conditions, polynomial checks, matrix transforms), extract constraints and write a z3 solver:

from z3 import *
s = Solver()
flag = [BitVec(f'c{i}', 8) for i in range(N)]
# Add constraints from decompiled validation...
s.add(...)
if s.check() == sat:
    m = s.model()
    print(''.join(chr(m[c].as_long()) for c in flag))

Read the full file on GitHub · 62 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 62 lines · 15 tokens per session scan A 36f3cb96c895

Subscribe to this mod's changes

CTF Challenge is a skill published in the GitHub repository buzzer-re/Rikugan (672 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 652 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.