All insights

Coding agents

Claude Code: How to Create a Skill

Create a project-level Claude Code Skill with a SKILL.md file, invoke and check it, and understand when a production API integration is separate.

Illustration for Claude code create skill

Create a Claude Code Skill

For a basic project Skill, create a folder under .claude/skills/ and put a SKILL.md file inside it. The example uses a folder named csv-audit, which supplies the /csv-audit command; Claude Code documents the same folder-to-command pattern with deploy and /deploy. This example omits frontmatter: frontmatter is an optional Skill feature, and it is not needed for the explicit folder-based command shown here. You do not need a manifest, marketplace installation, helper script, or API setup for this example. (code.claude.com)

1. Create the Skill folder and file

From your project’s root, run this Bash/POSIX-shell example:

mkdir -p .claude/skills/csv-audit
cat > .claude/skills/csv-audit/SKILL.md <<'EOF'
# Audit a CSV

1. Read the CSV file the user identifies.
2. Report its column names and row count if available.
3. Identify blank cells and apparent inconsistencies, such as numbers mixed with text in a column.
4. Summarize findings with the affected column names and a few examples.
5. Do not edit or overwrite the file. If the file is too large to inspect directly, explain the limitation and ask before using another method.
EOF

For a personal Skill available across projects, use ~/.claude/skills/csv-audit/SKILL.md instead. Supporting files—such as references, templates, or scripts—are optional; add them when the instructions need them. (code.claude.com)

2. Invoke and check it

In Claude Code, run:

/csv-audit sample.csv

To make the check concrete, create a small CSV named sample.csv with this content:

name,age
Ava,29
Bo,
Cy,unknown

Expected findings—not results from a test run—are a blank age value for Bo and a nonnumeric age value (unknown) for Cy. Check that Claude reports those examples and does not edit the file. Explicitly invoking /csv-audit tests the named command; Claude may also select a Skill automatically when a request matches it. (code.claude.com)

If /csv-audit is unavailable, type / and look for it in the command list. You can also run /skills to check the available Skills, or /context all to inspect the expanded context breakdown. Then verify that the file is named exactly SKILL.md and is in the project or personal location above. If Claude recognizes the Skill but misses a CSV finding, refine the instructions and repeat the same fixture test. (code.claude.com)

3. Add scripts or assets only if the task needs them

For a procedure that is mostly guidance, SKILL.md may be enough. Add supporting files for reusable templates or longer reference material; consider a script when the task needs deterministic processing. Review and test any code that reads, writes, or sends project data, and keep its side effects appropriate to the task. Supporting directories are optional, not prerequisites for a basic instruction-only Skill. (code.claude.com)

Claude Code Skill or production API?

Use a Claude Code Skill when you want Claude Code to follow a reusable procedure in a project. A production application calling Claude through the Messages API is a separate setup: Anthropic documents API Skills used through the Messages API with the code execution tool and a container parameter. Do not assume that creating a local .claude/skills/ folder registers that Skill in an API workspace. Follow the API documentation for its access and execution requirements; this guide does not provide a copyable API request. (platform.claude.com)

As a practical choice, use a Skill for reusable instructions or a bounded workflow in Claude Code. If an application needs custom control flow across external services, implement that orchestration in the application; a Skill file is not, by itself, the API integration.

Sources

Extend Claude with skills — Claude Code Docs

Extend agents with skills — Claude Code Docs

Commands — Claude Code Docs

Using Agent Skills with the API — Claude Platform Docs

Contact us