Mastering
Claude Skills

Context Engineering in Practice

agent37.club

Where We Are in the Stack

Weeks 2-3 gave us the foundation. Now we go deeper.

Skillsreusable context engineering
Tips & Agentsgetting better, open-source agents
Claude Code Internalshow the agent harness works
The Full Stackapplications → materials
Foundation: Context is Everythingtokens, windows, attention

Skills are the missing piece — the way you permanently extend the agent harness without re-explaining yourself every session.

"I keep explaining
the same thing
every conversation."

The real cost: not just your time typing — it's the tokens you waste and the context window space you burn before the model even starts working.

What is a Skill?

A folder that teaches Claude how to do something

A skill is a set of instructions — packaged as a simple folder — that teaches Claude how to handle specific tasks or workflows.

Instead of re-explaining your preferences, processes, and domain expertise in every conversation, you teach Claude once and benefit every time.

your-skill-name/
├── SKILL.md          # Required - main instructions
├── scripts/          # Optional - executable code
│   ├── process.py
│   └── validate.sh
├── references/       # Optional - documentation
│   ├── api-guide.md
│   └── examples/
└── assets/           # Optional - templates, fonts
    └── template.md

Key Properties

  • Portable — works on Claude.ai, Claude Code, and API
  • Composable — multiple skills load simultaneously
  • Progressive — only loads what's needed

Think of it like...

A CLAUDE.md file, but modular, shareable, and with lazy-loading superpowers.

The Kitchen Analogy

MCP + Skills = The Professional Kitchen

MCP (Connectivity)Skills (Knowledge)
Connects Claude to services
(Notion, Linear, GitHub...)
Teaches Claude how to use those services effectively
Provides real-time data access
and tool invocation
Captures workflows and
best practices
What Claude can doHow Claude should do it

MCP = the professional kitchen

Access to tools, ingredients, and equipment.

Skills = the recipes

Step-by-step instructions on how to create something valuable.

Together

Users accomplish complex tasks without figuring out every step themselves.

Part 1

Progressive
Disclosure

The key insight — and why it matters for your token budget

The Three Levels of Progressive Disclosure

Skills don't dump everything into context at once

1

YAML Frontmatter — Always Loaded

Provides just enough info for Claude to know when the skill should be used. Sits in the system prompt at all times. Tiny footprint.

2

SKILL.md Body — Loaded on Match

Full instructions and guidance. Only loaded when Claude decides the skill is relevant to the current task. This is the main payload.

3

Linked Files — Loaded on Demand

Additional files (references/, scripts/, assets/) that Claude can choose to navigate and discover only as needed. Maximum efficiency.

Why this matters: This progressive disclosure minimizes token usage while maintaining specialized expertise. It's the same principle as lazy-loading in web development.

Where Your Tokens Go

The agent harness context window — a finite budget

Without Skills — 200K contextevery conversation
sys
tools
re-explained rules
pasted context
actual work
wasted
With Skills — 200K contextskill handles it
sys
tools
L1
skill loaded
actual work
buffer

Recall: The Agent Harness (Week 2)

Skills fit into the system prompt layer of the agentic loop

// The agentic loop (simplified)
while (!done) {
  // 1. Build the messages array
  messages = [
    system_prompt,          // CLAUDE.md + skills L1
    ...tool_definitions,    // built-in + MCP tools
    ...conversation_history // user + assistant + tools
  ];

  // 2. Call the API
  response = claude(messages);

  // 3. If skill matches → inject L2 content
  if (response.wants_skill) {
    system_prompt += skill.body; // L2 loaded!
  }

  // 4. Execute tool calls
  for (tool of response.tool_calls) {
    result = execute(tool);
    conversation_history.push(result);
  }
}

Where skills live in the harness

  • L1 frontmatter goes into the system prompt from the start
  • L2 body gets injected when triggered
  • L3 files get read via tool calls

Key insight

