agents/skills/skill-creator/SKILL.md
Guides agent-skill creation and updates following Anthropic's SKILL.md best practices. Use when adding or editing skills under `agents/skills/`, writing SKILL.md frontmatter, references, or skill routing.
npx skillsauth add ryoppippi/dotfiles skill-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when creating or updating local skills under agents/skills/ in this dotfiles repo. They are deployed to ~/.agents/skills/ and ~/.config/claude/skills/ via nix/modules/home/agent-skills.nix (auto-enabled by skills.enableAll = [ "local" ]).
agents/skills/<skill-name>/SKILL.md with YAML frontmatter and concise Markdown.SKILL.md focused on workflow and navigation. Move detailed examples, APIs, or long checklists into references/*.md linked directly from SKILL.md.scripts/ for deterministic, repeated, or fragile operations — see the Scripts section below for when a script beats inline commands.git add agents/skills/<skill-name> && nix run .#switch. Avoid git add . so unrelated working-tree changes (especially nix/modules/home/programs/codex.nix, which can contain private repo names) are not picked up. agent-skills.nix enables every directory under local automatically — no allow-list edit needed.Required fields (see https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices):
---
name: skill-name
description: One or two sentences. What the skill does and when to use it.
---
Constraints:
name: max 64 chars, lowercase letters / numbers / hyphens only, no anthropic or claude.description: max 1024 chars, non-empty, third person, no XML tags. Include both what and when. Frontmatter is always loaded, so keep it tight — aim for ~20-35 words (~100-250 chars).Good:
description: Creates atomic Conventional Commits. Use when committing code changes, splitting hunks into revertable units, or writing detailed commit messages.
Bad:
# Vague
description: Helps with commits.
# First person
description: I can help you write commits.
# Way too long, no clear trigger
description: This skill is a comprehensive commit assistant that analyses changes and produces beautifully formatted commit messages following all the best practices...
Keep the body procedural and repo-specific:
Avoid explaining generic concepts the model already knows. Aim for under 500 lines; split larger content into references/.
Use !`command` inside fenced blocks to inject live state (current branch, tool version, detected test runner). Prefer dynamic blocks for environment info; keep static text for workflow steps and best practices.
Reference: https://code.claude.com/docs/en/skills#inject-dynamic-context
Keep SKILL.md itself under ~500 lines (Anthropic guidance) and ideally a tight, scannable workflow. Move conditional or long-form detail into references/*.md so it loads only when the agent follows the link.
agents/skills/example-skill/
├── SKILL.md
└── references/
├── api.md
└── examples.md
Split content out as soon as it stops being needed on every run of the skill. Concrete triggers:
tdd skill. The main SKILL.md keeps the universal cycle; each runner file is loaded only for that stack.references/examples.md.references/git-apply.md for patch-staging recovery: only read when the happy path fails.gh / git invocations belong in references/<topic>-commands.md, with the main file linking by purpose.Stop splitting when:
SKILL.md.references/<topic>.md. Give it an H1 and, if > 100 lines, a contents list at the top so partial reads (head -100) still surface the scope.When a patch fails or needs whitespace handling, read references/git-apply.md.SKILL.md. Keep links one level deep — agents may only preview nested references.references/<topic>.md over top-level <topic>-example.md; the dedicated folder makes the boundary obvious and is the convention used across this repo and the ccusage skills.Pre-written scripts under scripts/ are the right tool when an operation is deterministic and repeated. They are executed, not loaded — only the script's stdout enters the context, so a 300-line script costs the same as a 5-line one for the agent.
Use a script when:
Skip a script when the work is one or two ordinary shell commands or when each invocation needs different logic; just document the commands in SKILL.md.
Layout:
agents/skills/example-skill/
├── SKILL.md
├── references/
│ └── api.md
└── scripts/
├── validate.sh
└── analyse.py
Rules:
SKILL.md: write Run scripts/validate.sh (execute) vs See scripts/validate.sh for the algorithm (read as reference). Default to execute.chmod +x) and use a real shebang (#!/usr/bin/env bash / #!/usr/bin/env python3).Field 'foo' missing. Available: bar, baz.) so the agent can fix the input and retry.Skill metadata (name + description across all skills) is preloaded into the system prompt. If Codex or Claude reports descriptions were trimmed to fit the skills context budget, shorten descriptions first, then disable unused skills in agent-skills.nix.
development
Prevents and handles GitHub API rate limits during Nix commands. Use when running nix flake, nix run, nix build, nix shell, or comma against GitHub-backed inputs.
tools
Resolves missing CLI tools. Use when a command is unavailable, a shell reports command not found, or a tool must be run without installing it globally.
development
Guides t-wada Red-Green-Refactor TDD. Use when implementing features, fixing bugs, or refactoring logic with strict test-first development.
tools
Reviews React Server/Client Component boundaries against Next.js and React docs. Use when auditing `'use client'` placement or splitting components for proper RSC behaviour.