Single logo
  • Courses
  • Blog
  • About
Join on SkoolJoin on Skool

In this topic

Claude
  • CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages
  • Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It
  • One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI
  • Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges
  • Hooks That Block Destructive Actions: a PreToolUse Gate That Allows, Asks or Denies
  • Choosing a Claude Code Extension: Skill, Hook, Rules File, Subagent, Slash Command or Plugin
  • Rolling Out Claude Code to a Team: Settings Precedence, dontAsk in CI, a Hook for Every-Time Rules and a Plugin for Five Repos
  • A Claude Code Review Bot in CI: Headless -p, JSON Findings, Team Rules in Git and a Person on the Merge
  • Lab: Three Planted Bugs in a Claude Code CI Repo, a Permission Mode, a Plugin Path and an MCP Token Variable
  • Configuring MCP Servers in Claude Code: A Command or a URL, Three Scopes, and Three Moves When One Breaks
  • The Claude Messages API: Your First Call, Field by Field
  • Claude Tool Use: How tool_use and tool_result Work in the Messages API
  • Claude Client SDKs Wrap One REST API: Raw HTTP, Python, TypeScript and Async Calls Compared
  • Anthropic SDK Timeouts, Retries and Error Classes: Configure the Client Once, Then Give 429, 529, 400 and Timeouts Their Own Move
  • Claude Streaming Events: The Event Order, message_stop, Tool Arguments, Stop Reasons and a WebSocket Relay
  • Images, PDFs and Thinking Blocks in the Claude Messages API: Typed Blocks In, Typed Blocks Out
  • Getting Data Into Claude: PDF Documents, the Files API, Search Results and Citations
  • Opus, Sonnet or Haiku: Pick the Claude Model per Job, and Test the Request When a New Release Arrives
  • Adaptive Thinking and Effort in Claude: Two Dials, Set per Workload, and the Thinking Block You Must Pass Back
  • Claude Cost Tracking From usage: Count Before, Cap During, Read After, Then Find the Line That Drives the Bill
  • Claude Cache Breakpoints: Where to Put cache_control, How to Move It With the Chat, and Why the Reads Stay at Zero
  • Claude Message Batches or Real Time: Choose by Who Is Waiting, Match by custom_id, Resend Only the Failures
  • Calling Claude Through Amazon Bedrock, Google Cloud and Microsoft Foundry: Same Call, Different Door
  • The Life Cycle of a Claude App: Six Phases, a Model That Retires, and a Release Gate for Every Change
  • Pinning Claude Model IDs and Upgrading Safely: One Change at a Time, a Golden-Set Replay and a Staged Rollout
  • Content Boundaries and Schema Design for Claude: Fence the Input in a Tag, Let the Output Say I Don't Know
  • The Agentic Loop and stop_reason: Keep Turning on tool_use, Stop on end_turn, Cap the Turns
  • The Claude Agent SDK: query(), ClaudeAgentOptions and @tool, in Python and TypeScript
  • Fix the Agent: Four Broken Claude Agent SDK Configs, From the Symptom to the One Wrong Line
  • Claude Managed Agents: Cloud Sandbox, Self-Hosted Sandbox or Self-Hosted Service
  • Agent SDK Hooks for Deterministic Actions: PreToolUse, PostToolUse, and Four Hooks That Fail Silently
  • Memory and Context-Window Patterns for Claude Agents: Context Editing, Compaction and the Memory Tool
  • Reading an Agent Trace: Five Signatures, Five Missing Patterns, and How Long a Fact Must Live
  • Tool Descriptions for Claude: How Claude Picks a Tool, and How to Stop It Picking the Wrong One
  • Tool Input Schemas and Error Responses for Claude: Required Fields, Enums, is_error and a Retry Flag
  • Tool Response Shaping and a Lean Tool Set: Give Claude a Sticky Note, Not the Filing Cabinet
  • Fix the Tool Schema: Read the Trace, Fix the Card, Re-Run (Four Real Schema Bugs)
  • Client Tools, Server Tools and Approval Gates: Who Runs the Tool, and Who Says Yes First
  • Built-in Tool, Custom Tool, Skill or MCP Server? Pick the Lightest One That Fits
  • System Prompt or User Turn: Where Each Instruction Goes, and Output Limits Your Code Enforces
  • Refine the Prompt One Line at a Time, Then Clean and Fence the Customer's Text
  • Prompt Revision Driven by Evals: Name the Cause, Change One Thing, Rerun the Whole Suite
  • Long-Running Sessions: Compact, Prune, Isolate or Start Fresh, Decided by Naming the Failure
  • Context Isolation Through Subagents: Read the Logs Elsewhere, Keep One Line
  • Defensive Parsing of Claude Replies: Check the Stop Reason, Read the Block or the Text, Then Validate the Values
  • Full Context or Retrieval: Choose by Corpus Size, Cost and Freshness
  • Skepticism Toward Confident Output: Check the Quote, the Record and the Sum Before You Send
  • Debugging a Claude App: Three Error Types, the Recovery Each One Earns, and the First Failing Row
  • Six Ways a 200 Can Still Be Wrong: Hallucination, Refusal, Under-Acting, Context Loss, Format Drift and Inconsistency
  • Fix the Cause, Not the Symptom: Four Recovery Drills for an LLM App, Each Checked on a New Input
  • Integration Layer or Model Output? Three Taps and Three Questions to Find Where a Wrong Answer Lives
  • Which Test Layer Owns the Failure? Unit, Functional, Integration and End-to-End Tests for a Claude App
  • Designing an Overnight Document Pipeline on Claude: Batch Lane, Live Lane, a Cached Prefix and a custom_id Reconcile
  • Proving a Model Upgrade Is Ready: A Frozen Golden Set, a Calibrated Judge, the Right Layer and a Release Gate
  • From Requirement to Design for a Claude App: Eight Requirements, Five Elements and a Trace With No Gaps
  • Build a Claude Refund App: the Messages API, Two Tools, an MCP Server and a Hook in One Loop
  • Ship a Claude App: an Eval Gate, Two Guardrail Layers, a Cost Check From usage and a Pinned Model
  • Lab: a 30-Case Golden Set, a Calibrated Judge and a Per-Slice CI Gate on a Claude Refund App
  • Lab: Cut a Claude App's Bill by 62 Percent With Usage Data, Layered Cache Breakpoints and a Batch Job
  • Lab: Three Planted Bugs in a Claude App, a Vague Prompt, a Mistyped Tool Schema and a Broken Stream Handler
  • Lab: Three Planted Bugs in a Claude Code CI Repo, a Permission Mode, a Plugin Path and an MCP Token Variable
  • Lab: Harden a Claude App, an Uncalibrated Judge, a Retry Loop That Retries Everything and a Hook Matcher With a Gap
  • Lab: Turn a Claude App Into a Reusable Template, One Pinned Model Id, No Key in Code and Evals Built From Data
  • Building an MCP Server: Tools, Resources and Prompts in Python and TypeScript
  • MCP Transports: stdio or Streamable HTTP, and Who Starts the Server
  • Deploying and Authenticating an MCP Server: Environment Keys for stdio, Bearer Tokens and Scopes for HTTP
  1. Blog
  2. /
  3. Claude
  4. /
  5. Claude Code

Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It

