PostsClaude Code Agent Skills

Claude Code Agent Skills

A Claude Code skill isn't a markdown file — it's a directory: a knowledge package the model loads only when it needs it. That one idea, progressive disclosure, is why skills scale where stuffed prompts rot.

Apr 12, 20268 min read1,700 words
Hung Le
Hung Le
AI Systems Builder · Mobile Developer
  • agent-skills
  • claude
  • context-engineering
Claude Code Agent Skills
This is a condensed blog version — read the full, more detailed guide on GitHub ↗
On this page

The most common misconception is that a skill is "a markdown file with instructions." It isn't. A skill is a directory — a package of guides, scripts, templates, and data that Claude discovers gradually instead of cramming into the prompt.

#It's a directory, not a file

The old way dumps every instruction into the prompt — wasting tokens and inviting the model to forget. The skills approach loads a tiny bit of metadata up front and reads the full content only when the task actually needs it.

text
my-skill/
├── SKILL.md        # frontmatter (name + description) + the guide
├── references/     # docs read only when needed
├── scripts/        # runnable code — output enters context, not the code
├── assets/         # templates, images
└── examples/

#Progressive disclosure

Information loads in three levels, so the context window only ever holds what the current step requires:

LevelWhat loadsCost
1 — MetadataName + description~100 tokens / skill
2 — SKILL.md bodyWorkflow, constraints, gotchasunder ~5,000 tokens
3 — ResourcesScripts, templates, references~0 idle; only output enters context

#Why it matters

The context window is a shared resource — every token you embed competes with conversation history and the model's reasoning space. LLMs suffer "context rot": quality degrades as length grows, because attention has to weigh every pair of tokens.

The payoff is measurable

Anthropic reports that proper context engineering improved benchmark performance by ~54% and cut token consumption by ~84% over 100 iterations. Loading less, at the right time, is not a micro-optimization — it changes the result.

#Nine categories

Anthropic groups its internal skills into nine kinds (guidance, not rules): library/API reference, product verification, data fetching & analysis, business process, code scaffolding, code quality & review, CI/CD & deployment, runbooks, and infrastructure ops.

The golden rule

The most effective skills teach Claude things it doesn't already know — your internal APIs, team processes, deployment steps. Don't spend a skill re-teaching general knowledge the model already has from training.

#Writing a good skill

  • The description is a trigger, not a summary. Say when to activate. Tuned descriptions lift activation rates dramatically (roughly 20% → 50%, and up to ~90% with examples).
  • The Gotchas section is the most valuable part. List the failure points that push the model off its defaults, and keep updating them.
  • Treat the file system as context engineering. Split references into separate files the model reads only when needed.
  • Package scripts ahead of time. Claude composes existing scripts rather than writing them from scratch, and the code never enters context — only its output.
  • Don't railroad. A skill is reused many times; give enough information but leave room to adapt.
text
# description: trigger vs summary
Poor:  "I help with Excel."
Good:  "Handle Excel files and create reports. Activate when the
        user asks about spreadsheet data, CSV analysis, or tabular output."

#A skill in action

Take a standup-post skill. Progressive disclosure plays out in three steps:

  1. Claude scans metadata and recognizes the skill (~100 tokens).
  2. You ask for a standup; it reads the SKILL.md body — procedure, format, gotchas (~2,000 tokens).
  3. It runs scripts/fetch_activity.py to pull GitHub PRs and Jira tickets and compares against a log — only the output enters context.

One /standup-post command synthesizes multi-source activity into a consistent, formatted update.

#Ecosystem & a quality warning

There are 60K+ skills on GitHub, and quality varies wildly. One evaluator tested 47 popular skills and found 40 produced worse output than vanilla Claude Code — mostly shallow prompt wrappers that add latency without value.

Don't install on vibes

A skill can make Claude worse. Prefer verified sources — Anthropic's own frontend-design and skill-creator, the Plugin Marketplace, or anthropics/skills — over a random repo with a catchy README.

#Start in five minutes

Create a directory, write a SKILL.md with frontmatter, and invoke it:

bash
mkdir -p .claude/skills/my-first-skill
markdown
---
name: my-first-skill
description: "Describe WHEN TO TRIGGER, not a summary.
  e.g. Use when the user asks to do X, Y, or Z."
---
 
# Main guidance (keep under ~5,000 tokens)
 
Procedure:
1. ...
2. ...
 
## Gotchas
- Common pitfall #1
- Common pitfall #2
 
## References
See references/api-docs.md for details.

Or skip the boilerplate: run /skill-creator, the meta-skill that drafts a skill, optimizes the description, and evaluates its trigger rate for you.

References

  1. Anthropic — Agent Skills documentation — docs.claude.com
  2. Anthropic Engineering — Effective context engineering for AI agents — anthropic.com
  3. Agent Skills open standard & spec — agentskills.io

Hung Le

Hung Le

AI Systems Builder · Mobile Developer

I build AI systems that can be reused, scaled, and shared — turning messy experimentation into structured workflows and skill libraries. From Da Nang, Vietnam.

GitHub@hungledn10
←NewerAI Personal Preferences
© 2026 Hung Le. All Rights Reserved.