agentleFS
komlukkomluk/scaffolding/skills/skill-authoring/SKILL.md

skill-authoring

Skill16 starsChanged 5 days agoMITView on GitHub

Methodology for authoring scaffolding-compatible skills: frontmatter contract, body structure, validation. TRIGGER when: running /create-skill, writing or reviewing a SKILL.md file, or deciding if a procedure deserves its own skill. SKIP: distilling a conversation into candidates (use distill); 3-tier memory writes (use agent-memory).

  • Reads credentials

89 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cloud-api-recipe-authoring, codebuddy-ide-mcp-upgrade and 10 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.
  • TencentCloudBaseSkill

    cloud-api-recipe-authoring

    Author or revise a cloud-api-operations recipe (config/source/skills/cloud-api-operations/references/recipes/). Encodes why the long tail of control-plane capabilities is deliberately NOT wrapped as MCP/CLI tools, the API-first admission test for whether a capability deserves a recipe, the negative and positive lists, the fixed recipe structure, the writing rules distilled from writing-for-agents, the user-facing copy red lines, and the product regeneration/verification pipeline. Also routes contributors (and their agents) to the contribution flow and the pre-PR self-test protocol in references/contributing.md. Use when adding a recipe, judging whether a scenario belongs in the recipe set, updating the recipes index, re-checking existing recipes against the admission test, or onboarding someone who wants to submit one.

    Also in 3 projects that use this

  • TencentCloudBaseSkill

    codebuddy-ide-mcp-upgrade

    升级 CodeBuddy IDE(genie 扩展)内置的 CloudBase MCP,以及 MCP 发版时同步 IDE 侧白名单。当用户提到「更新 IDE 里的 MCP」「内置 MCP 版本太老」「IDE 集成的 CloudBase 功能不足」「改工具白名单 toolWhiteList」「把新 bundle 打进 CodeBuddy」「白名单漂移」「MCP 发版要同步什么」时使用。覆盖:解包定位内置 bundle 与内嵌配置、重新构建 mcp bundle、生成新的工具白名单与系统提示词、安全注入 IDE 并备份、用 MCP 协议验证工具清单、人工端到端验收、一键回滚。

    Also in 3 projects that use this

  • DIL8654Skill

    api-contract-review

    Review ASP.NET Core Web API contracts for HTTP semantics, versioning, backward compatibility, and response consistency. Use when the user asks to review an API, check endpoints, validate REST behavior, or before releasing contract changes.

    Also in 5 projects that use this

  • zaxbysauceSkill

    pr-review-fix

    Codex adapter for addressing pull request review feedback in opencode-swarm. Use when the user asks to fix PR review comments, requested changes, reviewer findings, CI-review notes, or a pasted review summary with low false-positive tolerance.

    Also in 3 projects that use this

  • albertdobmeyerSkill

    git-workflows

    Advanced git operations beyond add/commit/push. Use when rebasing, bisecting bugs, using worktrees for parallel development, recovering with reflog, managing subtrees/submodules, resolving merge conflicts, cherry-picking across branches, or working with monorepos.

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    frontend-engineering

    Expert frontend application engineering: accessible UI structure, state and data-fetching discipline, form/validation UX, responsive layouts, performance budgets, and integration with API contracts. Use when building or refining SPA/web screens, design-system consumption, client-side routing, or fixing UI reliability (loading, empty, and error states).

    Also in 3 projects that use this

  • +6 more from TencentCloudBase

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 80 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT apply this skill for:

    line 25
  2. Very specific:

    Every SKILL.md MUST begin with a YAML frontmatter block delimited by ---:

    line 34
  3. Very specific:

    Every scaffolding skill description MUST follow this template:

    line 54
  4. Very specific:

    When a skill has no overlapping neighbour, the SKIP clause may instead name an explicitly out-of-scope case.

    line 71
  5. Distinctive:

    Prefer tables for decision matrices and checklists.

    line 92
  6. Distinctive:

    Before a new or edited skill ships:

    line 172

“Common” is measured: kept by at least 6 in 10 of the 80 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

Skill Authoring Skill

Purpose

Methodology for authoring scaffolding-compatible skills. A skill is a single SKILL.md file under skills/<name>/ that encodes a reusable methodology Claude Code can auto-invoke. This skill defines the frontmatter contract, the recommended body structure, the description-writing rules, and the quality bar every authored skill must meet before it ships.

When to Apply

Apply this skill when:

  • Running the /create-skill command to scaffold a new skill
  • Hand-writing or editing a skills/<name>/SKILL.md file
  • Reviewing a skill for frontmatter correctness or auto-invocation quality
  • Deciding whether a repeatable procedure deserves promotion into its own skill

Do NOT apply this skill for:

  • Distilling a conversation into knowledge candidates — use distill
  • Writing into the 3-tier file memory — use agent-memory

Frontmatter Contract

Every SKILL.md MUST begin with a YAML frontmatter block delimited by ---:

FieldRule
nameRequired. Kebab-case ^[a-z][a-z0-9-]*$. MUST equal the parent directory name.
descriptionRequired. Non-empty, 1–340 characters. Follows the Description Contract below.
contextOptional. Only value: fork — run the skill in an isolated forked subagent. See "Context: fork".
agentOptional. Sub-agent for a forked skill: Explore, Plan, or general-purpose.
effortOptional. Reasoning-effort hint: low, medium, or high.

