How to write a SKILL.md

A short file that tells the agent when to run, what to do first, and what is forbidden.

SKILL.md is a playbook, not a blog post. Start with a name and one trigger sentence, such as “use this when the user wants a PR”.

List ordered steps: which files to read, which checks to run, and what the output should look like. Keep steps short enough to tick off.

Add constraints in their own block: no secrets in commits, no unrelated directories, ask when unsure. Constraints beat fancy examples.

Place the folder where the client scans skills, compare it with this site’s skill categories to avoid duplicates, then invoke it by name in Cursor or Codex.