Skills are not separate from the harness — they are a layer of the harness. Understanding this helps you design better skills.

Part 2

Building Skills

Anatomy, frontmatter, descriptions, and instructions

YAML Frontmatter: The Most Important Part

This is how Claude decides whether to load your skill

The YAML frontmatter appears in Claude's system prompt. It's the first level of progressive disclosure — always present, always evaluated.

---
name: your-skill-name
description: What it does. Use when
  user asks to [specific phrases].
---

# Your Skill Name

## Instructions
... (this is Level 2, loaded later)

That's all you need to start. Everything else is optional.

Field Requirements

FieldRequired?Rules
nameYeskebab-case, no spaces, no capitals
descriptionYesWHAT + WHEN, under 1024 chars
licenseNoMIT, Apache-2.0, etc.
compatibilityNoEnvironment requirements
metadataNoauthor, version, mcp-server

Security Rules

No XML angle brackets (< >) in frontmatter. No "claude" or "anthropic" in the name. Frontmatter goes into the system prompt — malicious content could inject instructions.

Naming: Get It Right or Nothing Works

Three strict rules — no exceptions

SKILL.md Naming

  • Must be exactly SKILL.md (case-sensitive)
  • Not SKILL.MD, skill.md, Skill.md — exactly SKILL.md

Folder Naming

Good: notion-project-setup

Bad: Notion Project Setup (spaces)

Bad: notion_project_setup (underscores)

Bad: NotionProjectSetup (capitals)

No README.md Inside

Don't include a README.md inside your skill folder. All documentation goes in SKILL.md or references/.

(For GitHub distribution, keep README at the repo root — separate from the skill folder.)

Why so strict?

The skill loader is a deterministic file scanner, not an LLM. It looks for exact file names. This is by design — it's fast and reliable, no guessing.

The Description Field: Make or Break

This is the trigger mechanism — get it wrong and your skill never fires

Structure: [What it does] + [When to use it] + [Key capabilities]

Good Descriptions

# Specific and actionable
description: Analyzes Figma design files
and generates developer handoff docs.
Use when user uploads .fig files,
asks for "design specs", "component
documentation", or "design-to-code".
# Includes trigger phrases
description: Manages Linear project
workflows including sprint planning,
task creation. Use when user mentions
"sprint", "Linear tasks", "project
planning", or "create tickets".

Bad Descriptions

# Too vague
description: Helps with projects.
# Missing triggers
description: Creates sophisticated
multi-page documentation systems.
# Too technical, no user phrases
description: Implements the Project
entity model with hierarchical
relationships.

Writing Effective Instructions

The SKILL.md body — what Claude reads when the skill is activated

Recommended Structure

---
name: your-skill
description: [...]
---

# Your Skill Name

## Instructions

### Step 1: [First Major Step]
Clear explanation of what happens.

### Step 2: [Second Step]
Run `python scripts/fetch_data.py
  --project-id PROJECT_ID`
Expected output: [describe success]

## Common Issues

### MCP Connection Failed
If you see "Connection refused":
1. Verify MCP server is running
2. Confirm API key is valid
3. Try reconnecting

Best Practices

Be Specific and Actionable

# Good
Run `python scripts/validate.py
  --input {filename}` to check format.
If validation fails, common issues:
- Missing required fields
- Invalid date formats (use YYYY-MM-DD)

Avoid Ambiguity

# Bad
Validate the data before proceeding.

# Good
CRITICAL: Before calling create_project:
- Project name is non-empty
- At least one team member assigned
- Start date is not in the past

Use bullet points and numbered lists. Keep SKILL.md under 5,000 words. Move detailed docs to references/.

Part 3

Skill Categories
& Patterns

Three categories, five patterns

Three Skill Categories

Most skills fall into one of these buckets

1. Document & Asset Creation

Consistent, high-quality output — presentations, apps, designs, code.

  • Embedded style guides & brand standards
  • Template structures for consistency
  • Quality checklists before finalizing
  • No external tools needed

