agentleFS
Archive228Archive228/lab-skills/skills/skill-authoring/SKILL.md

skill-authoring

Skill8 starsChanged 3 months agoMITView on GitHub

Author, review, and validate Agent Skills (SKILL.md folders) against the agentskills.io spec and Google's Agent Skills whitepaper: frontmatter constraints, naming, description-as-router, progressive disclosure, bundled scripts/references/assets, and evaluation gates. Use when creating a new skill, editing or reviewing an existing SKILL.md, converting a runbook or successful agent trace into a skill, or deciding whether content belongs in a skill vs AGENTS.md vs an MCP server.

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

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

  • 0

    Common

    Most of the 80 edited versions we read keep these.

  • 6

    Distinctive

    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:

    Do NOT use this skill for:

    line 21
  2. Very specific:

    Keep SKILL.md under 500 lines (spec).

    line 39
  3. Distinctive:

    Never evaluate or budget a skill in isolation: production agents co-load 5 to 15 skills simultaneously.

    line 40
  4. Distinctive:

    Write it to pass four checks (industry-standard target: 90% trigger accuracy): testable specificity (you can write 3 positive and 3 …

    line 48
  5. Very specific:

    Prefer gerund form: processing-pdfs, not pdf-processor.

    line 52
  6. Distinctive:

    Run the task yourself first.

    line 59
  7. Distinctive:

    Every line must earn its place.

    line 61
  8. Distinctive:

    Treat skills as code: version them, pin them, review them in PRs.

    line 77

“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

Authoring Agent Skills

This skill is the operating procedure for writing skills that comply with the Agent Skills specification (agentskills.io) and follow Google's Agent Skills whitepaper guidance on portable skill design. It covers the SKILL.md format, frontmatter constraints, naming, the description field as a routing mechanism, progressive disclosure, bundled resources, and the evaluation gates a skill must pass. The whitepaper's core discipline: a skill without a test is a hope, not a capability.

When to use

  • Creating a new skill folder from scratch, from a runbook/doc, or from a successful agent trace.
  • Reviewing, refactoring, or debugging an existing SKILL.md (wrong triggering, bloated body, vague description).
  • Deciding where content belongs: skill vs AGENTS.md vs MCP.

Do NOT use this skill for:

  • One-off task instructions — just do the task; a skill is for reusable workflows.
  • Project-wide conventions (stack, build commands) — those belong in AGENTS.md, which is always loaded; skills load on demand. Vercel's production analysis found a passive AGENTS.md index of project conventions hit a 100% pass rate vs a 53% baseline — global context belongs there, skills are for narrow, action-specific workflows.
  • Connecting the agent to an external system (Drive, Salesforce, an API) — that is an MCP server's job. Skills and MCP compose: the skill is know-how, MCP is reach. Do not reinvent MCP as scripts.

Rules

Structure (spec-normative)

  1. A skill is a directory containing, at minimum, a SKILL.md. Optional conventional directories: scripts/ (executable code), references/ (documentation loaded on demand), assets/ (templates, images, data files). Any additional files are allowed.
  2. SKILL.md = YAML frontmatter + Markdown body. Required frontmatter fields: name, description. Optional: license, compatibility (1-500 chars; only include if the skill has real environment requirements — most skills do not need it), metadata (string-to-string map; use reasonably unique key names), allowed-tools (space-separated string of pre-approved tools, e.g. Bash(git:*) Bash(jq:*) Read; experimental, support varies).
  3. name: 1-64 characters; only lowercase a-z, 0-9, and hyphens; must not start or end with a hyphen; no consecutive hyphens (--); must match the parent directory name. PDF-Processing, -pdf, pdf--processing are all invalid.
  4. description: 1-1024 characters, non-empty. Must describe both what the skill does AND when to use it, with specific keywords agents can match against tasks.
  5. Validate before shipping: skills-ref validate ./my-skill (reference library at github.com/agentskills/agentskills, skills-ref) checks frontmatter validity and naming conventions.

Progressive disclosure (the token budget)

  1. Design for three loading levels: (1) metadata — name + description, ~100 tokens, loaded at startup for ALL skills; (2) instructions — full SKILL.md body, loaded only on activation, keep under 5,000 tokens (spec recommendation); (3) resources — files in scripts/, references/, assets/, loaded only when required. Scripts execute without their code entering the token window.
  2. Keep SKILL.md under 500 lines (spec). Whitepaper rule of thumb: if the SKILL.md is getting long, the next paragraph belongs in references/, not the body. Bodies over 5,000 words are a skill smell — probably two skills, or reference material.
  3. Never evaluate or budget a skill in isolation: production agents co-load 5 to 15 skills simultaneously. A body that exceeds 5,000 tokens may work alone but causes context rot when co-loaded.
  4. Reference other files with relative paths from the skill root, kept one level deep from SKILL.md. Avoid deeply nested reference chains. Keep individual reference files focused — smaller files mean less context per on-demand load.

The description field (the routing algorithm)

  1. Spend disproportionate time here: the description is the ONLY thing the model sees when deciding whether to load the skill. A vague description means an unused skill.
  2. Front-load trigger keywords ("Generate a commit message…", not "This skill helps with…"). State what it does, when to use it, and when NOT to use it — the anti-trigger clause prevents over-triggering. Be pushy in wording if the model under-triggers.
  3. Size: ≤1024 chars in YAML (spec hard limit); the whitepaper's practical guidance is that most authors aim for roughly 50 words.
  4. Write it to pass four checks (industry-standard target: 90% trigger accuracy): testable specificity (you can write 3 positive and 3 negative triggers), clarity (ambiguous queries don't overlap adjacent skills), execution fidelity (describes actual performance, not aspirational behavior), rephrasing stability (routes consistently across phrasings).

Naming

  1. Prefer gerund form: processing-pdfs, not pdf-processor; managing-databases. Avoid generic names (helper, utils, tools, data), vendor prefixes (claude-*, gemini-*, anthropic-*), and internal jargon outsiders won't recognize.
  2. Note a source conflict: the whitepaper suggests snake_case directories with kebab-case skill names; the spec requires name to match the parent directory name and allows only lowercase alphanumerics and hyphens. For spec compliance, use kebab-case for both and keep them identical.

Body content

  1. The spec places no format restrictions on the body; recommended sections: step-by-step instructions, examples of inputs and outputs, common edge cases. The whitepaper's template adds: When to use, When NOT to use, Workflow, Examples, Output format, Anti-patterns to avoid.
  2. One skill, one job. If you cannot describe the skill in one sentence, it is two skills — decompose before writing. If the description needs "and" between unrelated capabilities, split it.
  3. Run the task yourself first. Real failure produces signal; speculation produces noise.
  4. Give the reason, not just the rule. Models generalize to edge cases when they understand why an instruction exists. If you are typing "ALWAYS" or "NEVER" in caps, stop and explain the rationale instead — models learn to ignore capitalized imperatives (the whitepaper calls this accumulating Context Debt).
  5. Every line must earn its place. Keep gotchas, exact commands, business logic, anti-patterns. Cut boilerplate the model already knows ("always validate output").
  6. Make instructions verifiable: if the agent can't tell whether it followed a rule, the rule is too vague.

Bundled resources

  1. Bundle what repeats: deterministic work (parsing, math, formatting) belongs in scripts/, not in prose instructions — "Shift Intelligence Left" by pushing logic into standard, testable scripts. Replace negative LLM instructions with deterministic constraints that make invalid actions impossible.
  2. Scripts must be self-contained or clearly document dependencies, include helpful error messages, and handle edge cases gracefully.
  3. Knowledge only relevant once the skill is running (domain principles, definitions, edge-case handling) goes in references/; templates and schemas go in assets/.

Evaluation and portability

  1. Practice Evaluation-Driven Development: write three JSON evaluation cases (Input, Expected Tools, Expected Output) BEFORE drafting the SKILL.md body. This forces a functional spec upfront and surfaces description ambiguities early.
  2. Test both directions: prompt where the skill SHOULD trigger and confirm it fires; prompt where it should NOT and confirm it stays quiet. Poorly designed skills actively subtract capability — SkillsBench (2025) found 19% of 84 real-world tasks performed worse with a skill than without; Vercel measured a 56% non-invocation rate for skills expected to fire.
  3. Gate skills through authority tiers: Read-Only (LLM-as-Judge eval; 90% trigger accuracy) → Draft-Only (golden dataset of 20+ cases; human approval) → Action-Allowed (full adversarial red-teaming; sustained pass^k across runs; human sign-off).
  4. Agent-drafted skills (meta-skill output) enter the library at the draft tier regardless of confidence, and a human reviews the diff. An un-reviewed agent-drafted skill is often worse than no skill at all. Don't start with meta-skills; get the manual authoring loop working first.
  5. Keep skills portable: do not tie a skill to one runtime, hard-code paths, or embed secrets. The format is shared across tools but install paths, activation rules, and per-tool details (allowed-tools whitelisting, security gates) are not — check the target tool's docs; a shared .agents/skills/ project-root convention is emerging.
  6. Treat skills as code: version them, pin them, review them in PRs. Domain experts own domain skills.

Checklist

Copy-paste before shipping any skill:

  • name: 1-64 chars, lowercase a-z/0-9/hyphens only, no leading/trailing/consecutive hyphens, matches directory name
  • description: 1-1024 chars; states what it does + when to use + when NOT to use; trigger keywords front-loaded
  • 3 positive and 3 negative trigger phrases written and tested; target 90% trigger accuracy
  • Three JSON eval cases (Input, Expected Tools, Expected Output) written before the body was drafted
  • SKILL.md body under 500 lines / under 5,000 tokens; overflow moved to references/
  • Deterministic, repeated work bundled in scripts/ (self-contained, helpful errors); templates in assets/
  • File references are relative paths, one level deep from SKILL.md
  • Frontmatter validates: skills-ref validate ./my-skill
  • Eval coverage — all four satisfied, else the skill stays at draft tier: Trigger (positive AND negative cases), Execution (correct outputs across representative inputs), Regression (zero drops in the existing library suite), Token budget (co-loaded with 5-15 skills without degrading unrelated turns)
  • Deployment: scripts have unit tests passing in CI; eval suite passes in CI with min-pass threshold; security scan clean (no secrets, no untrusted deps); description reviewed by someone other than the author; cross-tool install paths tested if shipping publicly

Anti-patterns

  • Vague descriptions like "Helps with PDFs" or "a helpful skill for…" — rewrite to name the trigger, the inputs, and the output.
  • SKILL.md bodies over 5,000 words — split the skill or move detail to references/.
  • Hard-coded paths or secrets.
  • "Always do X" global rules inside a skill — those belong in AGENTS.md.
  • Installing untrusted third-party libraries or skills without scanning; unpinned skill dependencies.
  • Reinventing MCP as scripts.
  • Skill smells (revise on sight): two domain teams could plausibly own it; you can't write three test cases for it; it references no other resource (probably a long instruction that belongs in the system prompt); you keep adding "edge cases" sections (each edge case probably wants its own skill).
  • Bulk-generating a library: the whitepaper warns that pointing an agent at an empty folder and asking it to fill it with skills is the fastest way to a bad library — build one workflow at a time.
  • Over-engineering SKILL.md for one specific model — ruins portability; audit triggers across multiple model families instead.

Source

Distilled from the official document(s) above on 2026-08-12. If this skill and the source disagree, trust the source.

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.