agentleFS
Wang200935Wang200935/security-agent-skills/skills/ctf/ctf-writeup-discipline/SKILL.md

ctf-writeup-discipline

Skill4 starsChanged 3 months agoMITView on GitHub

Produce CTF write-ups with authentic solve evidence, scripts, screenshots,

The file

Show its rules and text

We split this skill into the rules it gives an agent

35 rules. About 0 are common, 28 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈28

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not generate fake terminal/browser screenshots with PIL/HTML/image generation and present them as solve screenshots.

    line 37
  2. Very specific:

    Put reference/original material in original_writeup/.

    line 41
  3. Very specific:

    Put the newly authored write-up, scripts, logs, screenshots, and flag in my_writeup/.

    line 42
  4. Distinctive:

    Add a top-level README.md that explains the separation.

    line 43
  5. Distinctive:

    Keep image links relative and verify all links resolve after moving folders.

    line 56
  6. Very specific:

    If the user wants a simpler layout, my_writeup_images/ next to the markdown is acceptable, but keep it inside my_writeup/.

    line 80
  7. Distinctive:

    Run the real command and save logs:

    line 86
  8. Distinctive:

    Verify dimensions and existence:

    line 96
  9. Distinctive:

    Prefer real desktop/window captures when the user explicitly wants "直接在電腦上截圖" rather than tool-exported page images.

    line 105
  10. Distinctive:

    If using a real browser window, check for privacy leaks before keeping the screenshot: visible bookmarks, signed-in avatars, account names, …

    line 106
  11. Distinctive:

    If a direct computer screenshot leaks personal information, replace it with a sanitized preexisting challenge screenshot or a …

    line 107
  12. Distinctive:

    Do not keep a screenshot merely because it is more "real" if it exposes the user's personal account details.

    line 108
  13. Distinctive:

    If the challenge title in the user's folder or provided reference write-up differs from the hostname / deployed service name, preserve the …

    line 112
  14. Distinctive:

    Start a real solve transcript:

    line 132
  15. Distinctive:

    Use a visible terminal with the challenge directory open.

    line 133
  16. Distinctive:

    Run commands naturally: unzip, list files, inspect binary/source, execute program, debug, test payloads.

    line 134
  17. Distinctive:

    Keep terminal width readable, usually 100-140 columns.

    line 135
  18. Distinctive:

    Use macOS screenshot capture naturally:

    line 144
  19. Very specific:

    Use ordered filenames: 01-unzip-files.png, 02-checksec.png, 03-crash-repro.png, 04-debug-root-cause.png, 05-exploit-flag.png.

    line 150
  20. Distinctive:

    Keep screenshot order aligned with the write-up narrative.

    line 151
  21. Very specific:

    Never leave only 截圖 2026-...png in the final artifact.

    line 152
  22. Distinctive:

    No secrets, unrelated private windows, or personal information visible.

    line 156
  23. Distinctive:

    Every screenshot is from the real solve environment (not generated/synthetic).

    line 157
  24. Distinctive:

    When the user provides an example write-up image or PDF:

    line 161
  25. Distinctive:

    Keep natural UI context similar.

    line 171
  26. Distinctive:

    Do not copy or fabricate exact outputs.

    line 173
  27. Distinctive:

    If the example uses many screenshots, err on the side of capturing more during the solve, then select the best ones later.

    line 175
  28. Very specific:

    If a reference write-up already has writeup_images/, do not reuse that folder name for your own screenshots in the same directory.

    line 180
  29. Distinctive:

    When moving markdown into a subfolder, update image paths and verify them programmatically.

    line 181
  30. Distinctive:

    Do not create polished diagrams when the user asked for natural screenshots.

    line 182
  31. Distinctive:

    Do not take screenshots after cleaning up terminal history if that makes the process look artificial.

    line 183
  32. Distinctive:

    Do not rely on only text logs.

    line 184
  33. Distinctive:

    Do not include unrelated apps/tabs in screenshots.

    line 185
  34. Distinctive:

    Do not crop out the command that produced an output.

    line 186
  35. Distinctive:

    Do not keep a screenshot merely because it is more "real" if it exposes the user's personal account details.

    line 187

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CTF Write-up Artifact Discipline

Trigger

Load this skill whenever producing a CTF write-up, especially if:

  • the user provides another player's write-up as reference
  • the user asks for screenshots of the solve process
  • the write-up must include scripts / explanation / proof of solving
  • files need to be organized for submission or later review

Hard Rules

  1. Do not fabricate screenshots.
    • Screenshots must come from an actual app/window/session via screencapture, browser screenshot, or other real capture mechanism.
    • Do not generate fake terminal/browser screenshots with PIL/HTML/image generation and present them as solve screenshots.
    • Diagrams are allowed only if explicitly labeled as diagrams, and only when the user asked for diagrams.
  2. Do not mix reference write-ups with your own write-up.
    • Put reference/original material in original_writeup/.
    • Put the newly authored write-up, scripts, logs, screenshots, and flag in my_writeup/.
    • Add a top-level README.md that explains the separation.
  3. A write-up must include both思路 and解法.
    • Challenge observation / artifact inventory
    • Vulnerability or mathematical insight
    • Step-by-step solve explanation
    • Commands run and key outputs
    • Full scripts or clearly linked script files
    • Final flag and verification
  4. Screenshots should support the story, not replace it.
    • Capture normal-looking terminal/browser windows showing real commands and outputs.
    • Include screenshots for: artifact inventory, key intermediate recovery, exploit/solver run, final flag, and script view when requested.
    • Keep image links relative and verify all links resolve after moving folders.

