Artificial IntelligenceWednesday, April 22, 202611 min read

Claude Skills: Complete Tutorial with Real Examples and Code

Claude Skills are folders of instructions and scripts that extend what Claude can do — on claude.ai, Claude Code, and the API. Here is how they work, what built-in skills ship with Claude, and how to build your own from scratch.

Claude Skills: Complete Tutorial with Real Examples and Code

Claude Skills are a feature Anthropic shipped in early 2026 that lets you extend Claude with reusable, purpose-built instruction sets. A skill is a folder containing a SKILL.md file — and optionally scripts, templates, and reference docs — that Claude loads when a task matches the skill's description. Once installed, Claude either picks up the skill automatically or you invoke it directly by typing /skill-name.

This post covers what skills are, the built-in skills Anthropic ships, and how to build two working skills from scratch — a CSV deduplicator you can use in five minutes, and a more advanced XLSX column normalizer that calls a Python helper script. At the end you'll find a list of real community skills worth knowing about.

1What Are Claude Skills, Exactly?

The mental model is simple: a skill is a playbook you hand Claude once, and Claude follows it every time that type of task comes up. Before skills existed, the workaround was pasting the same system prompt or checklist into every conversation. Skills make that repeatable and composable.

Each skill lives in its own directory. The minimum viable skill is a single SKILL.md file with a YAML frontmatter block at the top and markdown instructions below it. The frontmatter's description field is load-bearing: Claude reads all installed skill descriptions at the start of a session and uses them to decide which skill — if any — applies to what you're asking. If the description is vague, the skill won't trigger when you want it to. If it's too broad, it'll trigger when you don't.

Skills work in three environments. In Claude Code (the terminal tool), you install skills in ~/.claude/skills/ for personal use or .claude/skills/ inside a project for project-scoped skills, and changes are picked up live without restarting. In the claude.ai web interface, you upload a ZIP of your skill folder through Customize > Skills. Through the API, skills are provisioned server-side. In all three contexts, the underlying SKILL.md format and invocation model are the same — Claude reads the skill and follows its instructions.

2What Built-In Claude Skills Ship with Claude?

Anthropic maintains an official skills repository at github.com/anthropics/skills. The repository ships four document skills that are pre-installed for paid users on claude.ai: PDF, XLSX (Excel), DOCX (Word), and PPTX (PowerPoint). These give Claude the ability to create and manipulate files in those formats — not just read them and answer questions, but generate output files your users can download.

Beyond the four document skills, Anthropic's repository includes: algorithmic-art (generative art using p5.js), canvas-design (visual output in PNG and PDF), frontend-design (React and Tailwind guidance), web-artifacts-builder (complex HTML artifacts using React and shadcn/ui), webapp-testing (Playwright-based UI testing), mcp-builder (a guide for creating MCP servers), brand-guidelines (Anthropic's own brand colors and typography), internal-comms (status reports, newsletters, and FAQs), slack-gif-creator (animated GIFs for Slack), and skill-creator (a meta-skill that builds other skills for you, given a description of what you want).

In Claude Code specifically, several bundled skills ship with every install: /simplify (code quality review), /debug (structured debugging workflow), /loop (runs a prompt on a recurring interval), /batch (parallel task execution), and /claude-api (Claude API and Anthropic SDK patterns). These behave identically to custom skills — you invoke them with /skill-name or let Claude pick them up automatically.

3How to Build a Skill for CSV Tasks with Claude

The first example is a CSV deduplicator skill. It teaches Claude to identify and remove duplicate rows from a CSV file based on a key column, give you a clear summary of what was removed, and write the clean file back out. No scripts required — this one runs entirely from Claude's instructions.

Create the skill directory in your personal skills folder:

mkdir -p ~/.claude/skills/csv-dedup

Then create the SKILL.md file at ~/.claude/skills/csv-dedup/SKILL.md:

---
name: csv-dedup
description: Deduplicates a CSV file by a key column. Use when the user asks to remove duplicate rows, deduplicate a CSV, or clean up a spreadsheet for repeated entries. Ask which column to treat as the unique key if the user doesn't specify.
---

# CSV Deduplicator

When this skill is invoked:

1. Ask the user for the CSV file path (or use $ARGUMENTS if provided).
2. Ask which column should be treated as the unique key. If the user says "email" or "ID", use that. If unsure, read the header row and suggest options.
3. Read the CSV file using the Read tool.
4. Parse the rows. For each value in the key column, keep only the first occurrence. Collect all removed rows.
5. Report:
   - Total rows in original file
   - Number of duplicate rows removed
   - The removed rows themselves (first 10 shown, remainder counted)
6. Write the deduplicated file to the same directory with a _deduped suffix. Example: contacts.csv → contacts_deduped.csv
7. Confirm the output file path to the user.

## Guidelines