name and description are the only required fields. context, agent, and effort are optional delivery-tuning fields. All five are value-checked by validators/validate-skill.sh; any other frontmatter key is left untouched.


Description Contract

The description field drives Claude Code's automatic skill invocation. A vague or overbroad description either fails to trigger or triggers on the wrong tasks. Every scaffolding skill description MUST follow this template:

"<one-line capability summary>. TRIGGER when: <2-4 concrete observable situations>. SKIP: <1-2 cases handled by a named neighbour skill or out of scope>."

Rules:

RuleDetail
Length capKeep the whole string under ~340 characters. Trim the summary first.
Observable triggersUse observable verbs/nouns ("writing a migration"), not adjectives ("complex DB work").
2–4 triggersFewer than 2 under-triggers; more than 4 dilutes the match.
Named SKIPName the competing neighbour skill — e.g. SKIP: ... (use python-patterns).
Mutual SKIPIf skill A's SKIP names skill B, skill B's SKIP SHOULD name skill A. No two skills' TRIGGER clauses may overlap without a mutual disambiguating SKIP.
Under-trigger biasFor borderline cases, prefer under-triggering over false activations.

When a skill has no overlapping neighbour, the SKIP clause may instead name an explicitly out-of-scope case. The /create-skill command composes this string automatically from the collected inputs.


Recommended Body Structure

A skill body should read top-to-bottom as a methodology, not as prose. Use this section order:

OrderSectionContent
1## PurposeOne short paragraph: what the skill encodes and the outcome.
2## When to ApplyBulleted TRIGGER situations, then explicit SKIP cases.
3Methodology section(s)The repeatable procedure — prefer decision tables.
4## Anti-PatternsTable of common mistakes and their corrections.
5## Quality ChecklistVerifiable completion criteria.

Guidelines:

  • Prefer tables for decision matrices and checklists; keep prose minimal.
  • Each section earns its place — delete empty scaffolding.
  • Scaffold new skills from templates/skill-template.md.

Preloaded vs Invoked (orchestration contract)

A skill reaches an agent in one of two ways, and the author should decide which on purpose:

ModeMechanismUse when
PreloadedListed in an agent's skills: frontmatter — in context from turn one.The agent needs the skill on nearly every task it runs.
InvokedAuto-loaded on demand when the task matches the skill's description: TRIGGER/SKIP.The skill is situational.

Decision rule: preload a skill when an agent needs it almost every task; otherwise leave it invoked and rely on a precise description:. Preloading is a context-budget decision (skills < 300 tokens each) — prefer invoked when in doubt. The full Command → Agent → Skill responsibility split lives in docs/orchestration-pattern.md.

Context: fork (delivery mode)

context: fork runs a skill in an isolated forked subagent so its large body and working notes never pollute the main thread's context. It is a third delivery mode alongside preloaded and invoked.

When to forkWhen NOT to fork
Skill is heavy (large reference catalog) AND one-shot (consulted once to produce an artifact, no interleaving with main reasoning).Skill is iterative — it must see the current main-thread code/decisions on every step (e.g. testing-strategy, pattern-recognition).

Pair context: fork with an agent: to pick the fork's sub-agent:

agent:LoadsUse for
Explorelighter (skips CLAUDE.md + git)read-only investigation; the fork produces advice only, writes nothing.
Planlighter (skips CLAUDE.md + git)planning passes.
general-purposeCLAUDE.md + historyreference skills that read context AND may need to write/apply guidance.

Reference skills that apply guidance (and may write) should use agent: general-purpose. Never fork an iterative skill — it would lose the live context it depends on. Reverting is trivial: delete the two lines.

Dynamic injection (!command)

A skill body may inject live shell output at load time. Claude Code executes a bang-prefixed command (the bang at line start or after whitespace) and inlines its stdout when the skill loads. Use this only for cheap, read-only, secret-free context.

The syntax is a bang immediately followed by a backtick-wrapped command. Shown here in a fenced block (NOT inline) so this doc itself does not execute anything on load:

Current branch: !`git branch --show-current 2>/dev/null || true`

Rules:

RuleDetail
Cheap onlyInstant commands (git branch, git worktree list). No network, no test runs, no find /. It runs on every skill load.
No secretsNEVER inject printenv, env dumps, tokens, or cat .env. Read-only git/status only.
Fail quietlyAppend `2>/dev/nulltrue` so a non-git directory load does not error.
PortableUse universally available commands (git). No project-specific binaries.
Doc examplesIn documentation, always wrap bang-command examples in fenced code blocks, never inline backticks — inline backticked bang-commands in docs can be wrongly executed by the parser.

The 500-Line Rule

A SKILL.md file MUST stay under 500 lines. Auto-injected skill context is bounded; an oversized skill is silently truncated and loses its tail content. If a skill approaches the limit, split it into two narrower skills with distinct TRIGGER/SKIP clauses rather than letting one file sprawl.


Quality Checklist

Before a new or edited skill ships:

  • Frontmatter block present and delimited by ---
  • name is kebab-case and equals the parent directory name
  • description follows the Description Contract and is under 340 chars
  • Body has ## Purpose, ## When to Apply, a methodology section, and ## Anti-Patterns
  • File is under 500 lines
  • Every neighbour skill that overlaps is named in a mutual SKIP clause
  • bash validators/validate-skill.sh skills/<name>/SKILL.md exits 0
  • tech-writer task queued to add the skill to README.md / CHANGELOG.md and bump plugin.json counts

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.