Writing CTF writeups is boring. In the previous article we talked about StealthWriter a tool I created to automate this boring process in a consisten way. This solution is good, but it missed an important feature: the ability to use it with the latest AI agents integrated in your favourite IDE. So I have created a SKILL.md for it, as a wrapper around the tool.

Generally, we think of a “skill” as a set of textual instructions: “read this file”, “respect this style convention”, “use this library in this way”. This is a great approach for guiding the agent in writing standard code. But what happens when the process we want to automate is too complex, rigid, or may trigger model guardrails?

An underrated use case for SKILL.md is using them as a “bridge” to pre-existing pipelines or CLI tools.

The Smart Wrapper

Let’s take ctf-writeup-generator-ai (formerly known as StealthWriter) as an example.

Initially, you might be tempted to give the AI agent the whole task: “Here are my notes, write the post for me, create the folder, copy the images, and write the Astro frontmatter”. However, having an LLM do all this in one shot presents some risks:

  1. Fragile Formatting: Astro’s frontmatter requires exact fields. Imprecise prompts or LLM hallucination could break the site build.
  2. Complex File Management: Moving, renaming, and mapping images (for example, switching from img1.png to ./images/img1.png in markdown) is an inherently algorithmic operation, not a generative one.
  3. Output Quality (“AI Slop”): Quality and style are not consistent. If you are not specific enough, the output will be generic and not align with your previous posts.
  4. Guardrails: For some security related tasks frontier LLMs may refuse to complete the task due to guardrails.

The solution? Shift the complex logic to a Python script (the CLI tool) and use the SKILL.md file solely to interface the AI agent with that script.

Anatomy of a “Bridge” Skill

The skill documentation (in .agents/skills/stealthwriter/SKILL.md) instructs the agent on how to use the external tool:

# StealthWriter Skill

StealthWriter is an automated ETL pipeline that transforms raw CTF lab notes into publication-ready Astro blog posts...

## Execution Steps

1. **Construct the Command**
   Construct the execution command using the `stealth-writer` CLI (which relies on `uv`).
   
   Base command structure:
   `uv run stealth-writer --src <source_dir> --out <output_dir>`

2. **Execute the Generation**
   Run the constructed bash command...

With these simple instructions, the agent understands the tool’s purpose and learns its syntax.

When I ask the agent: “Take my notes from /tmp/notes and create a post for my blog”, it knows it shouldn’t invent an article from scratch. It grasps the intent, maps the folders to the --src and --out parameters, and runs the bash command in the background.

Practical Setup: From Zero to Agent

Assuming you already have your agent-ready IDE installed, here are the exact terminal commands you need to set up the tool and the skill:

1. Clone the Repository

Clone the project and enter the directory:

git clone git@github.com:StealthGuy/ctf-writeup-generator-ai.git
cd ctf-writeup-generator-ai

2. Configure Environment and Dependencies

Copy the template configuration, add your Gemini API key, and install the required dependencies using uv:

cp .env.example .env
# Open .env and add your GEMINI_API_KEY, or append it directly:
# echo "GEMINI_API_KEY=your_key_here" >> .env

# Install dependencies and sync virtual environment
uv sync

3. Open the Workspace

Open the folder in your IDE so the agent can discover the skill:

# Open in your agent-ready IDE (e.g., Cursor, Antigravity, or VS Code)
cursor .

Because the skill file is located at .agents/skills/stealthwriter/SKILL.md, your agent automatically discovers it when the project loads.

You can now prompt your agent directly in chat:

“Generate a writeup from my notes in /path/to/notes and save it to /path/to/blog/content”

The agent reads the instructions, builds the correct CLI command, and runs it for you in the background.

The Best of Both Worlds

This hybrid approach combines the strengths of two worlds:

  • From the AI Agent we get the natural interface. We don’t have to remember flags, syntax, or exact paths. The agent analyzes the context, finds the right paths, and builds the command.
  • From the dedicated CLI tool we get accuracy, consistency, and speed.

The next time you build a tool for yourself, try writing a SKILL.md file around it. You will discover that agents are not only for writing code for you, but they can become the smart “operators” of the tools you have already built.