Preferred Folder Layout

challenge_dir/
  README.md
  original_writeup/
    <reference write-up files>
    writeup_images/
  my_writeup/
    MY_WRITEUP.md
    scripts/
      solve.py / solve.sage / exploit.py
    logs/
      run.log
    screenshots/
      01_inventory.png
      02_key_step.png
      03_solver_run.png
      04_final_flag.png
    FLAG.txt

If the user wants a simpler layout, my_writeup_images/ next to the markdown is acceptable, but keep it inside my_writeup/.

Screenshot Workflow on macOS

For real terminal screenshots:

  1. Run the real command and save logs:
    script -q logs/solver.typescript
    sage solve.sage | tee logs/solve.log
  2. Open/show the evidence in Terminal.
  3. Capture the real Terminal window:
    screencapture -x -l <WINDOW_ID> screenshots/03_solver_run.png
  4. Verify dimensions and existence:
    sips -g pixelWidth -g pixelHeight screenshots/*.png

Using AppleScript to drive a temporary Terminal window is fine, but it must run/display real commands and outputs. Do not synthesize the pixels.

For browser screenshots:

  1. Prefer real desktop/window captures when the user explicitly wants "直接在電腦上截圖" rather than tool-exported page images.
  2. If using a real browser window, check for privacy leaks before keeping the screenshot: visible bookmarks, signed-in avatars, account names, extension popups, local file paths, and other personal UI chrome.
  3. If a direct computer screenshot leaks personal information, replace it with a sanitized preexisting challenge screenshot or a browser-capture image that hides personal chrome, and explain the swap in the write-up if needed.
  4. Do not keep a screenshot merely because it is more "real" if it exposes the user's personal account details.

Naming / reference discipline

  • If the challenge title in the user's folder or provided reference write-up differs from the hostname / deployed service name, preserve the user-visible challenge title in your write-up unless the user asks to rename it.
  • Example: if the folder/reference says easywab but the live host is easy-session, write the challenge name as easywab and mention the target URL separately.

Write-up Checklist

Before finalizing:

  • Reference and own work are in separate folders.
  • Markdown image links resolve from the markdown's location.
  • No generated/fake screenshots are used as evidence.
  • Any diagram is labeled as a diagram and not called a screenshot.
  • Full solve scripts are embedded or placed under scripts/ and linked.
  • Commands and outputs shown in screenshots correspond to actual logs/files.
  • Flag is verified from the solver output.
  • Top-level README explains where to read the final write-up.

macOS Screenshot Capture Workflow

For real terminal screenshots on macOS:

  1. Start a real solve transcript:
    • Use a visible terminal with the challenge directory open.
    • Run commands naturally: unzip, list files, inspect binary/source, execute program, debug, test payloads.
    • Keep terminal width readable, usually 100-140 columns.
  2. Capture screenshots at these points:
    • Challenge files extracted and identified.
    • Important static analysis result: file, strings, checksec, source snippets, decompiler/debugger view.
    • Vulnerability discovery: crash, sanitizer/error output, debugger register/stack view, suspicious code path.
    • Exploit construction: payload script, local proof, remote command if applicable.
    • Flag acquisition: final successful output with the flag visible, if challenge rules allow.
  3. Use macOS screenshot capture naturally:
    • Cmd+Shift+5 for screenshot UI when doing manual-style capture.
    • screencapture -x -l <WINDOW_ID> screenshots/03_solver_run.png for scripted capture.
    • Window or selected-region screenshots are preferred over full desktop unless the write-up being matched uses full desktop screenshots.
  4. Name and index screenshots immediately after capture:
    • Use ordered filenames: 01-unzip-files.png, 02-checksec.png, 03-crash-repro.png, 04-debug-root-cause.png, 05-exploit-flag.png.
    • Keep screenshot order aligned with the write-up narrative.
    • Never leave only 截圖 2026-...png in the final artifact.
  5. Verify screenshots:
    • sips -g pixelWidth -g pixelHeight screenshots/*.png — confirm dimensions.
    • No secrets, unrelated private windows, or personal information visible.
    • Every screenshot is from the real solve environment (not generated/synthetic).

Matching Another Write-up's Screenshot Style

When the user provides an example write-up image or PDF:

  1. Inspect the example for style features:
    • Terminal theme/light-dark mode.
    • Full screen vs selected window vs cropped region.
    • How much surrounding UI is visible.
    • Whether screenshots are mostly terminal, browser, debugger, or editor.
    • Image density: screenshot after every command vs only major milestones.
  2. Emulate the style, not the pixels.
    • Keep natural UI context similar.
    • Match screenshot frequency and framing.
    • Do not copy or fabricate exact outputs.
  3. If the example uses many screenshots, err on the side of capturing more during the solve, then select the best ones later.

Pitfalls Learned

  • A polished image that looks like a terminal but was generated with code is misleading; users can spot it and may reject the write-up.
  • If a reference write-up already has writeup_images/, do not reuse that folder name for your own screenshots in the same directory; it causes attribution confusion.
  • When moving markdown into a subfolder, update image paths and verify them programmatically.
  • Do not create polished diagrams when the user asked for natural screenshots.
  • Do not take screenshots after cleaning up terminal history if that makes the process look artificial.
  • Do not rely on only text logs; the user explicitly wants visual solve evidence.
  • Do not include unrelated apps/tabs in screenshots.
  • Do not crop out the command that produced an output; the command is often the evidence.
  • Do not keep a screenshot merely because it is more "real" if it exposes the user's personal account details. Replace with a sanitized capture.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.