Skip to content
Back to skills

Create A Skill

ASecurity

Step-by-step tutorial for creating Claude Code skills. Use when creating a new skill, building a SKILL.md file, designing a skill folder structure, or learning how to write effective skill descriptions and frontmatter.

  • 2 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added October 22, 2026
developmenttypescriptpythonbashreactnextjstestinggitapifrontendbackend

Works with

  • claude code
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned October 22, 2026

npx -y skills add nguyenthanhtat/screen1-claude --skill create-a-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create A Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create A Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nguyenthanhtat-create-a-skill/badge)](https://www.skillsdirectory.com/skills/nguyenthanhtat-create-a-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-a-skill
description: Step-by-step tutorial for creating Claude Code skills. Use when creating a new skill, building a SKILL.md file, designing a skill folder structure, or learning how to write effective skill descriptions and frontmatter.
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
---

# Create-A-Skill Tutorial

A guided workflow for building any Claude Code skill from scratch — covering planning, structure, writing, and packaging.

## When This Skill Applies

- "I want to create a skill for X"
- "Help me build a skill for our team's Y workflow"
- "Create a new skill that handles Z"
- "How do I write a SKILL.md?"
- "What should my skill folder look like?"

---

## Step 1 — Understand What the Skill Does

Before writing any files, answer these 3 questions:

1. **What domain / task does this skill cover?**
   - Be specific. Not "frontend" but "React hooks and state management"
   - Not "docs" but "team API documentation lookup"

2. **What would a user say to trigger it?**
   - List 3–5 concrete trigger phrases
   - Example: "Build a React component", "optimize my hook", "add state management"

3. **What reusable resources would help Claude every time?**
   - Scripts that get rewritten repeatedly → `scripts/`
   - Documentation Claude needs to reference → `references/`
   - Templates / assets used in output → `assets/`

See [references/structure-patterns.md](references/structure-patterns.md) for help choosing what to include.

---

## Step 2 — Choose a Structure Pattern

Three patterns cover most skills:

### Pattern A — Simple (single domain)
```
my-skill/
├── SKILL.md
├── references/
│   └── topic.md
└── examples/
    └── example.md
```
Use for: focused single-topic skills (testing, TypeScript, git workflows)

### Pattern B — Complex (multi-domain routing hub)
```
my-skill/
├── SKILL.md              ← routing only
├── references/
│   ├── topic-a.md
│   ├── topic-b.md
│   └── topic-c.md
└── scripts/
    └── helper.py
```
Use for: broad domains needing sub-topic routing (Next.js fullstack, senior-backend)

### Pattern C — Reference + Automation
```
my-skill/
├── SKILL.md
├── references/           ← documentation
├── scripts/              ← executable tools
└── assets/               ← templates / files for output
```
Use for: skills that produce artifacts or run code (skill-creator, pdf-editor, code-formatter)

---

## Step 3 — Create the Folder

```bash
# Global skill (available everywhere)
mkdir -p ~/.claude/skills/<skill-name>/references
mkdir -p ~/.claude/skills/<skill-name>/assets
mkdir -p ~/.claude/skills/<skill-name>/scripts

# Project skill (only in this repo)
mkdir -p .claude/skills/<skill-name>/references
```

Or use the init script if available:
```bash
python .claude/skills/skill-creator/scripts/init_skill.py <skill-name> --path ~/.claude/skills/
```

Copy the template to start:
```bash
cp .claude/skills/create-a-skill/assets/SKILL-template.md ~/.claude/skills/<skill-name>/SKILL.md
```

---

## Step 4 — Write SKILL.md

The `description` field is the most critical part — it controls when Claude auto-triggers the skill.

**Frontmatter rules:**
```yaml
---
name: skill-name-in-kebab-case
description: "Specific action + domain. Use when [concrete trigger scenarios]."
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
---
```

**Body rules:**
- Keep under 500 lines
- Overview in 2–3 sentences
- List trigger scenarios
- Core principles (numbered, concise)
- Link to `references/` — never inline everything
- Quick example if helpful

See [references/frontmatter-guide.md](references/frontmatter-guide.md) for description writing rules and examples.

---

## Step 5 — Add Supporting Files

### references/ files
- One topic per file (e.g., `references/hooks-patterns.md`, not `references/everything.md`)
- Load only when Claude needs them — keep them detailed
- If file > 10k words, add grep search hints in SKILL.md

### scripts/ files
- Include when the same code gets rewritten every session
- Claude can execute without reading into context (token efficient)

### assets/ files
- Templates, boilerplate, icons used in final output
- Not loaded into context, just copied/referenced

---

## Step 6 — Test the Skill

```bash
# Open Claude Code in the skill's directory
claude

# Try natural trigger phrases:
"I want to build a React component for user profiles"
"Help me write tests for this API"

# Verify:
# ✓ Claude announces using the skill
# ✓ Skill guidance appears in response
# ✓ Supporting files load when relevant
```

---

## Step 7 — Package (optional, for sharing)

```bash
python .claude/skills/skill-creator/scripts/package_skill.py .claude/skills/<skill-name>/
```

This validates structure and creates a distributable `.zip`.

---

## Quick Reference

| File/Folder | Purpose | Size limit |
|-------------|---------|------------|
| `SKILL.md` | Entry point, routing, core guidance | < 500 lines |
| `references/*.md` | Detailed domain knowledge | < 2000 lines each |
| `scripts/*.py` | Reusable executable code | No limit |
| `assets/` | Output templates & files | No limit |

See [references/checklist.md](references/checklist.md) for the full creation checklist.

Files in this skill

  • SKILL.md5.2 KB
  • assets/SKILL-template.md1.1 KB
  • references/checklist.md3.4 KB
  • references/frontmatter-guide.md3.7 KB
  • references/structure-patterns.md4.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.