Dev.to AI 🤖 Ai 👁 0 📖 3 min read

What actually goes in a Claude Code skill file (and the three mistakes that break it)

A skill is not a long prompt you paste in. It is a folder with a SKILL.md that the agent loads when the description matches the task, plus the references and scripts that task needs. Getting that structure right is the d

A skill is not a long prompt you paste in. It is a folder with a SKILL.md that the agent loads when the description matches the task, plus the references and scripts that task needs. Getting that structure right is the difference between an agent that finishes a job and one that wanders.

I write motion-graphics skills for Claude Code and Codex. Here is the structure, and the three mistakes that break it.

The shape of a skill

stickman-motion/
  SKILL.md
  references/
    story.md
    camera.md
    ffmpeg-recipes.md
  scripts/
    render.sh
    qa.py

SKILL.md is small. Everything else loads only when a step needs it.

The two fields that decide whether the skill ever runs

---
name: stickman-motion
description: "Use when the task is to turn a one-line brief into a short 2D stickman animation. Covers story, rig, storyboard, render and QA."
---

name is the handle. description is the trigger, and it is the field people get wrong. It has to say when to use the skill, in the words a person would use, not what the skill contains. "Motion graphics helper" never fires. "Use when the task is to turn a one-line brief into a short 2D stickman animation" fires.

Progressive disclosure, in practice

The body of SKILL.md is the pipeline, one line per step:

1. Read the brief, write `story.md` (5 beats, no more).
2. Rig the character from `references/rig.md`.
3. Storyboard: one line per shot, camera move named from `references/camera.md`.
4. Render each shot with `scripts/render.sh`, then concat.
5. Run `scripts/qa.py` and fix anything it reports before calling it done.

Each step ends in a file you can open. That is the whole trick: the agent always knows what "done" means, and you can see where it went wrong.

Mistake 1: everything in one file

One long markdown file makes the agent re-read camera rules while it is rendering. Split by step. A reference file that is only read at step 3 costs nothing at step 1.

Mistake 2: prose where a script belongs

"Use ffmpeg with the right flags for the frame rate" is a coin flip. A render.sh with the flags already set is not. If a step is deterministic, put it in scripts/ and let the skill call it.

Mistake 3: no QA step

Without a check, the agent reports success on output that is 4 frames long or has no audio track. A short script that asserts duration, resolution, frame count and audio presence turns "looks done" into "is done". This is the step most skill packs skip, and it is the one that decides whether you trust the result.

If you are writing your first skill

  1. Write the description first, as a sentence about the task, not the tool.
  2. One skill, one job. A skill that does storyboards and also does thumbnails will do both badly.
  3. Make every step produce a file you can open and check.
  4. Test it with a deliberately bad brief. If the skill still produces something usable, the pipeline is right.

Disclosure: I sell the motion packs these came from, a 24-skill stickman studio, an 11-skill web motion studio and a $2 five-page quick guide. The structure above is not specific to them and you do not need them to use it. If you want the finished versions: https://files.instinct.com/2snqgvnfbjng-stash-camp-9-tools-2-to?utm_source=devto&utm_medium=social&utm_campaign=skillfile

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.