Pack a support team's ticket-triage routine into one skill folder, then watch three requests load one, two or all three levels: the catalog, the SKILL.md body, and a script whose code never enters the context.

Chaand Sheikh

·27 November 2026Claude Code

What you will learn

  • Lay out a skill folder with SKILL.md, a script and a reference file
  • Write name and description frontmatter that passes the rules and triggers at the right time
  • Explain the three levels of progressive disclosure and what each request loads
  • Choose where a skill lives: project, personal or inside a plugin

Before you start

  • CLAUDE.md, settings.json and plugins
  • Basic Python

A support team sorts tickets every day with the same three steps. On Monday someone pastes those steps into a chat. On Tuesday, again. By Friday someone forgets a step. Copy and paste is slow, and the steps drift.

A skill fixes that. You pack the job once into a folder with a SKILL.md and a script, and Claude loads it when a request fits. The idea that makes it cheap is called progressive disclosure.

A cookbook on a shelf

Think of cookbooks on a shelf.

  • The spine: a title and one line, always visible. That's the skill's name and description.
  • The recipe: you open it only when you pick that book. That's the body of SKILL.md.
  • The pantry: tools you fetch only when a step asks for them. Those are the scripts and reference files.

Many skills can sit on the shelf. Only the one you pick gets opened.

