Agent skill

Writing Skills

by xiaolai in xiaolai/nlpm

How to write SKILL.md files that trigger reliably, for any tool (open spec).

ISCAuto-check passedAgent Workflows

Install Writing Skills

skills CLI
$ npx skills add xiaolai/nlpm --skill writing-skills -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xiaolai/nlpm writing-skills --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xiaolai/nlpm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nlpm/writing-skills .claude/skills/writing-skills && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
writing-skills
GitHub stars
150
Token cost
~1.9k tokens
SKILL.md length
655 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
ISC

At a glance

How to write SKILL.md files that trigger reliably, for any tool (open spec).

  • Works in 6 steps: The Description is Everything → Body Structure → Progressive Disclosure → …
  • For any tool (open spec)
  • SKILL.md covers 1. The Description is Everything, 2. Body Structure, 3. Progressive Disclosure and 4. Worked Example: Improving a…, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Writing Skills is an agent skill from xiaolai/nlpm. How to write SKILL.md files that trigger reliably, for any tool (open spec).

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Skill authoring. The repository describes itself as: Natural-Language Programming Manager — scan, lint, and score NL artifacts with Claude-native quality scoring. The licence is ISC.

When your agent uses it

  • For any tool (open spec)
  • Tasks that involve Skill authoring

Example prompts

  • “/writing-skills”

Requirements

  • Python 3
  • Node.js
  • Docker

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. The Description is Everything
  2. Body Structure
  3. Progressive Disclosure
  4. Worked Example: Improving a Skill
  5. Common Mistakes
  6. Quality Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit bfa2fc2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Writing Skills loads about 1.9k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 655 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xiaolai/nlpm at commit bfa2fc2, republished under its ISC licence (© xiaolai). 655 words, ~1,934 tokens.