Example: frontend-design skill

2. Workflow Automation

Multi-step processes with consistent methodology.

  • Step-by-step workflow with gates
  • Templates for common structures
  • Built-in review & improvement
  • Iterative refinement loops

Example: skill-creator skill

3. MCP Enhancement

Workflow guidance on top of MCP tool access.

  • Coordinates multiple MCP calls
  • Embeds domain expertise
  • Provides context users would skip
  • Error handling for MCP issues

Example: sentry-code-review skill

Meta: Our Slides Skill is a Skill!

This very presentation was built using a skill — Category 1: Document & Asset Creation

---
name: slides
description: Create Agent 37 presentation
  slides. Use when building new weekly
  slide decks or editing existing ones.
  Contains the full theme, CSS, JS
  navigation, and conventions.
---

# Agent 37 Slide Builder

You now have the complete system for
building Agent 37 presentation slides.
Every deck must use this theme and
structure exactly.

## File Convention
- One HTML file per session:
  `week{N}-{slug}.html`
- Self-contained — all CSS/JS inline
- Link from README.md sessions table

## Complete CSS
[... full theme CSS ...]

## Complete JS
[... navigation code ...]

What this skill provides

  • Complete CSS theme (warm parchment)
  • JS navigation (keyboard, touch)
  • Footer convention
  • Component patterns (callouts, stacks, demos)
  • Color usage rules
  • Syntax highlighting classes

Without this skill

Every time we build a deck, we'd paste ~300 lines of CSS, explain the footer, explain the naming convention, explain the color system... every single time.

With this skill

We say "build slides for week 5 about skills" and Claude already knows the entire design system. Zero repeated context.

Pattern 1: Sequential Workflow Orchestration

Use when: multi-step processes in a specific order

## Workflow: Onboard New Customer

### Step 1: Create Account
Call MCP tool: `create_customer`
Parameters: name, email, company

### Step 2: Setup Payment
Call MCP tool: `setup_payment_method`
Wait for: payment method verification

### Step 3: Create Subscription
Call MCP tool: `create_subscription`
Parameters: plan_id, customer_id (Step 1)

### Step 4: Send Welcome Email
Call MCP tool: `send_email`
Template: welcome_email_template

Key Techniques

  • Explicit step ordering — no ambiguity
  • Dependencies between steps — "use customer_id from Step 1"
  • Validation at each stage — check before proceeding
  • Rollback instructions — what if Step 3 fails?

Agent Harness Insight

Each step becomes a tool call in the agentic loop. The skill's sequential structure keeps Claude from trying to do steps out of order — which is a common failure mode without skills.

Pattern 2: Multi-MCP Coordination

Use when: workflows span multiple services

### Phase 1: Design Export (Figma MCP)
1. Export design assets from Figma
2. Generate design specifications
3. Create asset manifest

### Phase 2: Asset Storage (Drive MCP)
1. Create project folder in Drive
2. Upload all assets
3. Generate shareable links

### Phase 3: Task Creation (Linear MCP)
1. Create development tasks
2. Attach asset links to tasks
3. Assign to engineering team

### Phase 4: Notification (Slack MCP)
1. Post handoff summary to #engineering
2. Include asset links and task refs

Key Techniques

  • Clear phase separation — one MCP per phase
  • Data passing between MCPs — links from Phase 2 go to Phase 3
  • Validation before moving on
  • Centralized error handling

Context Window Impact

Each MCP call result stays in context. A 4-phase workflow with 3 calls each = 12 tool results in the window. Without skill guidance, Claude might make 20+ exploratory calls instead. Skills reduce total tool calls by providing the exact sequence.

Pattern 3: Iterative Refinement

Use when: output quality improves with iteration

## Iterative Report Creation

### Initial Draft
1. Fetch data via MCP
2. Generate first draft report
3. Save to temporary file

### Quality Check
1. Run validation script:
   `scripts/check_report.py`