Progressive disclosure in three levels Level 1: always name + description of every skill ticket-triage: 122 chars release-notes: 130 chars catalog: 287 chars Level 2: on trigger the SKILL.md body of the chosen skill ticket-triage body: 344 chars Level 3: as needed scripts and files priority.py runs: 610 chars of code stay out 1 output line comes in
Claude sees the names first. The rest comes in only when it's needed. Character counts are from the project's own files.

One folder per skill, three homes

Each skill is a folder with a SKILL.md inside. Claude Code reads skills from three places:

HomePathWho gets it
Project.claude/skills/<name>/SKILL.mdCommit it and the whole team gets it
Personal~/.claude/skills/<name>/SKILL.mdYou, in every project on that machine
Pluginthe plugin's own skills/ folderEveryone who installs the plugin; called with the plugin name in front

claude.ai and the API keep their own skills, separate from the folders Claude Code reads.

Our project has two skills:

.claude/skills/
  ticket-triage/
    SKILL.md
    priority_rules.md
    scripts/priority.py
  release-notes/
    SKILL.md

SKILL.md

---
name: ticket-triage
description: >-
  Sort a support ticket into a priority and a queue. Use when the user
  asks to triage, prioritise or route a support ticket.
---

# Ticket triage

Give every ticket one priority and one queue.

## Steps

1. Read the ticket text.
2. Run `python scripts/priority.py "<ticket text>"`.
3. Reply with the ticket id, the priority and the queue.

## Rules

For the full priority table, read [priority_rules.md](priority_rules.md).
Only open it when the script's answer looks wrong.
  • Frontmatter sits between the two --- lines: a name and a description.
  • The body below it loads only when the skill triggers.
  • A step can run a script, here scripts/priority.py.
  • It can point to a reference file, which Claude opens only if it needs it.

Two fields, and one trigger

  • name: lowercase letters, numbers and hyphens, 64 characters at most.
  • description: must not be empty, 1024 characters at most. It should say what the skill does and when to use it.

Compare a weak description, "Helps with tickets", with ours. The weak one doesn't say what it does or when it should fire, so Claude has nothing to match against. Ours says both. The description is what Claude matches your request against.

A skill loads in two ways: Claude loads it when the request fits, or you type /ticket-triage yourself. Set disable-model-invocation: true in the frontmatter and Claude won't load it on its own; only you can call it.

The script: rules in code

"""Pick a priority and a queue for one ticket. Prints a single line."""
import re
import sys

RULES = [("P1", "urgent", ("cannot log in", "outage", "down")),
         ("P2", "billing", ("refund", "invoice"))]


def triage(text):
    low = text.lower()
    for priority, queue, words in RULES:
        if any(w in low for w in words):
            return priority, queue
    return "P3", "general"


if __name__ == "__main__":
    text = " ".join(sys.argv[1:])
    ticket = re.search(r"T-\d+", text)
    priority, queue = triage(text)
    print(f"{ticket.group() if ticket else 'T-?'} {priority} queue={queue}")

The rules live in code, so they're the same every time. The script prints one line, and that one line is all Claude sees.

A loader that shows the levels: skill_loader.py

The project models the three levels in plain Python:

def catalog():
    """Level 1: only name and description of every skill."""
    folders = [f for f in sorted(SKILLS.iterdir()) if f.is_dir()]
    return {f.name: read_skill(f)[0] for f in folders}


def load_body(name):
    """Level 2: the SKILL.md body, read once the skill is chosen."""
    return read_skill(SKILLS / name)[1]


def run_script(name, script, arg):
    """Level 3: run the script. Only its printed output comes back."""
    path = SKILLS / name / "scripts" / script
    done = subprocess.run([sys.executable, str(path), arg],
                          capture_output=True, text=True, check=True)
    return done.stdout.strip(), len(path.read_text(encoding="utf-8"))


def lint(fields):
    """The frontmatter rules from the Agent Skills docs."""
    problems = []
    if not NAME_OK.match(fields.get("name", "")):
        problems.append("name: lowercase letters, numbers, hyphens, 64 max")
    if not fields.get("description"):
        problems.append("description: must not be empty")
    elif len(fields["description"]) > 1024:
        problems.append("description: 1024 characters max")
    return problems

Three requests, one folder

run_all.py puts the catalog in the system prompt and sends three requests. The model is a stand-in (the Anthropic SDK on an httpx mock transport, no API key): its replies are scripted, and it picks a skill by counting words shared with each description. A real model judges by meaning. Here is the real output:

