writing-skills

writing-skills is a skill for Claude Code, Codex from xiaolai/nlpm. It costs 61 tokens per session (1,968 once invoked), scanned A, original, ISC.

A guide to writing SKILL.md files, the shared format used to teach coding agents specialized tasks across tools such as Claude Code, Codex CLI, and Antigravity.

In plain words
What is it for?
It helps create, improve, and review skill descriptions, trigger phrases, required fields, examples, and tool-specific supporting files.
Why use it?
It helps skills activate at the right time and provide useful instructions instead of being too vague or difficult for an agent to apply.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Part of the nlpm plugin — 17 skills, 12 commands, 8 agents, 1 hook shipped together

Good fit It helps create, improve, and review skill descriptions, trigger phrases, required fields, examples, and tool-specific supporting files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaolai/nlpm/writing-skills
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xiaolai/nlpm --skill writing-skills
Clone the repo
git clone --depth 1 https://github.com/xiaolai/nlpm

Made for: Claude Code, Codex.

Or install nlpm, the plugin that ships this one along with the rest of its 17 skills, 12 commands, 8 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for writing-skills

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaolai/nlpm/writing-skills/github.svg)](https://agentmods.dev/skills/xiaolai/nlpm/writing-skills)
Your own site
<a href="https://agentmods.dev/skills/xiaolai/nlpm/writing-skills"><img src="https://agentmods.dev/badge/skills/xiaolai/nlpm/writing-skills/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for writing-skills

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaolai/nlpm/writing-skills"><img src="https://agentmods.dev/badge/skills/xiaolai/nlpm/writing-skills.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,968 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 3
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • medium Agent Snooping · line 7
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.01968
Opus 5 $0.00030 $0.00984
Sonnet 5 $0.00012 $0.00394
Haiku 4.5 $0.00006 $0.00197

Measured 10d ago against content hash e10e75613740, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

writing-skills scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

codex/skills/writing-skills/SKILL.md · 236 lines

How it starts

The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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):

description: "Helpful skill for React development"

Good (score 95):

description: "Use when building React components, debugging re-renders, optimizing performance with useMemo/useCallback, or fixing hook dependency arrays"

Description Checklist

Criterion Test
3+ trigger phrases Count distinct action phrases separated by commas
Action-oriented Starts with "Use when..." or "How to..."
Includes tool/framework name The technology name appears explicitly
Matches real queries Would a user's actual question contain any of your trigger words?

Trigger Phrase Construction

Map real user queries to trigger phrases:

User says Trigger 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

Read the full file on GitHub · 236 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 236 lines · 61 tokens per session scan A e10e75613740

Subscribe to this mod's changes

writing-skills is a skill published in the GitHub repository xiaolai/nlpm (136 stars, last pushed today), licensed ISC. It adds 61 tokens to every session and 1,968 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens