Skip to content

Guide · Agent skill

How to use the writing-skills agent skill: create and test SKILL.md files

Updated · written with AI from the project's own documentation and checked against our catalogue data

The writing-skills skill is a guide for people who write agent skills: reusable instruction files (SKILL.md) that teach an AI agent a specific capability. Instead of writing a skill and hoping it works, the skill makes the agent follow a test-driven loop: observe the agent failing without the skill, write the skill, then check the failure is fixed and loopholes are closed. After this guide you will know how to install the skill, ask for it with natural requests, and what to check before you deploy a new skill.

Writing Skills GuidejnMetaCode/superpowers-zh · MIT

Quick start

  1. 1Download and unzip. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
  2. 2Or upload in the Claude apps. In the Claude apps, go to Settings, then Capabilities, then Skills, and upload the ZIP.
  3. 3Describe your task. Ask in plain language, for example to write a new SKILL.md or to edit an existing one.
  4. 4Run a baseline scenario. Before writing or changing the skill, run the task without it and note exactly where the agent breaks the rule and what excuses it gives.
  5. 5Write or edit the skill. Write the SKILL.md against those specific failures, keeping the description to trigger conditions.
  6. 6Rerun and close loopholes. Rerun the scenario with the skill, add counters for any new excuses, and check the agent now complies.
  7. 7Optionally render flowcharts. If the skill has DOT flowcharts, run render-graphs.js with Node.js and Graphviz installed to produce SVGs for review.

What does the writing-skills skill make the agent do?

When you ask the agent to create, edit or validate a skill, this skill tells it to treat documentation like code under test. The core rule in the source is that if you have not observed the agent failing without the skill, you do not know whether the skill teaches the right thing.

It also gives guidance on writing good skill descriptions (the trigger text that tells the agent when to load the skill), keeping documents short, naming skills with active verb-first names, organising files, and deciding when a skill should not be created at all. One example from the source: a one-off fix or project-specific convention belongs in a project CLAUDE.md file, not in a skill.

  • Write baseline test scenarios and run them with subagents before writing the skill
  • Write the SKILL.md, then confirm the agent now follows the rules
  • Refactor: close the loopholes the agent found under pressure
  • Keep descriptions to trigger conditions only, starting with "Use when..."
  • Keep frequently loaded skills short (the source suggests under 200 words in total)

How do you install the writing-skills skill?

You can install it in one of two ways. For a personal install, download the ZIP from this page and unzip it into ~/.claude/skills/. To limit it to one project, unzip it into the project's .claude/skills/ folder instead.

In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.

  • Personal: unzip into ~/.claude/skills/
  • Single project: unzip into .claude/skills/ inside the project
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

How do you trigger the skill with a natural request?

You do not need a special command. Describe the task in plain language, and the agent will load the skill when the request matches its description. The description of this skill covers creating new skills, editing existing skills, and validating a skill before deployment.

Be specific about the skill you are working on. Mention the file or folder if you have one, and say whether you are creating something new or changing something that already exists.

  • "Help me write a new SKILL.md for a skill that formats our API error messages."
  • "Edit the existing deploy-checklist skill so the trigger description is more accurate."
  • "Before we deploy this skill, check whether it actually changes how the agent behaves."
  • "Should this be a skill, or is it just a rule for our CLAUDE.md file?"

What does a typical session look like?

Suppose you want a skill that tells the agent how to handle a recurring type of bug. The skill guides you to first run a baseline scenario without the skill and record the exact excuses the agent gives for skipping the rule. You then write the skill against those specific failures, rerun the scenario, and add explicit counters for any new excuses that appear.

The source names the three phases as red (the agent breaks the rule without the skill), green (the agent follows the rule with the skill) and refactor (close loopholes while keeping compliance).

What do you need before you start?

The skill itself is a set of Markdown and one script. The source lists these requirements:

  • Node.js, version 20 or later, to run render-graphs.js (the repo declares node 20 or later)
  • Graphviz installed on the system, providing the dot command, only if you use render-graphs.js
  • A runtime with subagent capability for the recommended baseline testing method
  • The testing method described relies on manually run subagent scenarios, so it is not an automated test suite

How do you render a skill's flowcharts?

The included render-graphs.js script turns DOT flowcharts in a skill into SVG images so a human can review them. Run it from the directory that holds the scripts, pointing it at the skill folder. Use the second form to merge all diagrams into one SVG.

The script is optional. The rest of the skill works without Graphviz or Node.js.

node ./render-graphs.js ../some-skill # render each graph separately node ./render-graphs.js ../some-skill --combine # combine all graphs into one SVG

What are the safety notes?

This skill runs scripts: render-graphs.js is included and runs when you execute it. According to the listing, the skill does not use the network. Read the script before running it on a machine you care about, and only run it on skill folders you trust.

The source also says to call bundled scripts through an interpreter (for example bash scripts/tool.sh or node scripts/tool.js) rather than by bare path, because some plugin packagers strip the executable bit and the bare path fails with Permission denied.

What tips help you write better skills?

The source gives concrete rules that apply to any skill you write. Start with the description, because it decides whether the skill is ever loaded. Keep the body short, since a loaded skill competes with the rest of the conversation for context. Use one good example rather than several weak ones.

  • Write descriptions in the third person that describe only when to use the skill, not what it does
  • Do not summarise the workflow in the description; the source found the agent then skipped the full skill body
  • Use names with verbs first, such as creating-skills or condition-based-waiting
  • Refer to other skills by name with a clear required marker rather than using @ links, which load the file immediately
  • Use flowcharts only for non-obvious decisions, and use tables, lists or code blocks for everything else

What people use it for

  • Writing a new SKILL.md for a team's internal coding convention
  • Tightening the trigger description of an existing skill that loads at the wrong time
  • Testing whether a discipline rule (such as requiring a test before a fix) holds under time pressure
  • Reviewing a skill's decision flowchart by rendering it to SVG with render-graphs.js
  • Deciding whether a one-off instruction belongs in CLAUDE.md instead of a new skill

Frequently asked questions

Is the writing-skills skill free to use?

The skill is listed under the MIT licence, which the listing states. Check the licence file in the source repository for the full terms before redistributing it.

What do I need to install writing-skills?

To install it, download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps. Node.js 20 or later and Graphviz are only needed for the render-graphs.js script.

Do I need Graphviz to use this skill?

No. Graphviz (the dot command) is only required for render-graphs.js, which turns flowcharts into SVG images. The rest of the skill works without it.

Does writing-skills use the internet?

The listing says the skill does not use the network. It does run scripts, so review render-graphs.js before running it.

Can I use this skill if I only want to use existing skills?

This skill is a meta-guide for authoring skills, so it is not the right choice for casual users who only want to use skills that already exist.

How is this different from just asking the agent to write a skill?

This skill adds a structured process: observe the agent failing without the skill, write the skill, then verify the failure is fixed and close loopholes. It also sets rules for descriptions, length and naming. The testing method relies on manually run subagent scenarios, so it is not a fully automated testing tool.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use writing-skills if you are writing or maintaining your own SKILL.md files and want consistent structure, trigger descriptions and a repeatable way to check a skill changes agent behaviour. Skip it if you only use existing skills, or if your instruction is a simple project rule that belongs in CLAUDE.md, which the skill itself advises against turning into a skill.

Download the skill