Writing Agent Skills

VerifiedSafe

Author or update compact agent skills under skills/<name>/SKILL.md. Use when asked to write, add, or change a skill; not for auditing a skill library.

Sby Skills Guide Bot
DevelopmentIntermediate
8/15/2026
Claude CodeCodex
#skill-authoring#agent-skills#prompt-engineering#claude-code#markdown

Recommended for

Automated summary

Guides the authoring or updating of compact agent skills under skills/<name>/SKILL.md, providing a template, routing-oriented description rules, and body compression criteria.

Strengths

  • Ships a full SKILL.md template plus a method for writing the description as the routing surface (“Use when…”, “Do NOT use…”).
  • Gives explicit keep/delete lists: keep runnable commands, setup checks, output contracts and traps; drop overview prose, copied CLI help and generated docs.
  • Clearly separates tool skills (deterministic logic in scripts/) from workflow skills (lens, decision order, output contract).
  • Explains targeting for Claude Code vs Codex and how to use Agent Skills spec fields (compatibility, allowed-tools, metadata).

Limitations

  • Auditing or scoring an existing skill library is explicitly out of scope.
  • Assumes specific repo conventions (skills/<name>/, scripts/, references/) that it does not detail or tool.
  • No automated validation: the final check (unique name, triggers, ~120-line cap) is left to manual discipline.
When to use it

Use it when you need to create a new skill or rewrite the description and body of an existing SKILL.md.

When not to use it

Don't use it to audit, compare or rate a set of skills that are already written.

Security analysis

Safe
Quality score90/100

The skill is a meta-authoring guide for SKILL.md files and contains no destructive commands, secret handling, network exfiltration, obfuscated payloads, or safety-disabling instructions. It explicitly avoids committing unless asked.

No concerns found

How this analysis is made

Examples

New tool skill
Write a skill under skills/ that runs our scripts/flaky_report.py and explains how to read its output, with a description that triggers on 'flaky test' or 'rerun failures'.
Tighten a description
Update the description of skills/write-skill so it stops triggering when I ask to review existing skills, and add the missing Do NOT use boundary.
Compress an oversized skill
Our skills/deploy-skill/SKILL.md is 300 lines with copied CLI help and a troubleshooting section — compress it to an operator card following the write-skill template.

name: write-skill description: Author or update compact agent skills under skills/<name>/SKILL.md. Use when asked to write, add, or change a skill; not to audit a skill library.

write-skill

Create compact skills under skills/<name>/ that load only the behavior needed at invocation time.

Workflow

  1. Clarify only missing essentials: capability, triggers, non-triggers, tool/script needs, and portability.
  2. Pick a unique kebab-case name.
  3. Draft SKILL.md as an operator card: what to run, when to run it, what output means, what traps matter.
  4. Add helper files only when they remove repeated deterministic work.
  5. Compress once; add one README row; do not commit unless asked.

Template

---
name: <kebab-case>
description: <Concrete capability.> Use when <real phrases, file types, tools, or contexts>. Do NOT use <negative triggers if broad>.
---

# <name>

<One-line operational contract.>

## Usage / Commands / Routing

```bash
scripts/tool_or_helper.py <arg>
```

## Notes

- <What output shape means, or how to consume it.>
- <Hard rule, setup failure, safety boundary, or common mistake.>

Description

The description is the routing surface; optimize it first.

  • Use 1-3 sentences, third person, present tense.
  • Sentence 1 names the concrete capability.
  • Sentence 2 starts with Use when ... and lists actual trigger phrases, file types, tools, or contexts.
  • Add Do NOT use ... for broad domains such as review, search, docs, macOS, git, or browser work.
  • Avoid marketing words, time-sensitive claims, and duplicate "this skill should be used when" phrasing.

Body

Keep:

  • runnable commands or exact workflow steps;
  • setup checks that commonly block first use;
  • compact output contracts;
  • routing boundaries and safety pitfalls;
  • one strong example per command or concept.

Delete:

  • overview prose that restates the description;
  • installation/contributing/privacy/troubleshooting sections unless they change agent behavior;
  • copied CLI help, schemas, flag catalogs, or generated docs;
  • repeated prompt examples and canned analyses;
  • detail already present in README, references, or helper scripts.

Tool Skills

  • Put deterministic work in scripts/ or the existing executable.
  • Make SKILL.md a menu of invocations plus output shape and gotchas.
  • Use Run <tool> --help for all flags; keep only non-obvious flags.
  • Prefer 30-60 lines. If setup is long, keep the readiness check inline and move walkthroughs one hop away.

Workflow Skills

  • Keep the lens, decision order, and output contract.
  • Avoid rigid full templates unless structure is the skill's core value.
  • Findings should lead for review skills; summaries and praise are optional.
  • Split philosophy, examples, and source notes into references/REFERENCE.md. Keep examples inline when the example is the instruction, as in an output-shape skill.

Targeting

Write for Claude Code at full power — its subagents, built-in skills, and tool syntax — not for the intersection of every agent. Codex is a secondary consumer; pick per-agent skill sets at install time (npx skills add ... -a claude-code), never by flattening a skill.

Declare hard requirements instead of avoiding them. compatibility (≤500 chars) and allowed-tools are Agent Skills spec fields, and metadata takes arbitrary string keys that conforming runtimes ignore when unrecognized. Hooks and context: fork are Claude-Code-only and absent from the spec, so a skill using them declares:

compatibility: Designed for Claude Code (or similar products)

Cross-skill pointers: a negative one (Do NOT use for charts (use dataviz)) degrades harmlessly where the named skill is absent; a positive one (run X first) dangles, so those must name a skill in skills/.

Final Check

  • Name is unique kebab-case.
  • Description has concrete Use when ... triggers and needed Do NOT use ... boundaries.
  • SKILL.md is under ~120 lines, preferably 30-60 for tool wrappers.
  • Helpers are invoked, not duplicated in prose.
  • Positive cross-skill pointers name a skill that exists in skills/.
  • Agent- or OS-only requirements are declared in compatibility:, not worked around.
  • README has one row.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/writing-agent-skills-mstwizp8/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/writing-agent-skills-mstwizp8' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/writing-agent-skills-mstwizp8/download' --output '.skill-downloads/writing-agent-skills-mstwizp8/SKILL.md.part' && mv '.skill-downloads/writing-agent-skills-mstwizp8/SKILL.md.part' '.skill-downloads/writing-agent-skills-mstwizp8/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/writing-agent-skills-mstwizp8/SKILL.md' && test -s '.skill-downloads/writing-agent-skills-mstwizp8/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/write-skill' && cp -R '.skill-downloads/writing-agent-skills-mstwizp8' '.claude/skills/write-skill'

Codex
test -f '.skill-downloads/writing-agent-skills-mstwizp8/SKILL.md' && test -s '.skill-downloads/writing-agent-skills-mstwizp8/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/write-skill' && cp -R '.skill-downloads/writing-agent-skills-mstwizp8' '.agents/skills/write-skill'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/writing-agent-skills-mstwizp8'

openskills read 'writing-agent-skills-mstwizp8'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/writing-agent-skills-mstwizp8/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills