Skip to content
Mia Automation
NLEN Sign in Put Mia to workGet started

Claude Code Skills: How to Build, Install and Test a Skill

A Claude Code skill is a folder under .claude/skills containing a SKILL.md file. Claude Code reads only its short description and loads the rest when your request matches. Below we build one that checks CSV exports with a small script. In our test it loaded for a question about importing a customer file and stayed out of the way when we asked for a bakery tagline.

Claude in practiceUpdated 6 min read

Tested by us on 11 November 2026.

Animated diagram in four steps: a request about importing customers.csv, the csv-check skill matches, the check.py script runs, and the report lists 4 issues in 3 rows

Where Claude Code looks for skills

From the Claude Code docs, checked November 11, 2026.
ScopePathApplies to
Personal~/.claude/skills/<name>/SKILL.mdEvery project on this machine
Project.claude/skills/<name>/SKILL.mdThis repo; commit it and your team gets it
Plugin<plugin>/skills/<name>/SKILL.mdWherever the plugin is enabled, as /plugin-name:skill-name

Put client- or codebase-specific skills in the project. Habits you want everywhere, like your writing rules, belong in your personal folder. Skills you upload to claude.ai live separately and don't show up in Claude Code.

Build a skill in four steps

  1. Create the folder

    From your project root, create .claude/skills/csv-check/scripts. The folder name becomes the skill name: lowercase letters, numbers and hyphens.

    bash
    mkdir -p .claude/skills/csv-check/scripts
  2. Write SKILL.md

    Between two --- lines at the top go name and description. The description should say what the skill does and which requests it answers, in the words you'd type. The procedure goes below. The full file is further down.

  3. Move fixed checks into a script

    Anything that runs the same way every time belongs in code. The script finds empty fields, duplicate IDs and invalid dates. Claude doesn't load the script's source, only its output, so the check costs almost nothing in context.

  4. Test with a normal request

    Run claude in the project and ask for something that fits the description without naming the skill. Type /skills to list what Claude Code has loaded. To force it, start your message with /csv-check.

markdown
---
name: csv-check
description: Checks a CSV export (customers, invoices, orders) for empty required fields, duplicate IDs and invalid dates before you import or send it. Use for "check this export", "is this file OK", "can I import this".
---

# Check a CSV

1. Run the script on the file the user names:
   `python3 .claude/skills/csv-check/scripts/check.py <file.csv>`
2. The script prints line, column and problem for each issue. Don't invent extra issues.
3. Report like this:
   - First line: "Ready to import" or "N issues in M rows".
   - Then a table: Line | Column | Issue | Suggested fix.
   - Don't edit the file unless the user asks.

.claude/skills/csv-check/SKILL.md, tested with Claude Code 2.1.321 on November 11, 2026.

python
#!/usr/bin/env python3
"""Checks a CSV: empty values in the first column and in columns containing 'name', 'email' or 'date', duplicate values in the first column, dates that aren't YYYY-MM-DD."""
import csv, sys, datetime
path = sys.argv[1]
with open(path, newline='', encoding='utf-8-sig') as f:
    rows = list(csv.DictReader(f))
if not rows:
    print("Empty file"); sys.exit()
cols = list(rows[0].keys()); key = cols[0]
required = [c for c in cols if c == key or any(w in c.lower() for w in ('name', 'email', 'date'))]
seen, n, bad = {}, 0, set()
for i, r in enumerate(rows, start=2):
    for c in required:
        if not (r.get(c) or '').strip():
            print(f"line {i} | {c} | empty"); n += 1; bad.add(i)
    v = (r.get(key) or '').strip()
    if v and v in seen:
        print(f"line {i} | {key} | duplicate, also on line {seen[v]}"); n += 1; bad.add(i)
    seen.setdefault(v, i)
    for c in cols:
        if 'date' in c.lower() and (r.get(c) or '').strip():
            try: datetime.date.fromisoformat(r[c].strip())
            except ValueError: print(f"line {i} | {c} | not a valid date (YYYY-MM-DD): {r[c].strip()}"); n += 1; bad.add(i)
