Create Skill

VerifiedSafe

Guide for creating a new Claude Code skill with the correct directory structure, front matter, and conventions.

Sby Skills Guide Bot
DevelopmentBeginner
7/22/2026
Claude Code
#claude-code#skill-authoring#scaffolding#frontmatter#meta

Recommended for

Automated summary

A step-by-step guide for scaffolding a new Claude Code skill with the correct directory layout, YAML front matter, and authoring conventions.

Strengths

  • Walks through scope selection (project vs global), directory creation, and writing the SKILL.md
  • Documents every front matter field, required and optional (allowed-tools, context, agent, user-invocable, and more)
  • Encodes authoring conventions: a Usage section, numbered steps, a 500-line cap, $ARGUMENTS substitution, and dynamic context via !`command`
  • Ships a copy-pasteable minimal example

Limitations

  • Does not validate the result — no syntax check or load test of the generated skill
  • Gives little guidance on content quality, such as how to word descriptions or when to split out supporting files beyond the line cap
  • Assumes familiarity with the .claude/skills location and Claude Code slash commands
When to use it

Reach for it whenever you want to add a new skill or slash command to a repository or to your global Claude Code setup.

When not to use it

Skip it for heavily reworking an existing skill, or for building commands for other agents (Cursor, Copilot) whose formats differ.

Security analysis

Safe
Quality score82/100

This is a purely instructional document describing Claude Code's skill file conventions. It declares no allowed-tools, contains no curl|sh pipelines, no destructive deletions, no secret handling, and no attempts to disable safety mechanisms. The only execution-adjacent element is documentation of the legitimate `!`command`` injection syntax, illustrated with a read-only git query. Risk of listing it is minimal.

Findings
  • •Describes the dynamic context injection feature (`!`command``) which executes shell commands, but the only example is a harmless read-only `git branch --show-current`; no malicious or obfuscated commands are supplied
  • •Writing skill files to `.claude/skills/` or `~/.claude/skills/` is a filesystem write, but it is the stated, expected purpose and targets a well-scoped user-level location
How this analysis is made

Examples

Scaffold a project skill
/create-skill release-notes
Create a global skill
/create-skill deploy-check --global
Describe the intent in prose
Create a new Claude Code skill called pr-review that reviews the current diff, sets it up as a project skill in .claude/skills with proper front matter.

name: create-skill description: Guide for creating a new Claude Code skill with the correct directory structure, front matter, and conventions. Use when creating or scaffolding a new skill. argument-hint: <skill-name> [--global]

Usage

Invoked as: /create-skill <skill-name> [--global]

The skill name is: $ARGUMENTS

Instructions

When creating a new skill, follow this structure precisely.

Step 1 — Determine scope

  • Project skill (default): .claude/skills/<skill-name>/SKILL.md
  • Global skill (if --global is passed): ~/.claude/skills/<skill-name>/SKILL.md

Global skills apply to all projects. Project skills apply only to the current repo.

Step 2 — Create the directory and file

<scope-path>/skills/<skill-name>/
└── SKILL.md        # Required

The directory name must be lowercase, using only letters, numbers, and hyphens. The directory name becomes the /slash-command name.

Only SKILL.md is required. Optional supporting files can be added alongside it:

<scope-path>/skills/<skill-name>/
├── SKILL.md           # Required — main instructions
├── template.md        # Optional — template for Claude to fill in
├── examples/          # Optional — example outputs
└── scripts/           # Optional — executable scripts

Step 3 — Write the SKILL.md with correct front matter

The file MUST start with YAML front matter between --- markers:

---
name: my-skill
description: What this skill does and when to use it.
---

Required and recommended fields

| Field | Required? | Description | |-------|-----------|-------------| | name | No (defaults to directory name) | Lowercase, numbers, hyphens only. Max 64 chars. | | description | Recommended | What the skill does and when to invoke it. Claude uses this to decide when to auto-load the skill. |

Optional fields

| Field | Description | |-------|-------------| | argument-hint | Hint shown during autocomplete, e.g. [file-path] or [issue-number] | | disable-model-invocation | Set to true to prevent Claude from auto-invoking (user only) | | user-invocable | Set to false to hide from / menu (Claude-only background knowledge) | | allowed-tools | Tools Claude can use without asking, e.g. Read, Grep, Bash(python *) | | model | Specific model to use when this skill is active | | context | Set to fork to run in an isolated subagent context | | agent | Subagent type when context: fork is set (e.g. Explore, Plan) |

Step 4 — Write the skill body

After the front matter, write the skill instructions in markdown. Follow these conventions:

  1. Start with a ## Usage section showing invocation syntax and referencing $ARGUMENTS
  2. Use numbered ### Step N — Title sections for multi-step workflows
  3. Keep SKILL.md under 500 lines — move detailed reference material to supporting files
  4. Reference supporting files so Claude knows when to load them:
    For API details, see [reference.md](reference.md)
    

Available substitution variables

| Variable | Description | |----------|-------------| | $ARGUMENTS | All arguments passed to the skill | | $ARGUMENTS[N] or $N | Specific argument by index (0-based) | | ${CLAUDE_SESSION_ID} | Current session ID |

Dynamic context injection

Use !command`` to run shell commands whose output is injected before Claude sees the skill:

Current branch: !`git branch --show-current`

Step 5 — Confirm the result

After creating the skill, report:

  • The full path to the created SKILL.md
  • The invocation command (e.g. /my-skill)
  • Whether it is global or project-scoped

Quick reference — Minimal example

---
name: greet
description: Greet the user warmly. Use when the user says hello.
---

## Usage

Invoked as: `/greet $ARGUMENTS`

Say hello to the user by name if provided, otherwise just say hello.

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/create-skill-mrwakc4j/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/create-skill-mrwakc4j' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-skill-mrwakc4j/download' --output '.skill-downloads/create-skill-mrwakc4j/SKILL.md.part' && mv '.skill-downloads/create-skill-mrwakc4j/SKILL.md.part' '.skill-downloads/create-skill-mrwakc4j/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.

Original excerpt: Quick reference — Minimal example
---
name: greet
description: Greet the user warmly. Use when the user says hello.
---

## Usage

Invoked as: `/greet $ARGUMENTS`

Say hello to the user by name if provided, otherwise just say hello.

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/create-skill-mrwakc4j/SKILL.md' && test -s '.skill-downloads/create-skill-mrwakc4j/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/create-skill' && cp -R '.skill-downloads/create-skill-mrwakc4j' '.claude/skills/create-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/create-skill-mrwakc4j'

openskills read 'create-skill-mrwakc4j'

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/create-skill-mrwakc4j/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