2. Identify issues:
   - Missing sections
   - Inconsistent formatting
   - Data validation errors

### Refinement Loop
1. Address each identified issue
2. Regenerate affected sections
3. Re-validate
4. Repeat until quality threshold met

### Finalization
1. Apply final formatting
2. Generate summary
3. Save final version

Key Techniques

  • Explicit quality criteria
  • Iterative improvement
  • Validation scripts (bundled in skills/scripts/)
  • Know when to stop iterating

Token Efficiency Tip

Use scripts/ for validation instead of asking Claude to check things in natural language. Code is deterministic; language interpretation isn't. A 10-line Python script costs zero tokens vs. Claude reasoning about quality for 500+ tokens each loop.

Patterns 4 & 5

Pattern 4: Context-Aware Tool Selection

Use when: same outcome, different tools depending on context.

## Smart File Storage

### Decision Tree
1. Check file type and size
2. Determine best storage:
   - Large (>10MB): cloud storage MCP
   - Collaborative: Notion/Docs MCP
   - Code files: GitHub MCP
   - Temporary: local storage

### Execute Storage
- Call appropriate MCP tool
- Apply service-specific metadata

### Provide Context to User
Explain why that storage was chosen

Key: clear decision criteria, fallback options, transparency.

Pattern 5: Domain-Specific Intelligence

Use when: your skill adds specialized knowledge beyond tool access.

## Payment Processing w/ Compliance

### Before Processing (Compliance Check)
1. Fetch transaction details via MCP
2. Apply compliance rules:
   - Check sanctions lists
   - Verify jurisdiction allowances
   - Assess risk level
3. Document compliance decision

### Processing
IF compliance passed:
  - Call payment processing MCP tool
  - Apply fraud checks
ELSE:
  - Flag for review
  - Create compliance case

Key: domain expertise embedded in logic, compliance before action.

Problem-First vs. Tool-First

Which framing fits your use case?

Problem-First

"I need to set up a project workspace"

  • Users describe outcomes
  • Skill handles which tools to use
  • Skill orchestrates the right MCP calls in the right sequence

Like walking into Home Depot: "I need to fix a kitchen cabinet" — the employee points you to the right tools.

Tool-First

"I have Notion MCP connected — what can I do?"

  • Users already have access
  • Skill provides best practices
  • Skill teaches Claude optimal workflows for that tool

Like picking out a new drill and asking how to use it for your specific job.

Most skills lean one direction. Knowing which framing fits helps you write better descriptions and instructions.

Part 4

Testing &
Iteration

Make it work, make it trigger, make it efficient

Three Testing Approaches

Choose based on your quality requirements and scale

Manual Testing

Run queries in Claude.ai directly. Fast iteration, no setup.

Best for: personal skills, early development

Scripted Testing

Automate test cases in Claude Code for repeatable validation.

Best for: team skills, iterating on triggers

Programmatic (API)

Build evaluation suites via skills API. Systematic testing at scale.

Best for: production skills, enterprise

Pro Tip: Iterate on a single task before expanding

The most effective skill creators iterate on a single challenging task until Claude succeeds, then extract the winning approach into a skill. This leverages Claude's in-context learning and provides faster signal than broad testing.

Testing: Triggers

Goal: ensure your skill loads at the right times — and only then

Should Trigger

Should trigger:
- "Help me set up a new ProjectHub
   workspace"
- "I need to create a project in
   ProjectHub"
- "Initialize a ProjectHub project
   for Q4 planning"

Should NOT Trigger

Should NOT trigger:
- "What's the weather in San Francisco?"
- "Help me write Python code"
- "Create a spreadsheet"
  (unless your skill handles sheets)

Quantitative Metrics

MetricTarget
Triggers on relevant queries90%+
Completes workflow in X tool callsMeasure
Failed API calls per workflow0

Qualitative Metrics