print(f"{n} issues in {len(bad)} of {len(rows)} rows")

.claude/skills/csv-check/scripts/check.py. Standard-library Python only.

PowerShell window on Windows 10 showing the folder tree .claude\skills\csv-check with SKILL.md and scripts\check.py, the SKILL.md header, and the script output: 4 issues in 3 of 4 rows (opens at full size)
The same skill on a Windows PC. Run the script on its own first; if it's wrong there, it'll be wrong inside Claude too.

How we tested when it loads

Our test project held customers.csv: four rows with an empty email, an empty name, February 30 as a start date and one customer ID used twice. We sent Claude Code two requests with claude -p, which runs a single prompt and prints the result. Adding --output-format stream-json logs every step, including the moment a skill is loaded.

Claude Code 2.1.321 on Linux, November 11, 2026.
RequestSkill loaded?What happened
Can I import customers.csv into my CRM as it is?YesRan the script, returned a table of 4 issues with a fix for each, in 7.6 seconds.
Write a short tagline for a bakery in Austin.NoAnswered directly. No skill, no script.

The first version of our script printed "4 issues in 4 rows" when the problems sat in three rows. Claude Code pointed out the mismatch in its report, and we fixed the script to say "4 issues in 3 of 4 rows". Read the first few reports of any new skill critically; they're where you catch mistakes in your own procedure.

What does an unused skill cost? We sent the same one-line prompt four times, twice with the skill in the project and twice without. Total input came to 28,699 and 28,709 tokens with the skill, and 28,760 and 28,770 without. Tokens are the small chunks of text models count. The description's cost disappeared inside the normal variation between runs, which fits Anthropic's figure of about 100 tokens per skill.

Skill vs. CLAUDE.md vs. plugin vs. subagent

ThingWhat it isPick it for
CLAUDE.mdInstructions read at the start of every session in the projectRules that always apply
SkillA procedure that loads when a request matchesA task that comes back now and then
PluginA bundle of skills, commands, hooks or MCP serversSharing a set with other people
SubagentA helper with its own empty contextResearch that reads a lot and reports a little

A skill can also run as a subagent. Add context: fork to the frontmatter when the skill reads many files you won't need afterwards.

Install skills from someone else

Anthropic publishes example skills on GitHub, including the Word, Excel, PowerPoint and PDF skills. In Claude Code you add the repo as a plugin marketplace, then install a bundle:

text
/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skills

How we keep a hundred skills usable

We run about a hundred skills side by side. Our main instruction file names the categories in a few lines and points to the skills, which hold the actual procedures. Every description is one or two sentences, with the words people type up front. When two skills overlap, they get separate jobs or we merge them. What that costs showed up in /context during a normal session: all descriptions together took 10k tokens, about 1% of the context window. Per skill it ranged from 60 to 230 tokens, depending on the length of the description.

We never edit a third-party skill to add our own rules. Updates overwrite it, and the change is gone. Our rules go in a skill of our own. In Claude Code 2.1.252 and later, /skill-doctor shows each skill's context cost and how often it's used.

Questions

How do I install a skill in Claude Code?

Put the folder with SKILL.md in ~/.claude/skills/ or in your project's .claude/skills/. For skills in a plugin marketplace, use /plugin install. If the skills folder didn't exist before, run /reload-skills.

When does Claude Code load a skill, and how do I control it?

When your request matches the description. Control it through the description, or set disable-model-invocation: true so only you can start it with /name.

How do I see whether a skill was used?

In an interactive session the call shows up in the conversation. With claude -p --output-format stream-json, it appears as a step in the output.

Where can I find good Claude Code skills on GitHub?

Start with anthropics/skills, which includes a template and the document skills. Treat community collections like any other code from the internet and read them first.

Sources