- Treat key column comparison as case-insensitive unless the user says otherwise.
- Preserve the original column order.
- If the key column doesn't exist in the header, stop and tell the user clearly — do not guess.
- Do not silently drop rows. Always show what was removed.

That's the complete skill. Claude Code will pick it up immediately — no restart required. Test it:

# Let Claude invoke it automatically
# (just describe your task)
"I have a contacts CSV with duplicate email addresses. Clean it up."

# Or invoke it directly
/csv-dedup ~/data/contacts.csv

The description front-loads the trigger phrases ("remove duplicate rows", "deduplicate a CSV", "clean up a spreadsheet") so Claude's automatic invocation actually fires. If your skill isn't triggering, that's the first thing to tune — the description is Claude's only signal for deciding whether to use the skill.

4Build Your First Claude Skill in Minutes — A Complete PDF Tutorial with Code

The second example is more advanced: an XLSX column normalizer that calls a Python helper script. This demonstrates the pattern for skills that need to run actual code, not just give Claude instructions. The folder structure is:

~/.claude/skills/xlsx-normalizer/
├── SKILL.md
└── scripts/
    └── normalize_columns.py

The Python script does the column normalization work — lowercasing headers, stripping whitespace, replacing spaces with underscores, removing special characters — and writes the cleaned file. Create scripts/normalize_columns.py first:

#!/usr/bin/env python3
"""Normalize column headers in an XLSX file.

Usage:
    python normalize_columns.py <input_file> [output_file]

Transformations applied to each header:
- Strip leading/trailing whitespace
- Lowercase
- Replace spaces and hyphens with underscores
- Remove characters that are not alphanumeric or underscores
- Collapse consecutive underscores
"""

import sys
import re
from pathlib import Path

try:
    import openpyxl
except ImportError:
    print("ERROR: openpyxl is required. Run: pip install openpyxl")
    sys.exit(1)


def normalize_header(raw: str) -> str:
    s = raw.strip().lower()
    s = re.sub(r'[\s\-]+', '_', s)
    s = re.sub(r'[^\w]', '', s)
    s = re.sub(r'_+', '_', s)
    return s.strip('_')


def main():
    if len(sys.argv) < 2:
        print("Usage: normalize_columns.py <input.xlsx> [output.xlsx]")
        sys.exit(1)

    input_path = Path(sys.argv[1])
    if not input_path.exists():
        print(f"ERROR: File not found: {input_path}")
        sys.exit(1)

    output_path = (
        Path(sys.argv[2])
        if len(sys.argv) > 2
        else input_path.with_stem(input_path.stem + "_normalized")
    )

    wb = openpyxl.load_workbook(input_path)
    changes = []

    for sheet in wb.worksheets:
        # Assume first row is the header
        header_row = next(sheet.iter_rows(min_row=1, max_row=1), [])
        for cell in header_row:
            if cell.value and isinstance(cell.value, str):
                original = cell.value
                normalized = normalize_header(original)
                if original != normalized:
                    changes.append(
                        f"  Sheet '{sheet.title}': '{original}' → '{normalized}'"
                    )
                    cell.value = normalized

    wb.save(output_path)

    print(f"Output: {output_path}")
    if changes:
        print(f"Renamed {len(changes)} column(s):")
        for c in changes:
            print(c)
    else:
        print("No columns needed renaming.")


if __name__ == "__main__":
    main()

Now create SKILL.md. The allowed-tools field pre-approves the Bash tool so Claude can run the Python script without prompting you for permission each time:

---
name: xlsx-normalizer
description: Normalizes XLSX column headers — lowercases, removes special characters, replaces spaces with underscores. Use when the user needs clean column names for a database schema, API, or downstream data pipeline, or asks to standardize spreadsheet headers.
allowed-tools: Bash(python *)
---

# XLSX Column Normalizer

This skill cleans up column headers in Excel files to produce machine-friendly names
suitable for database columns, JSON keys, and API schemas.

## What it does

The bundled Python script applies these transformations to every header in every sheet:
- Strip leading/trailing whitespace
- Lowercase
- Replace spaces and hyphens with underscores
- Remove special characters (keeps alphanumeric and underscores)
- Collapse consecutive underscores

Examples: `First Name` → `first_name`, `E-mail Address!` → `e_mail_address`

## Steps

1. Ask the user for the XLSX file path if not provided in $ARGUMENTS.
2. Confirm the target file exists using the Read tool on the directory or file.
3. Run the normalizer script:

```bash
pip install openpyxl --quiet 2>/dev/null; python ${CLAUDE_SKILL_DIR}/scripts/normalize_columns.py "$FILE_PATH"
```

4. Show the user the script's output — what columns were renamed and where the output file was saved.
5. Offer to open or further process the normalized file.

## Notes

- The output file is saved alongside the input with a _normalized suffix unless the user specifies an output path.
- Original file is not modified.
- If openpyxl is not installed, the script will tell the user and exit cleanly.

