agentleFS
haintbotasthaintbotast/coding-agent-instructions/skills/writing-skills/SKILL.md

writing-skills

Skill0 starsChanged 22 days agoMITView on GitHub

Use when creating, editing or verifying an agent skill (SKILL.md) before deployment. Skill writing is test-driven development applied to process documentation. Not for deciding which existing skill to invoke, that is using-skills.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 20 projects that use this

  • kntismSkill

    condition-based-waiting

    Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses

    Also in 3 projects that use this

  • aaddrickSkill

    writing-agents

    Use when creating new agents, editing existing agents, or defining specialized subagent roles for the Task tool

    Also in 3 projects that use this

  • frankxaiSkill

    defense-in-depth

    Use when invalid data causes failures deep in execution, requiring validation at multiple system layers - validates at every layer data passes through to make bugs structurally impossible

    Also in 3 projects that use this

  • +3 more from Leodorareluctant259

The file

We split this skill into the rules it gives an agent

4 rules. 1 is common, 2 are distinctive, and 1 is very specific to this project.

  • 1

    Common

    Most of the 180 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.

    line 8
  2. Distinctive:

    Start with "Use when..." — triggering conditions, specific symptoms and contexts

    line 40
  3. Very specific:

    Never make a skill fetch its procedure from a live URL at run time.

    line 48
  4. Distinctive:

    Run the pressure scenario with a fresh subagent WITHOUT the skill (baseline RED — record its excuses), then WITH the skill (GREEN).

    line 58

“Common” is measured: kept by at least 6 in 10 of the 180 edited versions of this file we could read. “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

Writing Skills

Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.

TDD mapping: pressure scenario = test case; SKILL.md = production code; agent violates rule without skill = RED (document the exact rationalizations it used); agent complies with skill = GREEN; closing loopholes = REFACTOR.

When to Create

  • Technique wasn't intuitively obvious; you'd reference it across projects; applies broadly; others benefit.

Don't create for: one-off solutions, standard practices documented elsewhere, project-specific conventions (→ the project's AGENTS.md / CLAUDE.md), mechanically enforceable constraints (→ automate instead).

Structure

skills/skill-name/SKILL.md    # required; separate files only for heavy reference (100+ lines) or reusable scripts
---
name: skill-name-with-hyphens
description: Use when [triggering conditions and symptoms] — NOT a summary of the process
---
# Name
## Overview — core principle in 1-2 sentences
## When to Use — symptoms, use cases, when NOT
## Core Pattern — before/after comparison
## Quick Reference — scannable table
## Common Mistakes — what goes wrong + fixes

Description Field = Discovery

The agent reads only the description to decide whether to load the skill. It must answer "should I read this NOW?":

  • Start with "Use when..." — triggering conditions, specific symptoms and contexts
  • End with a negative clause naming the sibling skill that owns the neighbouring case ("Not for X, that is other-skill") so two skills never compete for one trigger
  • Third person; max ~500 chars (Agent Skills spec hard limit: 1024); NEVER summarize the workflow (agents will follow the summary instead of reading the skill)
  • name: lowercase letters, digits and single hyphens, ≤ 64 chars, equal to the folder name. Keep frontmatter to name + description (optionally license, metadata): some tools reject unknown keys

Writing Rules

  • Skills are reusable techniques, NOT narratives about how you once solved something
  • Never make a skill fetch its procedure from a live URL at run time; copy what it needs into references/ with the source SHA (failure class REMOTE-INSTRUCTIONS-AT-RUNTIME)
  • A rule a machine can check becomes a script in scripts/, not a sentence
  • One excellent way per problem, not many options
  • Address the reader as "you"; imperative mood
  • Rationalization tables and "Red Flags — STOP" sections close loopholes for rules agents are tempted to break under pressure
  • For discipline skills, state an Iron Law and make violations concrete: "Delete it. Start over."
  • Invoke bundled scripts through their interpreter in the prose (bash scripts/tool.sh, python3 scripts/tool.py), never by bare path: some plugin packagers strip executable bits.

Testing

Run the pressure scenario with a fresh subagent WITHOUT the skill (baseline RED — record its excuses), then WITH the skill (GREEN). New rationalizations → plug them → re-verify.


Distilled from obra/superpowers (MIT © Jesse Vincent / Prime Radiant), v6.1.0 @ f268f7c; script-invocation rule from v6.4.2 @ 8ca22db; unchanged at v7.0.0 @ bb92a77 (2026-10-12).

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.