Download SKILL.mdSave it as .claude/skills/writing-skills/SKILL.md (or your agent's skills folder).
name
writing-skills
description
How to write SKILL.md files that trigger reliably, for any tool (open spec).
version
0.2.0
user-invocable
false

Writing Skills

Scope: covers SKILL.md authoring. SKILL.md is the cross-tool open standard (agentskills.io) — the same file works in Claude Code (.claude/skills/), Codex CLI (.agents/skills/), and Antigravity (.agent/skills/). Only name and description are required by the spec; per-tool extras (Claude's model:/allowed-tools:, Codex's agents/openai.yaml sidecar) live in [[nlpm:conventions-claude]] / [[nlpm:conventions-codex]] / [[nlpm:conventions-antigravity]]. For agent writing, see [[writing-agents]]. For plugin architecture, see [[writing-plugins]].

1. The Description is Everything

The description field determines when Claude loads this skill. It is not a summary -- it is a trigger mechanism.

Bad (score 55):

yaml
description: "Helpful skill for React development"

Good (score 95):

yaml
description: "Use when building React components, debugging re-renders, optimizing performance with useMemo/useCallback, or fixing hook dependency arrays"
Description Checklist
CriterionTest
3+ trigger phrasesCount distinct action phrases separated by commas
Action-orientedStarts with "Use when..." or "How to..."
Includes tool/framework nameThe technology name appears explicitly
Matches real queriesWould a user's actual question contain any of your trigger words?
Trigger Phrase Construction

Map real user queries to trigger phrases:

User saysTrigger phrase to include
"My component re-renders too much""debugging re-renders"
"How do I memoize this?""optimizing performance with useMemo/useCallback"
"My useEffect runs in a loop""fixing hook dependency arrays"
"I need a new component for...""building React components"

Rule: if you can't list 3 real user queries that match your description, rewrite it.

2. Body Structure

Section Order
  1. Scope note (if related skills exist) -- tells Claude when to use THIS skill vs another
  2. Most commonly needed patterns -- what users ask about 80% of the time
  3. Decision matrices -- when to use A vs B (tables)
  4. Worked examples -- before/after with scores
  5. Common mistakes -- anti-patterns to avoid
  6. References -- links to deep dives
Heading Rules
  • H1 (#): skill title only (one per file)
  • H2 (##): major sections (numbered: ## 1. Section Name)
  • H3 (###): subsections within a major section
  • Never skip heading levels (no H2 followed directly by H4)
Code Examples

Every code example must show the problem, then the solution:

markdown
### Bad (breaks on concurrent requests)
` ` `python
global_state = {}  # shared mutable state
` ` `

### Good (request-scoped)
` ` `python
def handler(request):
    state = {}  # local to this request
` ` `

Rules for code examples:

  • Runnable, not pseudocode
  • Contextual -- show enough surrounding code to understand placement
  • Annotated -- comment the critical line, not every line

3. Progressive Disclosure

Keep SKILL.md under 500 lines. Use the file system for depth:

skills/my-domain/my-skill/
  SKILL.md          # core patterns (< 500 lines)
  references/       # deep dives, edge cases, full API docs
    advanced.md
    api-reference.md
  examples/         # working code samples
    basic-setup.ts
    advanced-config.ts
  scripts/          # utility scripts
    validate.sh
When to Extract to references/
Content typeKeep in SKILL.md?Extract to references/?
Top 5 patterns everyone needsYesNo
Full API reference (50+ entries)NoYes
Edge cases (< 5% of users)NoYes
Configuration matrix (20+ options)NoYes
Quick decision table (< 10 rows)YesNo

4. Worked Example: Improving a Skill

Show full SKILL.md (261 more words)Show less
Before (score 55/100)
yaml
---
name: docker-helper
description: "Information about Docker"
version: 0.1.0
---
markdown
# Docker Helper

Docker is a containerization platform. Here are some useful commands.

## Commands
- `docker build` - builds an image
- `docker run` - runs a container
- `docker ps` - lists containers

## Dockerfile
A Dockerfile contains instructions for building an image.

## Docker Compose
Docker Compose is for multi-container applications.

Problems:

  • Description is a label, not a trigger mechanism (0 trigger phrases)
  • Body teaches theory Claude already knows from training
  • No code examples showing problem/solution
  • No decision matrices
  • No scope note
After (score 92/100)
yaml
---
name: docker-helper
description: "Use when writing Dockerfiles, debugging container networking, optimizing image size with multi-stage builds, or configuring Docker Compose services. Covers build cache, volume mounts, health checks, and compose profiles."
version: 0.1.0
---
markdown
# Docker Helper

> Scope: covers Docker CLI, Dockerfiles, and Compose. For Kubernetes deployment, see [[k8s-deploy]].

## 1. Image Size Optimization

### Before (1.2 GB)
` ` `dockerfile
FROM node:20
COPY . .
RUN npm install
RUN npm run build
CMD ["node", "dist/index.js"]
` ` `

### After (148 MB -- 88% smaller)
` ` `dockerfile
FROM node:20-slim AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build

FROM node:20-slim
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
CMD ["node", "dist/index.js"]
` ` `

Key changes: multi-stage build, slim base, copy only production artifacts.

## 2. Base Image Selection

| Use case | Base image | Size |
|----------|-----------|------|
| Node.js production | node:20-slim | 180 MB |
| Node.js minimal | node:20-alpine | 130 MB |
| Python production | python:3.12-slim | 150 MB |
| Static files only | nginx:alpine | 40 MB |
| From scratch (Go/Rust) | scratch | < 20 MB |

Changes made:

  1. Description: 0 trigger phrases -> 8 trigger phrases (+37 points)
  2. Scope note added (+5 points)
  3. Replaced theory with problem/solution examples (+25 points)
  4. Added decision matrix (+10 points)
  5. Removed content Claude knows from training (-15 lines, +5 points for conciseness)

5. Common Mistakes

MistakeWhy it hurtsFix
Description is a feature listClaude can't match user queries to the skillRewrite as trigger phrases starting with "Use when..."
Body teaches theoryWastes tokens on content Claude already knowsShow patterns and decisions, not definitions
Over 500 linesBloats context window, penalized by lintersExtract to references/, keep core patterns only
No scope noteClaude doesn't know when to use THIS skill vs a related oneAdd scope note referencing related skills
Pseudocode examplesNot actionable, can't be copy-pastedUse runnable code with enough context
Every section has equal weightBuries the most useful contentLead with the 80% patterns, push edge cases to references/

6. Quality Checklist

Before shipping a skill, verify:

  • Description has 3+ specific trigger phrases
  • Description starts with "Use when..." or "How to..."
  • Scope note present (if related skills exist)
  • H2 sections numbered, H3 subsections under them
  • Code examples show problem then solution
  • Decision tables for A-vs-B choices
  • Total lines < 500
  • No content Claude already knows from training
  • At least one worked example with before/after

© xiaolai, ISC. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/nlpm/writing-skills of xiaolai/nlpm.

Open the folder on GitHubat commit bfa2fc2

Compare with similar skills

Writing Skills next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Writing Skills compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Writing Skills this skillxiaolai/nlpm150—~1.9kAutomated safety check: PassISC
Skill CreatorAzure/azqr79689 repos~8.2kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k11 repos~3.5kAutomated safety check: PassMIT
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Claude Code Command Developmentanthropics/claude-plugins-official38k10 repos~4.8kAutomated safety check: PassApache-2.0
Claude Code Plugin Structureanthropics/claude-plugins-official38k10 repos~3.4kAutomated safety check: PassApache-2.0

Similar skills

  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    796 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 11 repos~3.5k tokens
    Agent WorkflowsAuto-check passed
  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Command Development

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.

    38k GitHub starsUsed in 10 repos~4.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Plugin Structure

    anthropics/claude-plugins-official

    Official

    Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.

    38k GitHub starsUsed in 10 repos~3.4k tokens
    Agent WorkflowsAuto-check passed
  • Skill Release Gate

    rohitg00/ai-engineering-from-scratch

    Evaluates an Agent Skill bundle before release for structure, trigger quality, artifact improvement, script correctness, safety, installed-tree integrity and host portability.

    67k GitHub stars~1k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from xiaolai/nlpm

All 15 skills in this repo
  • Conventions

    xiaolai/nlpm

    Universal NL conventions: SKILL.md open spec, AGENTS.md, vague quantifiers, naming.

    150 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Antigravity and Gemini CLI artifact schemas: .gemini/ paths, extensions, hooks.

    150 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Conventions Codex

    xiaolai/nlpm

    Codex CLI artifact schemas: config.toml, .codex-plugin, skills, hooks, AGENTS.md.

    150 GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Orchestration

    xiaolai/nlpm

    Multi-agent workflow patterns: parallel dispatch, pipelines, QC gates, retries.

    150 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Patterns

    xiaolai/nlpm

    NL artifact anti-patterns: vague quantifiers, bare prohibitions, oversized skills.

    150 GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Scoring

    xiaolai/nlpm

    100-point NL artifact rubric: penalty tables per artifact type, calibration cases.

    150 GitHub stars~5.3k tokensUpdated today
    Auto-check passed

Categories

Questions about Writing Skills

What does Writing Skills do?

How to write SKILL.md files that trigger reliably, for any tool (open spec). Writing Skills is an agent skill from xiaolai/nlpm.md files that trigger reliably, for any tool (open spec).

When should I use Writing Skills?

Writing Skills fits situations like: for any tool (open spec); tasks that involve Skill authoring.

How do I install Writing Skills in Claude Code?

Run `npx skills add xiaolai/nlpm --skill writing-skills -a claude-code`. Or copy the skill folder (skills/nlpm/writing-skills in xiaolai/nlpm) into .claude/skills/writing-skills in your project. Claude Code loads it when a task matches its description.

How do I install Writing Skills in Codex?

Run `npx skills add xiaolai/nlpm --skill writing-skills -a codex`. Or copy the skill folder (skills/nlpm/writing-skills in xiaolai/nlpm) into .agents/skills/writing-skills in your project. Codex loads it when a task matches its description.

Can I use Writing Skills in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xiaolai/nlpm --skill writing-skills -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-skills, .gemini/skills/writing-skills, .github/skills/writing-skills and .opencode/skills/writing-skills in your project.

What does Writing Skills need to run?

SKILL.md names no scripts, command-line tools or credentials: Writing Skills is instructions for the agent only. Our summary lists: Python 3; Node.js; Docker.

Does Writing Skills access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Writing Skills safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Writing Skills use?

Writing Skills is published under the ISC licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Writing Skills use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Writing Skills?

Skills that share tags, products or a category with Writing Skills: Skill Creator (Azure/azqr, 796 stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars), Darwin Skill Optimizer (alchaincyf/darwin-skill, 6.2k stars) and Claude Code Command Development (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Writing Skills?

xiaolai (a GitHub user) maintains it in xiaolai/nlpm, which has 150 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 10, 2026.

Source: xiaolai/nlpm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.