agentleFS
stackhawkstackhawk/agent-skills/.claude/skills/skill-authoring/SKILL.md

skill-authoring

Skill16 starsChanged 16 days agoMITView on GitHub

Guides authoring and maintaining agent skills in this repository — enforcing Anthropic best practices, release-version rules, regenerating Cursor rules, and keeping the plugin structure consistent. Use when editing SKILL.md files, reference files, or plugin manifests; creating a new plugin; or reviewing a skill for compliance with authoring standards. Do NOT trigger for general coding tasks, security scanning, or platform API queries.

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, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 80 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every SKILL.md must open with a YAML frontmatter block:

    line 39
  2. Distinctive:

    Use the progressive disclosure pattern to stay within this limit:

    line 60
  3. Very specific:

    Keep decision logic, commands, and critical rules in SKILL.md

    line 61
  4. Very specific:

    When a reference file needs to point the reader elsewhere, write "See Step X in SKILL.md" rather than linking to another reference file

    line 89
  5. Distinctive:

    Follow these steps in order.

    line 139
  6. Very specific:

    After any edit to SKILL.md or references/*.md:

    line 203

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

This skill documents the rules for creating and maintaining agent skills in the stackhawk/agent-skills repository.


Authoring Rules (Quick Reference)

These are the non-negotiable rules. CI validates them on every PR.

RuleRequirement
SKILL.md lengthBody ≤ 500 lines (excluding frontmatter)
Frontmattername:, version:, description: all required
DescriptionThird person; max 1024 characters
Reference filesAll linked from SKILL.md; must not link to each other
Reference ToCRequired when file > 100 lines
Progressive disclosureSummary + link in SKILL.md; detail in references/

SKILL.md Rules

Frontmatter

Every SKILL.md must open with a YAML frontmatter block:

---
name: <skill-name>          # matches the plugin directory name and symlink folder name
version: <semver>           # the in-tree placeholder (0.0.0-dev); the release stamps the real number
description: >              # third person; max 1024 characters; describes when to trigger
  ...
---

Description writing rules:

  • Third person ("Guides authoring...", not "I help you author...")
  • Opens with what the skill does (verb phrase)
  • Includes "Use when" trigger conditions
  • Includes "Do NOT trigger for" exclusions
  • Max 1024 characters — CI rejects longer descriptions

Body length

The SKILL.md body (everything after frontmatter) must stay at or under 500 lines. Use the progressive disclosure pattern to stay within this limit:

  • Keep decision logic, commands, and critical rules in SKILL.md
  • Move deep detail to references/*.md files and link them from SKILL.md
  • Link format: → [references/filename.md](references/filename.md)

What belongs in SKILL.md

  • Trigger/skip conditions (when to run, when to stop)
  • Step-by-step orchestration logic the agent follows
  • Decision tables and critical rules
  • Commands the agent runs directly
  • Links to reference files (one line per link)

What belongs in references/

  • Full command references with all flags
  • Pattern tables too large for SKILL.md
  • Deep technical detail referenced only in specific situations
  • Content > ~30 lines that supports one topic

Reference File Rules

Linking (critical — enforced by best practices)

  • All reference files must be linked from SKILL.md directly
  • Reference files must NOT link to other reference files
  • One level deep only: SKILL.md → reference files; references do not link to references
  • When a reference file needs to point the reader elsewhere, write "See Step X in SKILL.md" rather than linking to another reference file

Table of Contents

Reference files longer than 100 lines must include a ## Contents ToC with anchor links immediately before the first ## section. Format:

## Contents
- [Section Name](#section-name)
- [Another Section](#another-section)

---

## Section Name

Shorter files may omit the ToC.

Examples vs. placeholders (avoid literal-match traps)

Agents copy runnable code blocks verbatim far more readily than they adapt them. A concrete app-specific value baked into a command is therefore a trap: the agent runs it literally against a different codebase and silently does the wrong thing (curls a route that doesn't exist, greps a directory that isn't there).

The rule that prevents this:

  • Runnable code blocks use <placeholder>s that fail loudly if pasted as-is. Prefer curl "$HOST<spec-path>" over curl "$HOST/authors" — a literal paste of the placeholder form breaks visibly, while a literal paste of /authors hits the wrong route silently. Put the concrete value in an adjacent comment as a clearly-labeled e.g.
  • Concrete examples live in prose or comments, marked e.g. There they aid comprehension without being executable, so literal-matching them is harmless.
  • Literal values are fine only when they are genuinely universal — e.g. probing the real, fixed served-spec paths (/openapi.json, /v3/api-docs) is correct precisely because those are the same across every app of that framework. If a value changes per codebase, it is a placeholder, not a literal.
  • Command tables (grep/derivation recipes) are illustrative starting points. Say so once near the table, and point them at the repo's real source root and filenames rather than a literal src/ or openapi.yaml.

The test: "if an agent runs this exact text against a completely different repo, does it fail loudly or mislead silently?" Silent-mislead means parameterize it.


Creating a New Plugin

Follow these steps in order. All are required.

1. Create directory structure:

plugins/<name>/
  skills/<name>/
    SKILL.md
    references/        # create if needed
  .claude-plugin/
    plugin.json
  .codex-plugin/
    plugin.json

2. Write SKILL.md following the rules above. Set the version field to the in-tree placeholder (0.0.0-dev, see .version-bump.json).

3. Create manifests — copy an existing plugin's plugin.json as a template:

# .claude-plugin/plugin.json and .codex-plugin/plugin.json
# Set name, description, keywords. Neither manifest carries a version field: the release
# stamps the Codex one (stamp_only in .version-bump.json); the Claude one stays unversioned

4. Create symlinks for platform discovery (use relative paths):

cd skills/ && ln -s ../plugins/<name>/skills/<name> <name>
cd .opencode/skills/ && ln -s ../../plugins/<name>/skills/<name> <name>
cd .cursor/skills/ && ln -s ../../plugins/<name>/skills/<name> <name>

5. Add Cursor mapping in scripts/generate-cursor-rules.sh MAPPINGS array:

"<name>/skills/<name>/SKILL.md|stackhawk-<name>|<cursor description>|<globs>|<alwaysApply>"

6. Add to .version-bump.json — add the Codex manifest (stamp_only) and the SKILL.md under files, and the Claude manifest under unversioned:

{ "path": "plugins/<name>/.codex-plugin/plugin.json", "field": "version", "type": "json", "stamp_only": true },
{ "path": "plugins/<name>/skills/<name>/SKILL.md", "field": "version", "type": "yaml-frontmatter" }

7. Check the placeholder (a new skill is a minor release: put a Release: minor line in the PR description; never bump a version in the PR):

bash scripts/bump-version.sh --placeholder && bash scripts/check-version.sh

8. Regenerate Cursor rules:

bash scripts/generate-cursor-rules.sh

9. Verify idempotency:

bash scripts/generate-cursor-rules.sh && git diff cursor/
# → no diff means rules are in sync

Updating an Existing Skill

After any edit to SKILL.md or references/*.md:

  1. Verify line count (SKILL.md body ≤ 500 lines):
    wc -l plugins/<name>/skills/<name>/SKILL.md
  2. Verify reference linking — no reference file links to another reference file:
    grep -rn "\](.*\.md)" plugins/<name>/skills/<name>/references/
    # Any hit means a reference file is linking to another file — remove it
  3. Regenerate Cursor rules:
    bash scripts/generate-cursor-rules.sh && git diff cursor/
  4. Choose the release size — do not bump anything. A merge releases the next patch number from the latest release tag. For new capabilities put a Release: minor line in the PR description (Release: major for breaking changes).

Version Bump Rules

Change typePR description
Bug fix, content correction, typonothing (patch is the default)
New skill, new reference file, new capabilitya Release: minor line
Breaking change (removed step, changed trigger conditions)a Release: major line

Release tags are the source of truth for the version. The tree carries a placeholder (0.0.0-dev) in every SKILL.md and in gemini-extension.json, which requires one; every other manifest carries no version (stamp_only files get one when stamped, unversioned files never do); the release job stamps the number with bump-version.sh to validate it and the marketplace sync stamps it into the snapshot. Never edit version numbers manually in individual files.


CI Validation

generate-and-validate.yml runs on every PR and checks:

  • Version placeholder consistency across all manifests (scripts/check-version.sh)
  • Cursor rules are up to date (no diff after running generate-cursor-rules.sh)
  • SKILL.md frontmatter has name:, version:, description:

The PR will be blocked if any check fails. Fix by running:

bash scripts/bump-version.sh --placeholder
bash scripts/generate-cursor-rules.sh
git add plugins/ cursor/ scripts/ && git commit --amend --no-edit

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.