ai/skills/create-and-edit-skills/SKILL.md
Create, improve, or edit Claude Code skill files. Use when user asks to create a new skill, modify an existing skill, convert a command to a skill, turn a workflow into a skill, capture a conversation as a skill, or make a skill from a repeated pattern. Also triggers for "turn this into a skill", "save this as a skill", "make a skill from this", or "I keep doing this manually".
npx skillsauth add kurko/dotfiles create-and-edit-skillsInstall 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.
You are helping the user create, edit, or improve a Claude Code skill file. Follow this guide strictly to ensure skills are well-structured and effective.
Skills are markdown files that extend Claude's capabilities. They follow the Agent Skills open standard with Claude Code-specific extensions.
<skill-name>/
├── SKILL.md # Main instructions (REQUIRED)
├── template.md # Template for Claude to fill in (optional)
├── examples/ # Example outputs (optional)
│ └── sample.md
└── scripts/ # Executable scripts (optional)
└── validate.sh
Skill Locations (by scope):
| Location | Source Path | Symlinked To | Scope |
|----------|-------------|--------------|-------|
| Public | ~/.dotfiles/ai/skills/<skill-name>/ | ~/.claude/skills/<skill-name>/ and ~/.agents/skills/<skill-name>/ | All projects, shareable (Claude + Codex) |
| Private | $AI_PRIVATE_CONFIG_DIR/skills/<skill-name>/ | ~/.claude/skills/<skill-name>/ | All projects, not committed |
| Project (Claude) | .claude/skills/<skill-name>/ | N/A | Current project only |
| Project (Codex) | .agents/skills/<skill-name>/ | N/A | Current project only |
IMPORTANT: Personal skills (public/private) are created in source directories and symlinked to their destinations. Never create personal skills directly in ~/.claude/skills/ or ~/.agents/skills/.
Filename: Always use SKILL.md (uppercase). Claude accepts both cases; Codex requires uppercase.
Symlink Scripts:
update_dotfiles after creating/editing$AI_PRIVATE_CONFIG_DIR/install.sh after creating/editingCRITICAL: Every skill MUST have YAML frontmatter. This is not optional.
---
name: skill-name
description: What this skill does and when to use it
---
# Skill Title
[Instructions for Claude when this skill is active]
---
# REQUIRED fields
name: skill-name # Lowercase, hyphens only, max 64 chars. Becomes /skill-name
description: Clear description # What it does + when to use it. Claude uses this for auto-loading.
# OPTIONAL fields (spec standard)
allowed-tools: Read, Grep # Tools the agent can use without permission when skill active
# OPTIONAL fields (Claude Code only)
argument-hint: "[arg1] [arg2]" # Shown during autocomplete (e.g., "[issue-number]")
disable-model-invocation: false # true = manual only (/skill), Claude won't auto-invoke
user-invocable: true # false = hidden from / menu, background knowledge only
model: opus # Model override when skill is active
context: fork # "fork" = run in isolated subagent context
agent: Explore # Subagent type when context: fork (Explore, Plan, etc.)
---
| Use Case | Settings |
|----------|----------|
| General reference/knowledge | Default (both invocable) |
| Dangerous actions (deploy, delete) | disable-model-invocation: true |
| Background knowledge only | user-invocable: false |
| Read-only operations | allowed-tools: Read, Grep, Glob |
| Isolated research task | context: fork, agent: Explore |
Before writing anything, understand what the user actually needs. The best skills come from real workflows, not abstract ideas.
If the user says "turn this into a skill" or "capture this as a skill", mine the current conversation before asking questions:
This conversation archaeology often answers most questions before you need to ask them.
Use AskUserQuestion to clarify what the conversation doesn't reveal. Batch these into a single call when possible:
Skip questions the conversation already answered. Don't ask what you already know.
Spend a minute researching before creating. This prevents duplicate skills and surfaces tools the skill should leverage.
Glob ~/.claude/skills/ and .claude/skills/ for similar skills. You might find:
Look at what MCP servers and CLI tools are available. A skill that shells out to jq when there's an MCP tool for JSON processing is missing an opportunity. Run ToolSearch if the skill's domain suggests MCP tools might exist.
If the skill wraps a CLI tool, read its --help output. If it wraps an API, check for existing SDK usage in the codebase. Build on what's already there.
The description is the most important line in the skill. Claude uses it to decide when to auto-load, so an undertriggering description means the skill sits unused.
The "pushiness" principle: Claude errs on the side of NOT loading skills. Your description must actively reach out and claim trigger phrases. Think of it as advertising, not documentation.
Weak description (undertriggers):
description: Helps with code review
Claude sees "code review" and nothing else. If the user says "check my changes" or "review this PR", the skill won't load.
Strong description (catches natural language):
description: Review pull requests and uncommitted code changes. Use when user asks to review a PR, review changes, review uncommitted code, review a diff, or similar code review requests. Activates for phrases like "review this PR", "review my changes", "check this diff".
Tips for strong descriptions:
Reference Skills (add knowledge):
---
name: api-conventions
description: API design patterns for this codebase
---
When writing API endpoints:
- Use RESTful naming conventions
- Return consistent error formats
- Include request validation
Task Skills (step-by-step actions):
---
name: deploy
description: Deploy the application to production
disable-model-invocation: true
---
## Steps
1. Run the test suite
2. Build the application
3. Push to deployment target
## Error Handling
- If tests fail, abort deployment
- If build fails, show error and suggest fixes
For complete API details, see [reference.md](reference.md)
For usage examples, see [examples.md](examples.md)
Shell command injection (runs before skill loads):
## Current git status
!`git status --short`
## Recent commits
!`git log --oneline -5`
String substitutions:
$ARGUMENTS - All arguments passed when invoking${CLAUDE_SESSION_ID} - Current session IDInclude "ultrathink" anywhere in content to enable extended thinking mode for complex analysis.
Heavy-handed MUSTs without reasoning produce brittle skills. When Claude understands the reason behind an instruction, it can generalize to situations the skill author didn't anticipate.
Brittle (no reasoning):
MUST use snake_case for all file names.
Resilient (reasoning included):
Use snake_case for file names. The project's CI validates naming conventions
and kebab-case files will fail the lint step.
The second version lets Claude handle edge cases: "What about config files?" It knows the constraint comes from CI, so it can check whether config files go through the same lint.
Write instructions that handle the category of problem, not just the specific example you tested with. If your skill works for "deploy to staging" but breaks for "deploy to production", the instructions are too narrow.
Ask yourself: "If someone used this skill for a slightly different version of the same task, would it still work?"
Write instructions as direct commands: "Run the test suite", "Check for existing migrations", "Ask the user before deleting". This matches how Claude processes instructions most effectively.
Not everything belongs in SKILL.md. Layer information by how often it's needed:
| Layer | Size Limit | What Goes Here | |-------|-----------|----------------| | Frontmatter description | ~100 words | Trigger phrases, one-sentence purpose | | SKILL.md body | <500 lines | Core instructions, decision logic, workflows | | Bundled files (template.md, etc.) | Unlimited | Templates, examples, reference data |
If SKILL.md is getting long, extract reference material into supporting files. The body should contain decision-making logic and workflows, not encyclopedic reference data.
~/.dotfiles/ai/skills/<skill-name>/$AI_PRIVATE_CONFIG_DIR/skills/<skill-name>/.claude/skills/<skill-name>/# For public skills
update_dotfiles
# For private skills
"$AI_PRIVATE_CONFIG_DIR/install.sh"
/skill-name and verify behaviorWhen the user says "turn this into a skill" or "save this workflow as a skill":
Commands (.claude/commands/*.md) are the older format. To convert:
~/.dotfiles/ai/skills/<name>/$AI_PRIVATE_CONFIG_DIR/skills/<name>/mkdir -p <source-path>/<name>/mv .claude/commands/<name>.md <source-path>/<name>/SKILL.mdname: field (commands only had description:)# For public skills
update_dotfiles
# For private skills
"$AI_PRIVATE_CONFIG_DIR/install.sh"
~/.dotfiles/ai/skills/ or $AI_PRIVATE_CONFIG_DIR/skills/# For public skills
update_dotfiles
# For private skills
"$AI_PRIVATE_CONFIG_DIR/install.sh"
Before finalizing any skill, verify:
disable-model-invocation: true--- delimited frontmatter---
name: code-review
description: Review pull requests and uncommitted code changes. Use when user asks to review a PR, review changes, review uncommitted code, review a diff, or similar code review requests. Activates for phrases like "review this PR", "review my changes", "check this diff".
argument-hint: "[file-or-directory]"
allowed-tools: Read, Grep, Glob
---
# Code Review
Review the specified code for:
## Quality Checks
- Code organization and structure
- Naming conventions
- DRY principle adherence
- Error handling
## Security Checks
- Input validation
- SQL injection vulnerabilities
- XSS vulnerabilities
- Sensitive data exposure
## Output Format
Provide feedback as:
1. **Critical Issues** - Must fix before merge
2. **Suggestions** - Would improve the code
3. **Positive Notes** - What's done well
Be specific with line numbers and code examples.
data-ai
Merge the current worktree branch into main and sync main back. Use when the user says "merge to main", "ship it", "merge and continue", or after completing a task in a worktree and wanting to continue with the next one.
tools
Synchronize AI agent skills, commands, configs, permissions, hooks, and instructions across Claude Code, Codex CLI, and other Agent Skills-compatible tools. Use when the user asks to pull skills from Claude into Codex, sync Codex work back to Claude, migrate agent commands, reconcile frontmatter, update permissions, or keep agent setup files in parity.
testing
Write or update UI-independent use cases for QA. Use when the user says "write use cases", "add use cases", "QA use cases", "update use cases", "compose use cases", or when starting implementation of a new feature (after plan approval). Also activates for "what should we test", "regression cases", or "use cases for QA".
documentation
Skill on how to write a task. Use when user asks you to write a task (for Asana, Linear, Jira, Notion and equivalent). Also activates when user says "create task", "write task", or similar task creation workflow requests.