Writing Skills
- 66 installs
- 1 repo stars
- Updated March 16, 2026
- pixel-process-ug/superkit-agents
Helps with ai & agent building tasks.
About
writing-skills is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- writing-skills
- AI & Agent Building
- AI-coding skill
Writing Skills by the numbers
- 66 all-time installs (skills.sh)
- +2 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #5,968 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pixel-process-ug/superkit-agents --skill writing-skillsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 66 |
|---|---|
| repo stars | ★ 1 |
| Last updated | March 16, 2026 |
| Repository | pixel-process-ug/superkit-agents ↗ |
What it does
Helps with ai & agent building tasks.
Files
Writing Skills
Overview
Create effective, well-tested Claude Code skills that trigger reliably, load efficiently, and produce consistent results. This skill enforces a TDD approach to skill creation — define test prompts first, write the minimal skill, then harden against misfire and rationalization.
This is a RIGID skill. Every step must be followed exactly. No shortcuts.
Phase 1: Define Test Prompts (RED)
[HARD-GATE] Before writing any skill content, define the prompts that should trigger it.
Write 3-5 test prompts:
| # | Test Type | Purpose | Example |
|---|---|---|---|
| 1 | Obvious trigger | Should clearly match | "Create a new React component with tests" |
| 2 | Subtle trigger | Should also match | "I need a reusable button" |
| 3 | Near-miss | Should NOT match | "Review this component code" |
| 4 | Edge case | Define expected behavior | "Create a component and write its docs" |
| 5 | Ambiguous | Define which skill wins | "Set up the frontend" |
Document expected behavior for each:
Test prompt: "Create a new React component with tests"
Expected: Should trigger component-creation skill
Should NOT trigger: testing-strategy, code-review, writing-skillsSTOP — Do NOT proceed to Phase 2 until all test prompts are documented.
Phase 2: Write Minimal SKILL.md (GREEN)
Create the minimum skill definition that passes all test prompts from Phase 1.
Required Structure
Every SKILL.md MUST contain ALL of these elements:
| Element | Required | Purpose |
|---|---|---|
Frontmatter (name, description) | Yes | Identification and trigger matching |
| CSO-optimized description | Yes | Starts with "Use when...", lists trigger conditions |
| Overview (2-3 sentences) | Yes | Purpose and value |
| Multi-phase process with STOP markers | Yes | Numbered phases with clear actions |
| Decision tables | Yes | Tables for choosing between approaches |
| Anti-patterns / Common mistakes table | Yes | "What NOT to do" section |
| Anti-rationalization guards | Yes | HARD-GATE or "Do NOT skip" markers |
| Integration points table | Yes | How skill connects to other skills |
| Concrete examples | Yes | Code/command examples where non-obvious |
| Skill type declaration | Yes | RIGID or FLEXIBLE at the end |
Frontmatter Rules
---
name: skill-name # lowercase with hyphens, unique identifier
description: "Use when [trigger conditions]" # Max 1024 chars
---[HARD-GATE] The description field MUST start with "Use when".
CSO (Claude Search Optimization) Rules
The description field determines when a skill is selected. Optimize it like a search query.
| Rule | Explanation |
|---|---|
| Start with "Use when..." | Trigger condition format |
| List specific conditions, not capabilities | What activates the skill, not what it teaches |
| Maximum 1024 characters | Be concise |
| Use action verbs | "creating", "debugging", "designing", "reviewing" |
Good:
description: "Use when creating database migrations, designing table schemas, adding indexes, or optimizing SQL queries"Bad:
description: "A comprehensive guide to database design covering normalization, indexing, query optimization, and migration strategies"Trigger Condition Patterns
| Pattern | Format | Example |
|---|---|---|
| Action-based | "Use when creating..., updating..., deleting..." | CRUD operations |
| Problem-based | "Use when debugging..., fixing..., resolving..." | Bug fixes |
| Artifact-based | "Use when working with Docker files, CI configs..." | File types |
| Phase-based | "Use when starting a project, finishing a feature..." | Workflow stage |
STOP — Verify the description would match test prompts from Phase 1 before proceeding.
Phase 3: Harden the Skill (REFACTOR)
Review and close loopholes:
| Check | Question | Fix If Failing |
|---|---|---|
| Over-triggering | Does it match prompts it should NOT? | Narrow the description |
| Under-triggering | Does it miss valid prompts? | Add missing trigger conditions |
| Rationalization | Would an agent find a way to skip steps? | Add "Do NOT skip" constraints |
| Ambiguity | Are instructions interpretable multiple ways? | Make them concrete with examples |
| Token bloat | Is it over 500 lines? | Move reference material to separate files |
| Missing gates | Are there checkpoints between phases? | Add STOP markers |
Token Efficiency Targets
| Skill Type | Target Lines | Strategy |
|---|---|---|
| Getting-started workflows | < 100 lines | Minimal steps |
| Frequently-loaded skills | < 200 lines | Tables over prose |
| Comprehensive reference skills | < 400 lines | Split into phases |
| Maximum allowed | 500 lines | Move extras to separate files |
Token Reduction Strategies
- Use tables instead of prose for structured information
- Use terse imperative sentences, not explanatory paragraphs
- Move reference material to separate files (loaded only when needed)
- Eliminate redundancy — say it once
- Use code examples only when the pattern is non-obvious
STOP — Re-run test prompts mentally. Does the skill trigger correctly for all 5? Does it NOT trigger for near-misses?
Phase 4: Validate and Save
1. Verify all 10 required elements from Phase 2 are present 2. Verify token budget is within target 3. Verify STOP markers exist between phases 4. Save the SKILL.md file 5. Test by invoking the skill with each test prompt
Validation Checklist
| # | Check | Status |
|---|---|---|
| 1 | Frontmatter has name and description | [ ] |
| 2 | Description starts with "Use when" | [ ] |
| 3 | Overview is 2-3 sentences | [ ] |
| 4 | Phases are numbered with STOP markers | [ ] |
| 5 | Decision tables present (not prose) | [ ] |
| 6 | Anti-patterns table present | [ ] |
| 7 | Anti-rationalization guards present | [ ] |
| 8 | Integration points table present | [ ] |
| 9 | Concrete examples present | [ ] |
| 10 | Skill type declared (RIGID/FLEXIBLE) | [ ] |
| 11 | Under 500 lines total | [ ] |
Skill Types and Testing
Testing by Skill Type
| Skill Type | Test Method | What to Verify |
|---|---|---|
| Technique (TDD, debugging) | Apply to problem X and unusual problem Y | Produces right steps; adapts correctly |
| Pattern (design patterns) | Show code X (matches) and code Y (near-miss) | Identifies correctly; rejects correctly |
| Reference (API docs, checklists) | Ask "what is the rule for X?" and "what about edge case Z?" | Finds right answer; handles gaps |
| Discipline (security review) | Review correct code, then review under time pressure | Passes clean code; enforces all rules even under pressure |
Anti-Patterns / Common Mistakes
| Mistake | Why It Is Wrong | What To Do Instead |
|---|---|---|
| Description describes content, not triggers | Skill never gets selected | Start with "Use when..." and list trigger conditions |
| Too broad — triggers on everything | Useful for nothing | Narrow to specific actions and artifacts |
| Too long — 1000+ lines | Wastes context tokens every invocation | Stay under 500 lines; split reference material |
| Missing constraints | Agents rationalize skipping steps | Add "Do NOT" rules and HARD-GATE markers |
| Untested against real prompts | Will misfire in production | Write test prompts BEFORE writing the skill |
| External file dependencies | Fragile — files may not exist | Self-contained or check file existence first |
| Prose where tables work | Harder to scan, more tokens | Use tables for structured comparisons |
| No STOP markers between phases | Agent blasts through without checkpoints | Add STOP after each phase |
Anti-Rationalization Guards
- [HARD-GATE] Do NOT write a skill without defining test prompts first (Phase 1)
- [HARD-GATE] Do NOT omit the description field or use a non-"Use when" format
- Do NOT skip the hardening phase — every skill needs rationalization review
- Do NOT skip the validation checklist — all 11 items must pass
- Do NOT create skills over 500 lines — split into skill + reference file
- Do NOT use prose where a table would be clearer
Integration Points
| Skill | Relationship |
|---|---|
self-learning | Skills are discovered and loaded via the skill system |
auto-improvement | Tracks skill effectiveness and suggests improvements |
spec-writing | Skills can be specified using JTBD methodology |
code-review | Skills should be reviewed for quality before deployment |
testing-strategy | Test prompts follow testing methodology |
Concrete Example: Complete Minimal Skill
---
name: docker-setup
description: "Use when creating Dockerfiles, docker-compose configurations, or containerizing an application for development or production"
---
# Docker Setup
## Overview
Guide the creation of Docker configurations for development and production environments. Produces Dockerfiles, docker-compose files, and .dockerignore with best practices.
## Phase 1: Discovery
[Ask about: runtime, ports, volumes, env vars, multi-stage needs]
STOP — confirm requirements.
## Phase 2: Generate Configuration
[Create Dockerfile, docker-compose.yml, .dockerignore]
STOP — present for review.
## Phase 3: Verify
[Build image, run container, verify health check]
## Anti-Patterns
| Mistake | Fix |
|---------|-----|
| Running as root | Use non-root USER |
| No .dockerignore | Always create one |
## Skill Type
**Flexible**Skill Type
Rigid — The TDD approach (test prompts first), required structure elements, and validation checklist must be followed exactly. No elements may be skipped.
Anthropic Best Practices for Skill Authoring
Reference document for writing Claude Code skills that follow Anthropic's official guidance.
Progressive Disclosure (3-Tier Context Loading)
Load context incrementally to minimize token usage:
Tier 1: Always Loaded
- The
descriptionfield in frontmatter - Used for skill selection/matching
- Must be under 1024 characters
- Contains trigger conditions only
Tier 2: Loaded When Skill is Selected
- The SKILL.md body content
- Contains instructions, steps, patterns
- Must be under 500 lines
- Should be self-contained
Tier 3: Loaded On Demand
- Referenced files (checklists, templates, examples)
- Loaded only when explicitly needed during execution
- One level deep -- referenced files should not reference other files
Description as Trigger Condition
The description field is a search index, not documentation.
Do:
description: "Use when reviewing pull requests, checking code quality, or performing pre-merge validation"Do not:
description: "This skill helps developers perform thorough code reviews using best practices from Google's engineering guidelines"Rules:
- Start with "Use when..."
- List 2-5 specific trigger scenarios
- Use verbs that match user intent (creating, debugging, deploying, reviewing)
- Maximum 1024 characters
- No marketing language or superlatives
Body Under 500 Lines
The SKILL.md body is loaded into context whenever the skill is invoked. Every line costs tokens.
Strategies to stay under 500 lines:
- Use tables instead of verbose lists
- Move reference material to separate files
- Use terse imperative sentences
- Include code examples only when the pattern is non-obvious
- Eliminate repeated information
File References One Level Deep
Skills can reference other files for detailed content:
See [OWASP Checklist](./owasp-checklist.md) for detailed vulnerability patterns.Rules:
- Referenced files are loaded only when needed
- References must be one level deep (a referenced file must not reference another file)
- Use relative paths from the skill directory
- Referenced files should be self-contained
Forward Slashes Only
All file paths in skills must use forward slashes, regardless of platform:
# Correct
templates/skills/my-skill/SKILL.md
# Incorrect
templates\skills\my-skill\SKILL.mdSelf-Contained Skills
Skills should minimize external dependencies:
- Do not assume specific tools are installed unless checking first
- Do not reference URLs that may change or become unavailable
- Include essential information directly in the skill body
- Use referenced files (in the same directory) for supplementary content
- Do not depend on other skills being present -- reference them as optional enhancements
Allowed-Tools Field for Security
When a skill should only use specific tools, restrict access:
---
name: read-only-review
description: "Use when performing read-only code analysis"
allowed-tools:
- Read
- Grep
- Glob
---This prevents the skill from accidentally modifying files, running commands, or accessing resources it should not touch.
Use cases:
- Read-only analysis skills (no Bash, no Edit, no Write)
- Skills that should not access the network (no WebFetch)
- Skills restricted to specific MCP tools
Testing Skills Before Deployment
Manual Testing
1. Write 3-5 test prompts that should trigger the skill 2. Write 2-3 prompts that should NOT trigger it 3. Invoke each prompt and verify correct skill selection 4. Check that the skill produces expected output for each test prompt 5. Verify token usage is within budget
Checklist
- [ ] Description starts with "Use when..."
- [ ] Description is under 1024 characters
- [ ] Body is under 500 lines
- [ ] All file paths use forward slashes
- [ ] Referenced files exist and are one level deep
- [ ] No external URL dependencies that could break
- [ ] Frontmatter has
nameanddescription - [ ] Skill is self-contained (works without other skills installed)
- [ ] Test prompts trigger correctly
- [ ] Near-miss prompts do not trigger incorrectly
- [ ] Token usage is within target for skill type