Official agent skill

Write A Skill

by sanity-io in sanity-io/sanity

Create new agent skills with proper structure, progressive disclosure, and bundled resources.

OfficialMITAuto-check passedAgent Workflows

Install Write A Skill

skills CLI
$ npx skills add sanity-io/sanity --skill write-a-skill -a claude-code

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

GitHub CLI
$ gh skill install sanity-io/sanity write-a-skill --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/sanity-io/sanity.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/write-a-skill .claude/skills/write-a-skill && 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
write-a-skill
GitHub stars
6.4k
Used in
13 other repos
Token cost
~757 tokens
SKILL.md length
276 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Create new agent skills with proper structure, progressive disclosure, and bundled resources.

  • Works in 3 steps: Gather requirements - ask user about → Draft the skill - create → Review with user - present draft and ask
  • User wants to create
  • SKILL.md covers Process, Skill Structure, SKILL.md Template and Description Requirements, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Write A Skill is an agent skill from sanity-io/sanity, published by the product's own GitHub organization. Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.

Its SKILL.md is about 760 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: Sanity Studio – Rapidly configure content workspaces powered by structured content. The licence is MIT.

When your agent uses it

  • User wants to create
  • Build a new skill

Example prompts

  • “/write-a-skill”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Gather requirements - ask user about
  2. Draft the skill - create
  3. Review with user - present draft and ask

What it can do on your machine

Read from SKILL.md and the folder at commit 982525c. 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 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

Write A Skill loads about 757 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 276 words of instructions outside code blocks.

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

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 sanity-io/sanity at commit 982525c, republished under its MIT licence (© sanity-io). 276 words, ~757 tokens.

Download SKILL.mdSave it as .claude/skills/write-a-skill/SKILL.md (or your agent's skills folder).
name
write-a-skill
description
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.

Writing Skills

Process

  1. Gather requirements - ask user about:

    • What task/domain does the skill cover?
    • What specific use cases should it handle?
    • Does it need executable scripts or just instructions?
    • Any reference materials to include?
  2. Draft the skill - create:

    • SKILL.md with concise instructions
    • Additional reference files if content exceeds 500 lines
    • Utility scripts if deterministic operations needed
  3. Review with user - present draft and ask:

    • Does this cover your use cases?
    • Anything missing or unclear?
    • Should any section be more/less detailed?

Skill Structure

skill-name/
├── SKILL.md           # Main instructions (required)
├── REFERENCE.md       # Detailed docs (if needed)
├── EXAMPLES.md        # Usage examples (if needed)
└── scripts/           # Utility scripts (if needed)
    └── helper.js

SKILL.md Template

md
---
name: skill-name
description: Brief description of capability. Use when [specific triggers].
---

# Skill Name

## Quick start

[Minimal working example]

## Workflows

[Step-by-step processes with checklists for complex tasks]

## Advanced features

[Link to separate files: See [REFERENCE.md](REFERENCE.md)]

Description Requirements

The description is the only thing your agent sees when deciding which skill to load. It's surfaced in the system prompt alongside all other installed skills. Your agent reads these descriptions and picks the relevant skill based on the user's request.

Goal: Give your agent just enough info to know:

  1. What capability this skill provides
  2. When/why to trigger it (specific keywords, contexts, file types)

Format:

  • Max 1024 chars
  • Write in third person
  • First sentence: what it does
  • Second sentence: "Use when [specific triggers]"

Good example:

Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.

Bad example:

Helps with documents.

The bad example gives your agent no way to distinguish this from other document skills.

When to Add Scripts

Add utility scripts when:

  • Operation is deterministic (validation, formatting)
  • Same code would be generated repeatedly
  • Errors need explicit handling

Scripts save tokens and improve reliability vs generated code.

When to Split Files

Split into separate files when:

  • SKILL.md exceeds 100 lines
  • Content has distinct domains (finance vs sales schemas)
  • Advanced features are rarely needed

Review Checklist

After drafting, verify:

  • Description includes triggers ("Use when...")
  • SKILL.md under 100 lines
  • No time-sensitive info
  • Consistent terminology
  • Concrete examples included
  • References one level deep

© sanity-io, MIT. 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 .agents/skills/write-a-skill of sanity-io/sanity.

Open the folder on GitHubat commit 982525c

Used in 13 other repositories

We found 14 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 13 other GitHub owners. This page covers the copy in sanity-io/sanity, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Write A Skill 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.

Write A Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write A Skill this skillsanity-io/sanity6.4k13 repos~757Automated safety check: PassMIT
Skill CreatorAzure/azqr79489 repos~8.2kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k10 repos~3.5kAutomated safety check: PassMIT
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Claude Code Command Developmentanthropics/claude-plugins-official37k10 repos~4.8kAutomated safety check: PassApache-2.0
Claude Code Plugin Structureanthropics/claude-plugins-official37k10 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.

    794 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 10 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.

    37k 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.

    37k 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.

    65k GitHub stars~1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from sanity-io/sanity

All 34 skills in this repo
  • Playwright CLI

    sanity-io/sanity

    Official

    Automates browser interactions for web testing, form filling, screenshots, and data extraction.

    6.4k GitHub starsUsed in 18 repos~1.9k tokens
    Auto-check passed
  • Find Skills

    sanity-io/sanity

    Official

    Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities.

    6.4k GitHub starsUsed in 67 repos~1.2k tokens
    Auto-check passed
  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 130 repos~1.6k tokens
    Auto-check passed
  • Before And After

    sanity-io/sanity

    Official

    Add existing screenshots or screen recordings to a GitHub pull request as a before/after or preview block.

    6.4k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • React Devtools

    sanity-io/sanity

    Official

    React DevTools CLI for AI agents. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 3 repos~2.1k tokens
    Auto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Auto-check passed

Categories

Questions about Write A Skill

What does Write A Skill do?

Create new agent skills with proper structure, progressive disclosure, and bundled resources. Write A Skill is an agent skill from sanity-io/sanity, published by the product's own GitHub organization. Create new agent skills with proper structure, progressive disclosure, and bundled resources.

When should I use Write A Skill?

Write A Skill fits situations like: user wants to create; build a new skill.

How do I install Write A Skill in Claude Code?

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

How do I install Write A Skill in Codex?

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

Can I use Write A Skill 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 sanity-io/sanity --skill write-a-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/write-a-skill, .gemini/skills/write-a-skill, .github/skills/write-a-skill and .opencode/skills/write-a-skill in your project.

What does Write A Skill need to run?

SKILL.md names no scripts, command-line tools or credentials: Write A Skill is instructions for the agent only.

Does Write A Skill 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 Write A Skill 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 Write A Skill use?

Write A Skill is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Write A Skill use?

About 757 tokens (SKILL.md is roughly 3k 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 Write A Skill?

Skills that share tags, products or a category with Write A Skill: Skill Creator (Azure/azqr, 794 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, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write A Skill?

sanity-io (a GitHub organization, an official publisher) maintains it in sanity-io/sanity, which has 6,352 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 7, 2026.

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