agentleFS
emiliodominguezemiliodominguez/flow-skills/skills/flow-write-skill/SKILL.md

flow-write-skill

Skill1 starsChanged 47 days agoMITView on GitHub

Write or fix an agent skill. Use when an agent ignores, misapplies or fails to load a skill, or to create a SKILL.md with a trigger description, lean body and evals. Hands off to `flow-review`.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the task without the new guidance in a fresh context and record what the agent actually does, including the excuses it gives for …

    line 17
  2. Distinctive:

    Do not summarize the procedure.

    line 28
  3. Very specific:

    Keep the body short (aim for a few hundred words).

    line 47
  4. Very specific:

    Put deterministic, repeatable steps in scripts/, invoked through their interpreter, and templates in assets/.

    line 49

≈ “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

Write a skill

A skill is a pointer plus a procedure. The description decides whether it loads; the body decides what the agent does once it has. Write only what changes behavior you have observed.

Phase 1: Prove the gap

  • Name the task, the observed failure and who hits it. Check existing skills and instruction files first; extend or fix one before adding another that competes for the same trigger.
  • Run the task without the new guidance in a fresh context and record what the agent actually does, including the excuses it gives for skipping steps. If the baseline already succeeds, write nothing.
  • Decide the scope: one job, one trigger family. Two unrelated triggers mean two skills.

Phase 2: Write the description

The description is always in context, so every word costs tokens across every session.

  • Lead with a short noun phrase for what it is, then Use when plus concrete triggers: user phrasings, symptoms, file types or situations. Include near-miss boundaries ("not for X; use Y").
  • Do not summarize the procedure. An agent that reads the steps in the description may follow them and skip the body.
  • Third person, key word first, no host or model names. Stay within the repository's length budget and end with any handoff convention it uses.

Phase 3: Write the body

Match the form of guidance to the failure you observed:

FailureForm
Knows the rule, skips it under pressureOne firm rule, the reason, and a red-flags list of the excuses you recorded
Produces the wrong shapeA positive recipe or template showing the expected output
Keeps omitting an elementA required slot in the template
Should vary by situationA condition keyed to something observable
  • Phases or a numbered process, then Anti-patterns and Done when with checkable exits.
  • Explain why instead of stacking capitalized MUSTs. Avoid vague escape hatches ("unless it matters"); they erase the rule.
  • Keep the body short (aim for a few hundred words). Move situational detail to references/<topic>.md, one level deep, and say exactly when to read each file.
  • Put deterministic, repeatable steps in scripts/, invoked through their interpreter, and templates in assets/. Never embed secrets, host-specific paths or invocation syntax.

Phase 4: Test it

  • Triggering: about ten prompts that should load the skill and ten near misses that should not. Check both directions; tune the description, not the body, for trigger problems.
  • Behavior: rerun the baseline task with the skill in a fresh context, several times. Compare against the no-skill run on concrete assertions. An assertion that passes either way tests nothing.
  • Fix only observed gaps, then run the repository's validators and size checks.

Anti-patterns

  • Writing a skill for a failure nobody has observed.
  • A description that restates the workflow, or so generic it triggers on everything.
  • Walls of rules for every edge case instead of a reference loaded on demand.
  • Declaring a skill works because it validates, without a behavior comparison.

Done when

  • A recorded baseline shows the gap, and the skill run closes it on the same task.
  • Trigger checks pass for positive and near-miss prompts.
  • The skill passes repository validation and stays within its size budgets.

Review the result with flow-review.

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.