SignalCheck
Users don't need to re-promptObserve
Workflows complete without correctionRun 3-5x
Consistent results across sessionsCompare

Performance: With vs. Without Skills

Measuring the impact on your agent interactions

Without Skill

Messages
15 back-and-forth
Failed calls
3 retries
Tokens used
12,000
User effort
Provide instructions each time

With Skill

Messages
2 clarifying Qs
Failed calls
0
Tokens used
6,000
User effort
Auto

50% fewer tokens, 87% fewer messages, zero failures. Skills don't just save time — they save money and produce better results.

Iteration Based on Feedback

Skills are living documents — tune based on signals

Under-triggering Signals

  • Skill doesn't load when it should
  • Users manually enabling it
  • Support questions: "when do I use this?"

Fix: Add more detail and nuance to the description. Include keywords and trigger phrases users actually say.

Over-triggering Signals

  • Skill loads for irrelevant queries
  • Users disabling it
  • Confusion about purpose

Fix: Add negative triggers, be more specific about scope.

description: Advanced data analysis for
CSV files. Use for statistical modeling,
regression, clustering.
Do NOT use for simple data exploration
(use data-viz skill instead).

Debugging Tip

Ask Claude: "When would you use the [skill name] skill?" Claude will quote the description back. Adjust based on what's missing.

Part 5

Distribution
& Sharing

From personal use to org-wide deployment

How Skills Get Distributed

Multiple paths from personal to enterprise

Individual Users

1. Download the skill folder
2. Zip the folder (if needed)
3. Upload via Claude.ai Settings > Capabilities > Skills
4. Or place in Claude Code skills directory

Organization Level

  • Admins deploy skills workspace-wide
  • Automatic updates for all users
  • Centralized management

Open Standard

Skills are published as an open standard (Agent Skills). The same skill should work across Claude or other AI platforms that adopt the standard.

Recommended Approach

  1. Host on GitHub with clear README
  2. Document in your MCP repo (if applicable)
  3. Create an installation guide

Positioning Tip

Focus on outcomes, not features.

# Good
"Set up complete project workspaces in
seconds — including pages, databases,
and templates."

# Bad
"A folder containing YAML frontmatter
and Markdown instructions."

Skills via the API

For programmatic use — agents, pipelines, production apps

// Key capabilities

// 1. List and manage skills
GET /v1/skills

// 2. Add skills to messages
POST /v1/messages
{
  "model": "claude-opus-4-6",
  "system": "...",
  "messages": [...],
  "container.skills": [
    "my-skill-id"
  ]
}

// 3. Version control via Console
// 4. Works with Agent SDK
Use CaseBest Surface
End users interacting directlyClaude.ai / Code
Manual testing & iterationClaude.ai / Code
Individual ad-hoc workflowsClaude.ai / Code
Applications using skills programmaticallyAPI
Production deployments at scaleAPI
Automated pipelines & agentsAPI

Note

Skills in the API require the Code Execution Tool beta, which provides the secure environment skills need to run.

Part 6

Troubleshooting
& Context
Management

When things go wrong — and how to fix them

Troubleshooting: Common Errors

"Could not find SKILL.md"

File not named exactly SKILL.md (case-sensitive)

Fix: Rename. Verify with ls -la

"Invalid frontmatter"

YAML formatting issue

# Wrong - missing delimiters
name: my-skill
description: Does things

# Correct
---
name: my-skill
description: Does things
---

"Invalid skill name"

Name has spaces or capitals

# Wrong
name: My Cool Skill

# Correct
name: my-cool-skill

Skill doesn't trigger

Description too generic or missing trigger phrases.

