A2X← Back to A2XWorkshop resource

FORGE.

Build your first Claude Code skill — companion to STRATA
1Location
2Name
3Description
4Live context
5Instructions
6Ship it
Step 1 · where it lives

Decide who gets the skill.

We're building a real, useful skill: it summarizes your uncommitted git changes and flags anything risky. First decision — where the folder lives, which decides who can use it.

why this matters

A skill is found purely by where its folder sits. Same file, different location → different audience. Nothing else changes.

Step 2 · the name is the command

Name the folder, name the command.

The directory name becomes the slash command you type. In Claude Code the name field is optional — leave it out and the folder name is used, so the two stay in sync automatically.

✓ valid — invoke it with /summarize-changes
rules

Lowercase letters, numbers, and hyphens only · max 64 characters · no "claude" or "anthropic". Watch the live file on the right update as you type.

Step 3 · the matchmaker

The description is everything.

This one line is what Claude reads to decide "is this request my job?" Edit it below and watch the sample requests light up. Vague text matches nothing; specific "use when…" text fires reliably.

would Claude reach for it? · sample requests
Simplified for teaching — real matching is semantic, not literal keyword overlap. But the lesson holds: name the trigger words and use cases your users will actually say.
Step 4 · dynamic context injection

Feed it real data, before Claude reads it.

A line beginning with !`…` is a shell command Claude Code runs before Claude ever sees the file. The output replaces the line — so the skill arrives with your actual diff already inside it, not a guess.

Inject the live git diff
Adds !`git diff HEAD` so the summary is grounded in your real working tree.
it's preprocessing, not a tool call

Claude doesn't execute this line — Claude Code does, up front, and splices the output in. By the time Claude reads the skill, it just sees the diff as plain text. Toggle it off and the skill would have to ask for the diff itself.

Step 5 · the body + who can invoke it

Tell it what to do.

Everything below the frontmatter is the instruction Claude follows once the skill loads. Keep it tight — this text stays in context for the whole session.

Who can invoke it?

Let Claude auto-invoke
On: Claude fires it on its own when a request matches. Off: adds disable-model-invocation: true — only you can run it with /name.
rule of thumb

Auto-invoke for read-only helpers like this one. Turn it off for anything with side effects — /deploy, /commit, /send-message — where you want to control the timing.

Step 6 · ship it

Your skill is ready.

▣ That's a complete, working skill.

The file on the right is the whole thing. Two commands create it; then it's live in your next Claude Code session.

1 · Create it

terminal

2 · Test it

Open Claude Code in a git repo, make an edit, then either ask naturally or invoke it directly:

try a request
live reload

Edits to ~/.claude/skills/ or a project's .claude/skills/ take effect within the running session — no restart. Only creating a brand-new top-level skills folder needs a restart.

SKILL.md~/.claude/skills/summarize-changes/

    
Edit the steps and this file rebuilds itself. Everything you choose lands here.