level 1: name and description of every skill
release-notes  description 130 chars
ticket-triage  description 122 chars
system prompt carries 287 chars for 2 skills

request 1: Please triage support ticket T-201: customer cannot log in
  test model reply: use skill ticket-triage
  level 2: SKILL.md body 344 chars
  level 3: priority.py ran, 610 chars of code stay out
  level 3: output T-201 P1 queue=urgent

request 2: Draft release notes for version 3.2
  test model reply: use skill release-notes
  level 2: SKILL.md body 184 chars

request 3: What is the capital of France?
  test model reply: no skill needed
  loaded: level 1 only

frontmatter check
release-notes  ok
ticket-triage  ok
Ticket Triage  name: lowercase letters, numbers, hyphens, 64 max
Ticket Triage  description: must not be empty
  • Request 1 matches ticket-triage: the body loads, then the script runs. All three levels. The 610 characters of priority.py never enter the context; one output line does.
  • Request 2 matches release-notes: the body loads, and there's no script. Two levels.
  • Request 3 matches nothing, so only the 287-character catalog is in context. One level.
  • The check rejects a name with capitals and a space, and an empty description.

Common mistakes

  • Pasting the steps into every chat. Slow, and the steps drift. Write the skill once.
  • A vague description. "Helps with tickets" gives Claude nothing to match, so the skill fires at the wrong time or not at all.
  • One huge SKILL.md. Everything loads at once when it triggers. Keep the body short and move tables and long rules into files the body points to.
  • Rules in prose that a script should own. If the answer must be the same every time, put it in code and let only the output come back.

To decide whether a job wants a skill, a hook, a subagent or a plugin, see Choosing a Claude Code Extension. To ship a skill to a team inside a plugin, see CLAUDE.md, settings.json and Plugins.

Quick recap

LevelWhat loadsWhen
1name and descriptionAlways, for every skill
2The SKILL.md bodyWhen the skill triggers
3Scripts (output only) and reference filesAs a step needs them

Try it yourself

Add a third skill, refund-check, with the description "Check whether an order can be refunded. Use when the user asks if an order is refundable." Run the three requests again. How many characters does the catalog carry now, and does any request change its level?

Tried the exercise? Share your answer or ask a question.

The StudyEasy AI Community is free to join, with the lesson files, notebooks and code.

Join free on Skool

Keep going in Claude · 2 of 66

Previous
CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages
Next post
One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI

Related course on Udemy

Claude Certified Developer - Foundations (CCDV-F) Exam Prep

Build and ship Claude apps: the API, agents, tools and MCP, prompts, evals, security and model choice.View on Udemy ↗: Claude Certified Developer - Foundations (CCDV-F) Exam Prep (paid course, opens in a new tab)

Related posts

CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages

Three needs in one repo: a test command, a rule that Claude must never read .env, and a shared deploy skill. See which file each belongs in, how the settings layers merge, and what a plugin manifest carries.

One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI

Change one line in a repo and ask where it lands. A small resolver for bookshop-bot shows that a new model id in settings.json reaches only CI, a prompt bump reaches dev and CI, and a prod block edit reaches only prod.

Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges

Follow one prompt edit from a branch to a merge: version prompts and the model pin like code, keep the API key in GitHub Secrets, gate changes by path, let Claude review the diff, and leave the merge to a person.

Hooks That Block Destructive Actions: a PreToolUse Gate That Allows, Asks or Denies

A coding agent is told to clean up the data folder and picks rm -rf data/. A PreToolUse hook sees the call before the tool runs: tests and single-file deletes pass, a force push asks a person, and rm -rf, DROP TABLE and a write to .env are denied with a reason.

On this page

  • A cookbook on a shelf
  • One folder per skill, three homes
  • SKILL.md
  • Two fields, and one trigger
  • The script: rules in code
  • A loader that shows the levels: skill_loader.py
  • Three requests, one folder
  • Common mistakes
  • Quick recap
  • Try it yourself
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

Claude Certified Developer - Foundations (CCDV-F) Exam Prep

Build and ship Claude apps: the API, agents, tools and MCP, prompts, evals, security and model choice.View on Udemy ↗: Claude Certified Developer - Foundations (CCDV-F) Exam Prep (paid course, opens in a new tab)

Single logo

Empowering Education, One Course at a Time

About
About usContact usFAQs
Legal
Terms of ServicePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.