.claude/skills/skill-writing/SKILL.md
Create cross-agent compatible skills with SKILL.md format, supporting files, and scripts for Claude Code, Copilot, Cursor, Windsurf, and other AI coding assistants
npx skillsauth add svetzal/hopper skill-writingInstall 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.
Create skills that work across multiple AI coding agents. Skills are reusable modules that package instructions, scripts, and resources to extend AI capabilities.
Skills are directories containing a SKILL.md file plus optional supporting resources:
my-skill/
├── SKILL.md # Required: frontmatter + instructions
├── scripts/ # Optional: deterministic code
│ └── validate.sh
├── references/ # Optional: detailed documentation
│ └── api-details.md
└── examples/ # Optional: templates, samples
└── output-format.md
Skills can be placed at project level (shared with team) or user level (personal):
| Agent | Project Path | User Path |
|-------|-------------|-----------|
| Claude Code | .claude/skills/ | ~/.claude/skills/ |
| GitHub Copilot | .github/skills/ | ~/.copilot/skills/ |
| Cursor | .cursor/skills/ | ~/.cursor/skills/ |
| Windsurf | .windsurf/skills/ | ~/.codeium/windsurf/skills/ |
| Gemini CLI | .gemini/skills/ | ~/.gemini/skills/ |
For portability: Create the skill once, copy the folder to each agent's skills directory.
Every skill starts with YAML frontmatter followed by markdown instructions:
---
name: my-skill
description: Brief explanation of what this skill does and when to use it
---
# Skill Title
Instructions, workflows, and examples go here.
| Field | Rules | Purpose |
|-------|-------|---------|
| name | Lowercase, hyphens, numbers only. Max 64 chars. | Skill identifier and slash-command name |
| description | What it does and when to use it. Max 200 chars. | Critical: Agent uses this to decide if skill matches user request |
The description determines when your skill activates. Include:
Good: "Explains code with visual diagrams and analogies; use when user asks 'how does this code work?'"
Bad: "Code explanation tool" (too generic, won't trigger reliably)
These fields work on specific platforms (unsupported agents ignore them):
---
name: my-skill
description: Does X when user asks Y
# Claude Code specific:
disable-model-invocation: true # Only activate via /my-skill command
allowed-tools: Read, Grep, Glob # Restrict available tools
context: fork # Run in sandboxed sub-agent
# General:
dependencies: python>=3.8, jq # Required tools/versions
---
The markdown body provides the AI with guidance. Write as if directing the AI:
Structure with clear steps:
## Workflow
1. First, check if the file exists using `ls`
2. Read the configuration from `config.yaml`
3. Validate the format matches the schema in `references/schema.md`
4. Run the validation script: `./scripts/validate.sh`
5. Report any errors with specific line numbers
Keep under 500 lines. Move extensive documentation to references/ and mention it:
"For full API details, see references/api-details.md"
The agent will load supporting files only when needed, preserving context tokens.
LLMs are stochastic. Scripts are deterministic.
Use scripts when you need reliable, repeatable results for:
Example: A PDF parsing skill should include a Python script that actually extracts form fields, rather than having the AI attempt to parse binary data.
In SKILL.md, direct the agent when to use scripts:
## Validation
Run the validation script to check format:
```bash
./scripts/validate.sh input.json
The script returns exit code 0 if valid, 1 if errors found.
## Progressive Disclosure
Skills load in stages to preserve context:
1. **Startup:** Agent sees only name + description (~100 tokens each skill)
2. **Activation:** When request matches description, full SKILL.md loads
3. **Resources:** Supporting files load only when explicitly referenced
Design skills to take advantage of this:
- Put essential instructions in SKILL.md
- Put detailed references, examples, and edge cases in supporting files
- Explicitly mention supporting files so the agent knows they exist
## Creating a New Skill
```bash
# 1. Create skill directory
mkdir -p .claude/skills/my-skill
# 2. Create SKILL.md
cat > .claude/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: Does X when user asks for Y
---
# My Skill
## Quick Reference
| Action | Command |
|--------|---------|
| Do X | `command-x` |
## Workflow
1. First step
2. Second step
3. Verify with `./scripts/check.sh`
EOF
# 3. Test by asking the agent to perform a matching task
If skill doesn't trigger, refine the description with better keywords.
Skills can include executable scripts. Only use skills from trusted sources.
Before using third-party skills:
scripts/ directoryWhen creating skills:
Before considering a skill complete:
name field matches directory name exactlyname is lowercase with hyphens onlydescription under 200 chars with trigger keywords---
name: api-testing
description: Run API endpoint tests and generate coverage reports; use when user asks to test or verify API endpoints
---
# API Testing
## Quick Reference
| Action | Command |
|--------|---------|
| Run all tests | `./scripts/run-tests.sh` |
| Test single endpoint | `./scripts/run-tests.sh /api/users` |
| Generate report | `./scripts/run-tests.sh --report` |
## Workflow
1. Identify endpoints to test from route definitions
2. Run test suite: `./scripts/run-tests.sh`
3. Review failures in output
4. For detailed test format, see [references/test-format.md](references/test-format.md)
## Writing New Tests
Tests follow the format in [examples/sample-test.json](examples/sample-test.json).
Required fields:
- `endpoint`: API path to test
- `method`: HTTP method
- `expected_status`: Response code to verify
testing
Dispatch concrete, ready-to-execute work to background Hopper workers via the hopper queue. Use this skill when the user wants to queue up substantive coding tasks for unattended processing in specific projects on their machine — not for planning, to-do tracking, or lightweight tasks.
tools
Use Epilogue Tracker (et) for user-centric product planning with the Screenplay Pattern. Use this skill whenever the user mentions actors, goals, interactions, journeys, the Screenplay Pattern, product planning, work breakdown, who benefits from work, product charter, or any et CLI commands. Also use when the user asks about structuring work around user needs rather than tasks.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.