Skip to content
tzurot-skills-guide logo

Writing Claude Code Skills - Best Practices

tzurot-skills-guide

Meta-skill for writing and maintaining Claude Code skills. Use when creating new skills, updating existing skills, or reviewing skill quality. Enforces progressive disclosure and size limits.

SKILL.md

Full skill instructions

Writing Claude Code Skills - Best Practices

Use this skill when: Creating a new skill, updating an existing skill, or reviewing skill quality.

Core Principle: Progressive Disclosure

"Don't tell Claude all the information you could possibly want it to know. Rather, tell it how to find important information so that it can use it only when needed." — Anthropic Engineering

Skills should be concise entry points, not exhaustive documentation.

Size Limits

MetricTargetMaximumAction if Exceeded
Skill lines<300400Split or reference docs
Total skills10-1215Consolidate related skills
CLAUDE.md<400500Move content to skills

Current skill sizes should be monitored:

wc -l .claude/​skills/​**/​SKILL.md | sort -n

Skill Structure Template

---
name: tzurot-skillname
description: Action-oriented description. Use when [specific triggers]. Covers [key topics].
lastUpdated: 'YYYY-MM-DD'
---

# Skill Title

**Use this skill when:** [2-3 specific trigger scenarios]

## Quick Reference (Essential)

[10-20 lines of the most critical patterns]

## Core Patterns (Must Know)

[50-100 lines of essential patterns with examples]

## Additional Patterns

**See:** `docs/​path/​to/​detailed-docs.md`
[Brief summaries with links, not full content]

## Related Skills

- **skill-name** - When to use instead

## References

- Full documentation: `docs/​path/​to/​doc.md`
- Project guidelines: `CLAUDE.md#section`

What Belongs in Skills vs Docs

Content TypeLocationExample
Quick patternsSkill"Use fake timers: vi.useFakeTimers()"
Essential examplesSkill5-10 line code snippet
Comprehensive guidesdocs/Full testing guide with all edge cases
Reference tablesdocs/Complete API reference
Decision rationaleSkill (brief) + docs/ (full)Why we use rebase-only

Writing Good Descriptions

The description field in YAML frontmatter determines when Claude auto-activates the skill.

Action-oriented triggers work best:

# ❌ BAD - Passive, vague
description: Testing patterns for the project.

# ✅ GOOD - Action triggers
description: Use when writing tests, debugging test failures, or mocking dependencies. Covers Vitest patterns, fake timers, and mock factories.
# ❌ BAD - Too broad
description: Database and vector operations.

# ✅ GOOD - Specific triggers
description: Use when writing Prisma queries, running migrations, or working with pgvector similarity search. Covers connection pooling and migration workflow.

When to Create a New Skill

Create a new skill when:

  • Pattern applies to multiple features/​areas
  • Topic is distinct from existing skills
  • Content would bloat an existing skill beyond limits
  • Users frequently need this specific guidance

Don't create a new skill when:

  • Content fits in existing skill (<50 lines to add)
  • Topic is one-off or temporary
  • Better suited for docs/ as reference material
  • Would duplicate existing skill content

When to Merge Skills

Merge skills when:

  • Significant content overlap (>30%)
  • Topics are closely related (e.g., constants + types)
  • Combined size stays under 400 lines
  • Mental model is clearer as one concept

Process:

  1. Create merged skill with combined essential content
  2. Move non-essential content to docs/
  3. Delete old skill directories
  4. Update README.md skill index
  5. Update any CLAUDE.md references

Skill Maintenance

Regular audits (monthly or after major features):

  1. Check skill sizes: wc -l .claude/​skills/​**/​SKILL.md
  2. Remove outdated patterns
  3. Update lastUpdated timestamps
  4. Verify cross-references still valid

After production incidents:

  1. Add lessons learned to relevant skill
  2. Keep addition brief (reference post-mortem for details)
  3. Update lastUpdated

Anti-Patterns to Avoid

1. Documentation Dumping

# ❌ BAD - Entire guide in skill

## Complete API Reference

[500 lines of every possible option]

# ✅ GOOD - Essential + reference

## Key Options

- `ttl`: Cache lifetime in ms
- `maxSize`: Maximum entries

**Full options:** See `docs/​reference/​cache-api.md`

2. Duplicate Content

# ❌ BAD - Same content in skill and CLAUDE.md

[Pattern explained in both places]

# ✅ GOOD - Single source of truth

**See:** `CLAUDE.md#testing` or reference from CLAUDE.md to skill

3. Over-Detailed Examples

# ❌ BAD - 50-line example for simple concept

[Full service with all edge cases]

# ✅ GOOD - Minimal viable example

const cache = new TTLCache({ ttl: 60000, maxSize: 100 });
cache.set('key', value);
const result = cache.get('key');

4. Missing Cross-References

# ❌ BAD - Standalone content

[No links to related skills or docs]

# ✅ GOOD - Connected knowledge

## Related Skills

- **tzurot-architecture** - Service boundaries
- **tzurot-async-flow** - Timer alternatives

Skill Quality Checklist

Before committing a new or updated skill:

  • Under 400 lines
  • Has "Use this skill when:" section
  • Action-oriented description in frontmatter
  • Essential patterns only (detailed content in docs/)
  • Includes Related Skills section
  • Includes References section
  • lastUpdated timestamp current
  • No duplicate content with other skills
  • Examples are minimal but complete

Related Skills

  • tzurot-docs - Documentation organization and maintenance
  • tzurot-git-workflow - Committing skill changes

References

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
Any Summary logo
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View