# Ctf Writeup

Generates a single standardized submission-style CTF writeup for competition handoff...

- Repository: https://github.com/ljagiello/ctf-skills (3598 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ljagiello/ctf-skills --skill ctf-writeup -g -a claude-code -y`
Codex: `npx skills add ljagiello/ctf-skills --skill ctf-writeup -g -a codex -y`
Cursor: `npx skills add ljagiello/ctf-skills --skill ctf-writeup -g -a cursor -y`
Gemini CLI: `npx skills add ljagiello/ctf-skills --skill ctf-writeup -g -a gemini-cli -y`

## Description

Generates a single standardized submission-style CTF writeup for competition handoff and organizer review. Use after solving a CTF challenge to document the solution steps, tools used, and lessons learned in a structured format.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# CTF Write-up Generator

Generate a standardized submission-style CTF writeup for a solved challenge.

Default behavior:

- During an active competition, optimize for speed, clarity, and reproducibility
- Keep writeups short enough that a teammate or organizer can validate the solve quickly
- Always produce a `submission`-style writeup
- Prefer one complete solve script from challenge data to final flag

## Workflow

### Step 1: Gather Information

Collect the following from the current session, challenge files, and user input:

1. **Challenge metadata**, name, CTF event, category, difficulty, points, flag format
2. **Solution artifacts**, exploit scripts, payloads, screenshots, command output
3. **Timeline**, key steps taken, dead ends, pivots

```bash
# Scan for exploit scripts and artifacts
find . -name '*.py' -o -name '*.sh' -o -name 'exploit*' -o -name 'solve*' | head -20
# Check for flags in output files
grep -rniE '(flag|ctf|eno|htb|pico)\{' . 2>/dev/null
```

### Step 2: Generate Write-up

Write the writeup file as `writeup.md` (or `writeup-<challenge-name>.md`) using the submission template below.

---

## Templates

### Submission Format

```markdown
---
title: "<Challenge Name>"
ctf: "<CTF Event Name>"
date: YYYY-MM-DD
category: web|pwn|crypto|reverse|forensics|osint|malware|misc|ai-ml
difficulty: easy|medium|hard
points: <number>
flag_format: "flag{...}"
author: "<your name or team>"
---

# <Challenge Name>

## Summary

<1-2 sentences: what the challenge was and the core technique. Keep it direct.>

## Solution

### Step 1: <Action>

<Explain the key observation in 3-8 short lines. Keep it direct.>

\`\`\`python
<one complete solving script from provided challenge data to printing the final flag>
\`\`\`

### Step 2: <Action> (optional)

<Only add this when a second short step genuinely helps readability, such as separating the core observation from final verification.>

### Step 3: <Action> (optional)

The rest: https://github.com/ljagiello/ctf-skills/blob/HEAD/ctf-writeup/SKILL.md