The ${CLAUDE_SKILL_DIR} variable is a built-in substitution that expands to the directory containing the skill's SKILL.md file. This means the script path resolves correctly regardless of what directory Claude Code is running in — a subtle but important detail when scripts live inside a skill folder.

Install the dependency and test:

pip install openpyxl

# Invoke directly
/xlsx-normalizer ~/data/customer_export.xlsx

# Or let Claude pick it up
"Normalize the column headers in this Excel file: ~/data/customer_export.xlsx"

5Top 10 Claude Skills Users Swear By — Real Cases and Quick Setups

These are real skills from Anthropic's official repository and the community. All are functional as of April 2026.

  • xlsx (official, github.com/anthropics/skills) — Creates and edits Excel spreadsheets with formulas, charts, and conditional formatting. The official skill installed on claude.ai for paid users.
  • pdf (official, github.com/anthropics/skills) — Generates PDFs from structured content. Pre-installed on claude.ai. Used for reports, invoices, and documentation exports.
  • pptx (official, github.com/anthropics/skills) — Builds PowerPoint decks with layouts, slide templates, and charts. Frequently cited by designers who want slide structure without opening PowerPoint.
  • skill-creator (official, github.com/anthropics/skills) — A meta-skill: describe what you want Claude to do and it writes a SKILL.md for you. Fastest way to prototype a new skill without reading the spec.
  • mcp-builder (official, github.com/anthropics/skills) — Guides Claude through building a Model Context Protocol server from scratch. Particularly useful for teams integrating Claude with internal data sources.
  • webapp-testing (official, github.com/anthropics/skills) — Playwright-based UI testing playbook. Claude writes and runs browser tests against your running app.
  • Trail of Bits Security Skills (community, github.com/trailofbits) — CodeQL and Semgrep static analysis skills for vulnerability detection. Popular with security engineers who want Claude to reason about code findings rather than just report them.
  • obra/superpowers (community) — A collection of 20+ battle-tested skills including TDD workflows, structured debugging patterns, and commit message conventions. Frequently mentioned in Claude Code community threads as a starting point for personal skill libraries.
  • shadcn/ui (community) — Enforces shadcn/ui component patterns and context when building UIs with Claude. Prevents Claude from hallucinating non-existent component props.
  • Expo Skills (community, from Expo team) — Expo-specific development guidance for React Native apps. Covers Expo Router, EAS Build, and platform-specific edge cases that generic React Native advice misses.

6Common Mistakes and Gotchas

Vague descriptions are the most common reason a skill doesn't trigger. Claude sees all installed skill descriptions in a truncated list (capped at 1,536 characters per skill, including the when_to_use field). If your description says "help with data files" instead of "deduplicate CSV rows when the user mentions duplicate emails, repeated entries, or cleaning a spreadsheet", Claude won't match it to the right prompts. Front-load the specific trigger phrases.

Skills load once per session and don't reload. The rendered SKILL.md content enters the conversation as a single message and stays there. If you edit the skill file mid-session, the changes won't take effect until you start a new session — or re-invoke the skill manually. Claude Code watches skill directories for live file changes, but that only works for new sessions, not a conversation already in progress.

The ${CLAUDE_SKILL_DIR} variable is critical for scripts. Relative paths in a SKILL.md will resolve against whatever directory Claude Code is running in, not the skill folder. Use ${CLAUDE_SKILL_DIR}/scripts/your_script.py consistently when referencing bundled scripts, or your skill will break as soon as someone runs Claude Code from a different working directory.

Don't add disable-model-invocation: true unless you mean it. This field removes the skill from Claude's context entirely — it won't appear in the automatic skill listing and Claude will never load it on its own. Reserve it for workflows with side effects you want to control explicitly, like deploy scripts or git commits. For knowledge skills and data tools, the default (Claude can auto-invoke) is usually what you want.

Skills compete for context budget. If you install many skills, Claude Code trims descriptions to stay within the character budget. When descriptions get cut, Claude loses the keywords it needs to auto-invoke correctly. The mitigation is to keep descriptions tight and front-loaded, and to use the when_to_use field for trigger-phrase overflow rather than padding the description itself.

💡 Pro tip

When your data import workflow needs more than a prompt — validation rules, schema enforcement, multi-format support (CSV, Excel, JSON, XML), and a UI your users actually interact with — that's what Xlork is for. Xlork embeds a schema-aware importer into your product with AI-powered column mapping and real-time validation. Skills and Xlork are complementary: skills handle Claude's reasoning; Xlork handles the structured data pipeline that feeds your app. Get started at xlork.com.

#csv-import#data-engineering#best-practices#artificial-intelligence

Ready to simplify data imports?

Drop a production-ready CSV importer into your app. Free tier included, no credit card required.