mdskills
← Docs

SKILL.md Examples

Four patterns that show up in well-written skills, with annotated walkthroughs of each. Steal these structures — they work.

1. A minimal skill that works

The simplest useful skill you can write.

Sometimes all you need is 15 lines. This teaches an agent your team's commit message format. No scripts, no reference files, just clear instructions.

---
name: commit-message
description: Generates conventional commit messages
following our team format. Use when committing
code or the user asks to create a commit.
---
 
# Commit Message Format
 
Use conventional commits with these types:
- feat: new feature visible to users
- fix: bug fix
- refactor: code change that doesn't fix or add
- docs: documentation only
- test: adding or updating tests
 
Format: type(scope): lowercase summary under 72 chars
 
Include a body for non-obvious changes. Reference
issue numbers when applicable: "Closes #123"
1

Description names the trigger ("when committing code"). This is how the agent knows to activate it.

2

The instructions are short and specific. The agent already knows how to write commits — it just needs your format.

3

No explanation of what a commit message is. The agent knows. Only adds what’s unique to your team.

2. A skill with progressive disclosure

Main file stays lean. Details live in reference files loaded on demand.

This pattern keeps the initial context cost low. The agent reads the overview on activation, then dips into reference files only when it actually needs the details.

---
name: api-integration
description: Implements API integrations following
our patterns. Use when the user asks to connect
to a third-party API, add a new endpoint, or
integrate an external service.
---
 
# API Integration Guide
 
## Workflow
1. Check if a client already exists in src/clients/
2. If not, create one following the template below
3. Add error handling and retry logic
4. Write integration tests
5. Update the API docs in docs/apis.md
 
## Resources
- For client template: see reference/client-template.ts
- For auth patterns: see reference/auth-patterns.md
- For error codes: see reference/error-codes.md
1

The main SKILL.md is a routing document. It gives the agent the workflow and tells it where to find details.

2

Reference files aren’t loaded until the agent actually needs them — zero context cost until accessed.

3

Numbered workflow steps. Agents follow sequential instructions far more reliably than freeform paragraphs.

3. A skill with input/output examples

Few-shot patterns work in skills too.

Showing the agent what you expect is often clearer than explaining it. This pattern is especially useful when the output format matters.

---
name: release-notes
description: Generates release notes from git history.
Use when the user asks to write release notes,
create a changelog entry, or summarize a release.
---
 
# Release Notes Generator
 
## Steps
1. Run `git log --oneline` for the release range
2. Group commits by type (features, fixes, etc.)
3. Write user-facing summaries (not commit messages)
 
## Example
 
**Input** (git log):
abc123 feat: add dark mode toggle
def456 fix: correct date parsing in reports
ghi789 feat: export to CSV
 
**Output**:
## v2.4.0
### New
- Dark mode is now available in Settings > Appearance
- Export any report to CSV from the download menu
### Fixed
- Dates in reports now display correctly across timezones
1

The example shows the transformation clearly: raw git log in, polished user-facing notes out.

2

Notice the output uses plain language ("Dark mode is now available"), not developer jargon ("feat: add dark mode toggle").

3

One example is often enough. Two is better if the format is complex. More than three is usually overkill.

4. A skill with a feedback loop

Validate, fix, repeat.

The most common quality improvement is adding a validation step. Without explicit instructions to loop, agents tend to validate once and move on regardless of the result.

---
name: schema-migration
description: Creates database schema migrations.
Use when the user needs to modify database tables,
add columns, create indexes, or change schema.
disable-model-invocation: true
---
 
# Schema Migration
 
## Steps
1. Generate the migration file:
`npx prisma migrate dev --name $ARGUMENTS`
2. Review the generated SQL
3. Run validation:
`npx prisma validate`
4. If validation fails, fix the schema and
**return to step 3**
5. Only proceed when validation passes
6. Run `npx prisma generate` to update the client
7. Run existing tests to check for regressions
 
## Important
Never modify migration files after they've been
applied. Create a new migration instead.
1

disable-model-invocation: true — you don’t want the agent auto-triggering database migrations. Manual invoke only.

2

Steps 3-4 create an explicit loop. "Return to step 3" is the key instruction most skill authors forget.

3

$ARGUMENTS gets replaced with whatever follows the slash command: /schema-migration add-user-roles

What these all have in common

  • Specific descriptions with triggers. Every description says what the skill does and when to use it.
  • No unnecessary context. None of them explain concepts the agent already knows.
  • Numbered steps. Sequential instructions, not freeform paragraphs.
  • Under 30 lines. You can read each one in 15 seconds. That’s the point.

Find more examples

Browse real skills on mdskills.ai to see how the community structures them. The top-installed skills are a good starting point — they’ve been tested by thousands of developers.