Quick checklist:

  • Is it too generic? ("Helps with projects" won't work)
  • Does it include phrases users actually say?
  • Does it mention relevant file types?

Instructions not followed

Common causes:

  • Too verbose — keep instructions concise
  • Buried — put critical rules at the top
  • Ambiguous — "validate properly" vs specific checks
  • Model laziness — add explicit encouragement

MCP calls fail

1. Verify server connected   2. Check auth   3. Test MCP independently   4. Verify tool names (case-sensitive)

Large Context Issues

When skills make things worse instead of better

Symptom: Skill seems slow or responses are degraded

Causes:

  • Skill content too large (SKILL.md is a novel)
  • Too many skills enabled simultaneously
  • All content loaded instead of progressive disclosure

Solutions

1. Optimize SKILL.md size

  • Move detailed docs to references/
  • Link to references instead of inlining
  • Keep SKILL.md under 5,000 words

2. Reduce enabled skills

  • Evaluate if you have >20 skills enabled
  • Recommend selective enablement
  • Consider skill "packs" for related capabilities

The Math: Why This Matters

10 skills, 5K words each
~67K tokens (skills)
133K remaining
10 skills, progressive disclosure
L1
1 skill L2
186K remaining

With naive loading: 33% of your window gone on skills alone.

With progressive disclosure: only 5% used, and only for the relevant skill.

This is why the three-level system exists. It's not just convenience — it's critical for context window health.

The Agent Harness View

How skills fit into the full system (putting it all together)

User Message "Build me a slide deck about skills"
System Prompt + Skill L1 Frontmatters ~500-1000 tokens, always present
Skill Match → L2 Body Injected slides skill body loaded (~2K tokens)
Tool Calls (Read, Write, Glob, Bash) agent reads templates, writes HTML
L3 References (on demand) only if agent needs api-guide.md, etc.

The key takeaway

Skills are not "add-ons" to the agent — they are a context management strategy. They solve the fundamental problem of agent harnesses: how to give the model the right knowledge at the right time without wasting the finite context window.

Context Management: The Complete Picture

From Week 2 harness design to Week 5 skills — the full toolkit

Strategy What It Does Token Impact From
Skills (Progressive Disclosure) Load knowledge only when needed Saves 20-60% of context Week 5
CLAUDE.md Persistent project-level instructions Always present (~200-500 tokens) Week 3
System Reminders Re-inject objectives every turn Small per-turn cost, high ROI Week 3
Todo Lists Attention manipulation — keep model on track Small cost, prevents drift Week 3
Compaction Compress old context into summaries Reclaims 40-70% of used space Week 2
Fresh Sessions Start over when context is poisoned 100% reclaim (lose history) Week 3
Sub-agents (Task tool) Isolate expensive operations in child contexts Protects parent window Week 2

Skills are the proactive strategy — you design the knowledge structure before conversations happen. Everything else is reactive — managing context during conversations.

Quick Checklist

Validate your skill before and after upload

Before You Start

  • Identified 2-3 concrete use cases
  • Tools identified (built-in or MCP?)
  • Reviewed this guide and example skills
  • Planned folder structure

During Development

  • Folder named in kebab-case
  • SKILL.md file exists (exact spelling)
  • YAML frontmatter has --- delimiters
  • name field: kebab-case, no spaces, no capitals
  • description includes WHAT and WHEN
  • No XML tags anywhere
  • Instructions are clear and actionable
  • Error handling included
  • Examples provided
  • References clearly linked

Before Upload

  • Tested triggering on obvious tasks
  • Tested triggering on paraphrased requests
  • Verified doesn't trigger on unrelated topics
  • Functional tests pass
  • Tool integration works (if applicable)
  • Compressed as .zip file

After Upload

  • Test in real conversations
  • Monitor for under/over-triggering
  • Collect user feedback
  • Iterate on description and instructions
  • Update version in metadata

Skills =
Reusable Context
Engineering

Teach Claude once. Benefit every conversation.
Save tokens. Get consistent results. Share with your team.

Resources:

  • Anthropic Skills Guide (the PDF we covered today)
  • GitHub: anthropics/skills — example skills to customize
  • skill-creator skill — built into Claude.ai & Claude Code
  • Claude Developers Discord — community support

agent37.club