creating-skills
Skill647 starsChanged 59 days agoApache-2.0View on GitHub
Guide for creating Claude Code skills following Anthropic's
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
3
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
- Distinctive: line 119
Only create scripts when they add value: complex multi-step processing, repeated code generation, deterministic reliability.
- Very specific: line 146
Run a skill in isolated context with context: fork:
- Distinctive: line 174
ALWAYS: write descriptions that include WHAT + WHEN triggers + capabilities
- Very specific: line 175
ALWAYS: keep SKILL.md under 500 lines, split to references when approaching
- Distinctive: line 178
NEVER: create wrapper scripts for single commands
“Common” is measured: kept by at least 6 in 10 of the 27 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.
Files
Creating skills
Guide for creating Claude Code skills following Anthropic's official best practices.
Project skill layout
This project uses a unified skills/ directory at the repo root, symlinked into tool-specific config directories:
<project-root>/
├── skills/ # Canonical location for all skills
│ ├── code-review/
│ ├── creating-skills/
│ ├── dev/
│ └── git-commit/
├── .opencode/
│ └── skills -> ../skills # Symlink for OpenCode
└── .codewiz/
└── skills -> ../skills # Symlink for CodewizThis way a single set of skill definitions is shared across multiple AI coding tools.
Quick start
# 1. Create skill directory (in the project's unified skills/ dir)
mkdir -p skills/<skill-name>
# 2. Create SKILL.md with frontmatter
cat > skills/<skill-name>/SKILL.md << 'EOF'
---
name: <skill-name>
description: <what it does>. Use when <triggers>. <capabilities>.
---
# <Skill title>
<instructions>
EOF
# 3. Add optional resources as needed
mkdir -p skills/<skill-name>/{scripts,references,assets}
# 4. Ensure symlinks exist (one-time setup per tool)
# ln -s ../skills .opencode/skills
# ln -s ../skills .codewiz/skillsSKILL.md structure
Frontmatter (YAML between --- markers)
| Field | Required | Description |
name | No | Display name. Defaults to directory name. Lowercase, hyphens, max 64 chars. |
description | Recommended | What + when + capabilities. Max 1024 chars. Determines when Claude activates the skill. |
allowed-tools | No | Tools Claude can use without asking permission when skill is active. |
argument-hint | No | Autocomplete hint for arguments. Example: [issue-number] |
disable-model-invocation | No | true to prevent auto-invocation (manual /name only). |
user-invocable | No | false to hide from / menu (background knowledge only). |
model | No | Model override when skill is active. |
context | No | fork to run in isolated subagent context. |
agent | No | Subagent type when context: fork. Built-in: Explore, Plan, general-purpose. |
hooks | No | Lifecycle hooks scoped to this skill. |
Invocation control matrix
| Configuration | User can invoke | Claude can invoke |
| (defaults) | Yes | Yes |
disable-model-invocation: true | Yes | No |
user-invocable: false | No | Yes |
Description formula
<what it does>. Use when <triggers>. <capabilities>.Include action verbs ("create", "handle"), user intent ("wants to", "needs to"), and domain keywords users would say.
Directory structure
skill-name/
├── SKILL.md # Required: instructions (keep under 500 lines)
├── scripts/ # Optional: executable code (deterministic, token-efficient)
├── references/ # Optional: docs loaded into context on demand
└── assets/ # Optional: files used in output, NOT loaded into context
# (templates, images, fonts, boilerplate)Progressive disclosure (3-level loading)
- Metadata (name + description) - always in context (~100 tokens per skill)
- SKILL.md body - loaded when skill triggers (keep under 5k words)
- Bundled resources - loaded as needed by Claude
Reference supporting files from SKILL.md so Claude knows they exist. Keep references one level deep. For files over 100 lines, include a table of contents.
Scripts vs references vs assets
| Type | Purpose | Loaded into context? |
scripts/ | Deterministic operations, complex processing | No (executed via bash) |
references/ | Documentation Claude reads while working | Yes, on demand |
assets/ | Templates, images, fonts for output | No (copied/used in output) |
Only create scripts when they add value: complex multi-step processing, repeated code generation, deterministic reliability. Not for single-command wrappers.
Dynamic features
Context injection
Inject shell command output into skill content before loading:
## Recent commits
!`git log --oneline -5 2>/dev/null`The output replaces the directive when the skill loads.
String substitutions
Pass arguments to skills invoked via /skill-name arg1 arg2:
| Variable | Value |
$ARGUMENTS | Full argument string |
$ARGUMENTS[0], $ARGUMENTS[1] | Individual arguments |
$1, $2 | Shorthand for $ARGUMENTS[N] |
Subagent execution
Run a skill in isolated context with context: fork:
---
name: deep-research
description: Research a topic thoroughly.
context: fork
agent: Explore
---Degrees of freedom
Match specificity to the task's fragility:
| Level | When to use | Example |
| High (text instructions) | Multiple valid approaches, context-dependent | "Analyze the code and suggest improvements" |
| Medium (pseudocode/scripts with params) | Preferred pattern exists, some variation OK | Script with configurable parameters |
| Low (specific scripts, few params) | Fragile operations, consistency critical | Exact sequence of API calls |
Naming conventions
- Lowercase, hyphens between words, max 64 chars
- Styles: gerund (
processing-pdfs), noun phrase (github-pr-creation), prefixed group (github-pr-*)
Important rules
- ALWAYS write descriptions that include WHAT + WHEN triggers + capabilities
- ALWAYS keep SKILL.md under 500 lines, split to references when approaching
- ALWAYS reference bundled files from SKILL.md so Claude discovers them
- NEVER duplicate info between SKILL.md and reference files
- NEVER create wrapper scripts for single commands
- NEVER include extraneous files (README.md, CHANGELOG.md, INSTALLATION_GUIDE.md, QUICK_REFERENCE.md)
- NEVER explain things Claude already knows (standard libraries, common tools, basic patterns)
References
references/official_best_practices.md- Principles, anti-patterns, quality checklist, testingreferences/skill_examples.md- Concrete skill examples with new features
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- NangoHQ/nango★ 13ksame name
- microsoft/FluidFramework★ 5ksame name
- dotnet/fsharp★ 4.3ksame name
- AgentWorkforce/relay★ 1.1ksame name
- microsoft/vstest★ 977same name
- pr-pm/prpm★ 124same name
- jaktestowac/awesome-copilot-for-testers★ 118same name
- microsoft/upgrade-agent-plugins★ 44same name
- myths-labs/muse★ 37same name
- mjunaidca/mjs-agent-skills★ 27same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use building-chatgpt-apps, building-chat-interfaces 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.
mjunaidcaSkillbuilding-chatgpt-apps
Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).
Also in 4 projects that use this
mjunaidcaSkillbuilding-chat-interfaces
Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.
Also in 4 projects that use this
- +10 more from mjunaidca
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agentic-rolloutSkill
- code-reviewSkill
- create-training-scriptSkill
- debug-hangSkill
- relax-dev-debugSkill
- doc-writerSkill
- git-commitSkill
- model-integrationSkill
- nemo-gym-recipe-integrationSkill
- opd-tuningSkill
- perf-doctorSkill
- redaccel-to-relaxSkill
- relax-github-ciSkill
- relax-github-workflowSkill
- sglang-upgradeSkill
- ssh-ray-clusterSkill
- sync-githubSkill
- verl-to-relaxSkill
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
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.

