Last updated: October 28, 2026
What are Claude Code skills? They are folders with a SKILL.md file that teach Claude Code a repeatable task, such as reviewing a pull request or running a release checklist. Claude loads a skill only when the task needs it or when you call it with a slash command, so skills add knowledge without filling the context window.
TL;DR: Key Takeaways
- A skill is a folder with a SKILL.md file. The Claude Code documentation says Claude uses it when relevant or when you type its name as a slash command, and the body loads only when the skill is used.
- It is an open standard. Anthropic Engineering introduced Agent Skills on October 16, 2025 and published the open standard on December 18, 2025. Claude Code adds its own extensions.
- Descriptions cost context on every request, bodies do not. Keep SKILL.md under 500 lines and write descriptions that say what the skill does and when to use it.
- Skills are instructions, not guardrails. Anthropic's features overview calls a rule written in a skill "a request, not a guarantee" and recommends hooks for hard limits.
- The supply chain risk is measurable. The Cloud Security Alliance (May 6, 2026) cites a February 2026 audit of 3,984 skills in which 1,467 (36.82%) had security flaws and 76 carried confirmed malicious payloads.
- Repository files already caused real flaws. Check Point Research (February 25, 2026) reported three Claude Code issues triggered by malicious project configuration, all since fixed.
Claude Code Skills at a Glance
The table summarizes the facts you need before writing or installing a skill, based on Anthropic's documentation as of October 28, 2026.
| Aspect | What to know |
|---|---|
| File | A SKILL.md with YAML frontmatter and Markdown instructions, inside a named folder |
| Invocation | Automatic when the description matches the task, or manually with /skill-name |
| Context cost | Descriptions are always in context; the full body loads when the skill is used |
| Locations | Enterprise, personal, project, plugin, nested folders and extra directories |
| Format | The open Agent Skills standard plus Claude Code extensions |
| Size guidance | SKILL.md under 500 lines; move detail into supporting files |
| Main risk | Skills run with your permissions and can ship scripts and tool approvals |
What Are Claude Code Skills?
Claude Code skills are reusable instruction packages. Each one lives in a folder, starts with a SKILL.md file and can include scripts, templates and reference files. Claude reads the short description first, then loads the full instructions only when the task matches or when you invoke the skill by name.
According to Anthropic's Claude Code documentation (2026), a skill fits when you keep pasting the same playbook into chat. It also fits when part of CLAUDE.md has grown into a procedure rather than a fact.
The format is not specific to Claude Code. Anthropic Engineering described Agent Skills in October 2025 as folders of instructions, scripts and resources that an agent loads dynamically. The open standard followed on December 18, 2025, and Claude Code follows it with extra fields for things like subagents and hooks.
Claude Code also ships bundled skills, such as /code-review, /batch and /debug, as listed in the features overview. You use them the same way as your own.
Skills fit repeatable workflows, reference knowledge such as an API convention, and tasks with side effects such as deploying, which you want to start yourself.
How a Skill Works: SKILL.md and Progressive Disclosure
A skill has two parts: YAML frontmatter that tells Claude when to use it, and a Markdown body that tells Claude what to do. Claude keeps only the frontmatter in context. The body, and any file it links to, is read when the skill is actually needed.
Here is a minimal project skill that Claude can call on its own when you ask for a release summary:
Anthropic Engineering calls the loading model progressive disclosure and describes three levels. First, the name and description are preloaded. Second, the full SKILL.md loads when Claude decides the skill is relevant. Third, linked files and scripts load only as needed. A skill can therefore carry a large reference without paying for it in every session.
The Claude Code documentation adds practical limits. The description and the optional when_to_use text are shown to Claude in a listing that truncates the combined text at 1,536 characters. After compaction, Claude Code keeps the first 5,000 tokens of each invoked skill within a shared 25,000 token budget.
The frontmatter fields you will use most often are below. Unknown fields are ignored silently, and the frontmatter must start on line 1.
| Field | What it does |
|---|---|
| name | Becomes the slash command; defaults to the folder name |
| description | Tells Claude what the skill does and when to use it |
| disable-model-invocation | Blocks automatic loading, so only you can run the skill |
| user-invocable | Controls whether the skill appears as a command for you |
| allowed-tools | Tools usable without a prompt while the skill is active |
| context | Set to fork to run the skill in its own subagent |
| paths | Glob patterns that limit when the skill applies |
| model, effort | Override the model or reasoning effort for the skill |
Two features deserve care. Supporting scripts run through the shell and are executed, not loaded into context, which saves tokens. Dynamic context injection runs a shell command before Claude sees the skill text. Both are useful, and both matter again in the security section.
Where Claude Code Skills Live
Claude Code finds skills in several places, and the location decides who can use them. Personal skills follow you across projects, project skills travel with the repository, plugin skills ship in a plugin, and enterprise skills come from managed settings. Higher levels win when names collide.
The table lists the locations documented by Anthropic.
| Level | Path | Who gets it |
|---|---|---|
| Enterprise | Managed settings, .claude/skills/ | Everyone in the organization |
| Personal | ~/.claude/skills/name/SKILL.md | You, in every project |
| Project | .claude/skills/name/SKILL.md | Anyone who clones the repository |
| Nested | subdirectory/.claude/skills/ | Work inside that subdirectory, useful in monorepos |
| Plugin | plugin/skills/name/SKILL.md | Where the plugin is enabled, namespaced as plugin-name:skill-name |
| Extra directories | Folders added with --add-dir | The current session |
According to the documentation, enterprise beats personal and personal beats project. A skill also replaces a bundled skill or a command with the same name. Files in the older .claude/commands/ folder still work, and the skill wins if both share a name.
Anything under .claude/ in a cloned repository is content you did not write, and that includes skills.
Skills vs Slash Commands, Subagents, MCP, CLAUDE.md and Hooks
Skills are one of several ways to extend Claude Code, and each loads differently. CLAUDE.md is always loaded, skills load on demand, subagents run in a separate context, MCP connects external tools, and hooks run deterministic code. Pick by whether you need knowledge, isolation, connection or a guarantee.
The table follows the comparison in Anthropic's features overview.
| Feature | When it loads | Best for | Can it enforce a rule? |
|---|---|---|---|
| CLAUDE.md | Every session | Facts and conventions that always apply, kept under about 200 lines | No, it is guidance |
| Skill | Description always, body on use | Playbooks and reference you need sometimes | No, it is guidance |
| Slash command (.claude/commands) | On invocation | Older format, now merged into skills | No |
| Subagent | When delegated | Isolated work with its own context | Only through its own tool limits |
| MCP server | Tool names at start, schemas deferred | Connecting external systems | Through permissions and gateways |
| Hook | On lifecycle events, zero context cost | Deterministic checks and automation | Yes |
A skill and an MCP server solve different problems: MCP connects Claude to a system, while a skill tells Claude how to use it well. Our guide on what an MCP server is covers the basics. Use a hook when something must always or never happen, because the model can ignore an instruction but cannot skip a hook.
How to Write a Claude Code Skill
Write a skill by starting from a real task, not from a template. Run the task without a skill, note where Claude fails, then write the smallest SKILL.md that fixes those failures. Anthropic's best practices recommend building at least three evaluations before writing extensive documentation.
Follow these steps.
- Define the task and the test. Pick one job. Write three realistic prompts and the result you expect from each. Anthropic's authoring guidance says to build evaluations first.
- Choose a clear name. Use lowercase letters, numbers and hyphens, up to 64 characters. The guidance prefers an action form such as processing-pdfs, and it reserves the words anthropic and claude.
- Write a precise description. State what the skill does and when to use it, in the third person, with the terms a user would actually type. The Platform limit is 1,024 characters.
- Keep the body short. Stay under 500 lines. Give exact steps where order matters and loose guidance where several approaches work.
- Link supporting files one level deep. Put long reference in separate files and add a table of contents to any file over 100 lines. Claude may skim deeply nested references.
- Set invocation controls. Add disable-model-invocation for anything with side effects, such as deploying or sending messages.
- Test on the models you use. The guidance suggests checking with Haiku, Sonnet and Opus, because a skill that works on a strong model can be too thin for a smaller one.
- Iterate with Claude. Ask one Claude instance to help write the skill and another to use it on real work, then fix what you observe.
The mistakes below come from the same guidance and show up most often in practice.
| Mistake | Why it hurts | Fix |
|---|---|---|
| Vague description such as "helps with files" | Claude cannot tell when to load it | Name the task and the trigger terms |
| Time-sensitive facts | The skill goes stale quietly | Link to a maintained source |
| Many options with no default | Claude hesitates or chooses badly | Give one default and an escape hatch |
| Assuming packages are installed | The script fails at run time | State the install command |
Best Claude Code Skills to Install
The most reliable Claude Code skills to install are the ones from Anthropic's own public repository, because the publisher is known and the code is readable. No independent ranking of third-party skills exists, so judge any skill by its source, its contents and the tools it asks to use.
The anthropics/skills repository had more than 180,000 GitHub stars when we checked in October 2026. It groups examples into creative and design, development and technical, enterprise and communication, and document skills for docx, pdf, pptx and xlsx. The repository states that the examples are for demonstration and education, so test them in your own environment.
You install them as a plugin marketplace from inside Claude Code:
License terms differ. Many skills in the repository use Apache 2.0, while the four document skills are source-available and not open source. Read the license before you reuse them in a product.
Run these checks before installing a skill from a registry, a blog post or a colleague.
| Check | What to look for |
|---|---|
| Publisher | A named, verifiable author or organization |
| SKILL.md | Instructions that match the stated purpose and nothing extra |
| Scripts | Read every script; look for network calls and file writes outside the project |
| allowed-tools | Narrow patterns, not broad shell access |
| Hidden text | No invisible characters or encoded blobs |
| Updates | Pin a version or commit so the skill cannot change under you |
Claude Code Skills Security: Risks and Controls
Claude Code skills are an attack surface because they are text that steers an agent with your permissions. A poisoned skill can tell Claude to run commands, read secrets or change other files, and the user may never see it. Treat every skill as code you are choosing to run.
Why Skills Are an Attack Surface
Anthropic's engineering post warns that a malicious skill could introduce vulnerabilities or direct Claude to exfiltrate data. It advises installing skills only from trusted sources and auditing the files, dependencies and scripts of less trusted ones. It also tells readers to watch for instructions that connect to untrusted external network sources.
Three details in the Claude Code docs raise the stakes. Dynamic context injection runs shell commands before Claude reads the skill. The allowed-tools field lets a skill use listed tools without a prompt during its turn. It is not gated by workspace trust, so the docs advise reviewing it in repository skills. And skills load without an integrity check, which makes a repository skill as trusted as the repository itself.
Defenders have switches for this. The docs describe a setting that disables shell execution in skills, deny rules that block named skills, and managed policy that ignores allowed-tools from personal and project skills.
What Researchers Have Found
The evidence comes from several independent groups, and most findings are not flaws in Claude Code itself.
According to the Cloud Security Alliance (2026), a Snyk audit from February 2026 scanned 3,984 skills. It found flaws in 1,467 of them (36.82%), rated 13.4% critical and confirmed 76 malicious payloads. The note adds that 341 malicious skills targeted the OpenClaw ecosystem through the ClawHub registry. These are vendor audit figures relayed by a neutral body.
According to Embrace The Red (February 11, 2026), hidden Unicode Tag characters in a SKILL.md can carry instructions that people cannot see but a model can read. The researcher added a proof of concept to a legitimate curated skill and demonstrated it against Claude Code with Bash auto-approval. A retest on February 10, 2026 showed Claude Code detecting and refusing some of these attempts. The post notes no official vendor statement.
According to Check Point Research (February 25, 2026), malicious project files led to three issues in Claude Code. Project hooks in .claude/settings.json could run commands (GHSA-ph6w-f82w-28w6). An MCP consent bypass allowed remote code execution (CVE-2025-59536). A base URL override could leak API keys (CVE-2026-21852). The findings were fixed, and the researchers' advice was to update Claude Code, inspect .claude/ before opening an untrusted project and treat configuration files as executable code.
Those three are configuration flaws, not skill flaws, but skills sit in the same folder and carry the same trust.
How the Risks Map to OWASP
The risks line up with the OWASP lists that security teams already use. OWASP also runs an Agentic Skills Top 10 project, which is an incubator project still in development, with a v1.0 release planned for the fourth quarter of 2026.
| OWASP item | Name | How it applies to a skill |
|---|---|---|
| LLM04 | Supply Chain (LLM Top 10 2026) | A registry skill or repository skill carries hidden instructions or scripts |
| LLM03 | Excessive Agency (LLM Top 10 2026) | allowed-tools or broad shell access gives a skill more power than the task needs |
| ASI04 | Agentic Supply Chain Vulnerabilities | Skills, plugins and MCP servers are pulled in at runtime from outside sources |
| ASI05 | Unexpected Code Execution | A skill script or injected command runs on the developer's machine |
| AST01 | Malicious Skills (Agentic Skills Top 10) | A skill built to exfiltrate data or persist |
| AST02 | Supply Chain Compromise (Agentic Skills Top 10) | A trusted skill is changed after you approved it |
| AST03 | Over-Privileged Skills (Agentic Skills Top 10) | Permissions exceed the stated purpose |
| AST05 | Untrusted External Instructions (Agentic Skills Top 10) | A skill fetches and obeys instructions from the network |
For the full lists, see our guides to the OWASP Top 10 for LLM Applications, the OWASP Top 10 for Agentic Applications 2026 and the OWASP MCP Top 10.
Controls That Work
Most controls are simple and cheap, and together they remove the easy attacks.
| Control | What it does | Where it comes from |
|---|---|---|
| Install from trusted publishers only | Cuts exposure to typosquats and malware | Anthropic Engineering, CSA |
| Read SKILL.md and every script | Catches odd network calls and file writes | Anthropic Engineering |
| Scan for hidden Unicode | Finds invisible instructions | Embrace The Red, CSA |
| Pin versions or commits | Stops silent updates | CSA |
| Review allowed-tools and hooks in repositories | Blocks unprompted tool use | Claude Code docs |
| Disable shell injection where unneeded | Removes pre-read command execution | Claude Code docs |
| Put hard limits in hooks | Gives a guarantee that text cannot | Claude Code docs |
| Log tool calls and network egress | Lets you reconstruct what ran | CSA |
Where a Runtime Layer Fits
Review stops what you can see before it runs. A runtime layer checks what actually happens when a skill, a prompt or a tool result pushes Claude Code toward an action, which covers what review missed.
NeuralTrust's Agent Runtime Security (TrustGuard) does this for Claude Code. According to the NeuralTrust documentation, the TrustGuard plugin registers UserPromptSubmit, PreToolUse and PostToolUse hooks. Each hook asks for an evaluation before an action runs. It checks prompts for jailbreaks and pasted secrets. It checks Bash and shell commands for dangerous or out-of-policy use, and MCP and other tool calls before they execute. It checks tool results for indirect prompt injection before the model reads them.
A decision can block the action, ask for confirmation through Claude Code's native permission dialog, or only monitor it. The documentation also lists limits: the plugin does not evaluate model responses, does not redact content and does not run in claude.ai or the desktop app. You can read more on the Agent Runtime Security page.
A runtime layer complements review. It does not replace reading a skill before you trust it, or a sandbox and least-privilege credentials.
Where to Start
Start with the exposure that matches your team today, because each situation has one first step that closes the biggest gap. The table pairs four common situations with that step, so you can act this week rather than wait for a full security program.
| Your situation | Start here | Why |
|---|---|---|
| You write skills for your own workflow | One task, three tests, a precise description | Quality depends on evaluation, not length |
| Your team shares skills in repositories | Review .claude/ in code review and set allowed-tools narrowly | Repository skills carry repository trust |
| Developers install skills from registries | Allow only named publishers and pin versions | Registry skills are the supply chain risk |
| Skills can run commands or touch secrets | Add hooks and runtime checks, and log tool calls | Text instructions cannot enforce limits |
Conclusion
Claude Code skills turn repeated instructions into folders that load only when needed, which keeps context small and results consistent. Write them from real tasks, keep descriptions precise, and put hard limits in hooks. Install only from sources you can verify, because a skill carries your permissions. Review what you install, pin what you trust, and monitor what runs once it is live.
Secure Claude Code in Production with NeuralTrust
Put a runtime check between your coding agents and the actions they take, with every prompt, command and tool call evaluated before it runs. See how Agent Runtime Security (TrustGuard) works at neuraltrust.ai/ai-agent-security, or start with the AI Gateway for free.
Related Reading
- OWASP Top 10 for LLM Applications 2026
- OWASP Top 10 for Agentic Applications 2026
- OWASP MCP Top 10
- What Is an MCP Server?
- AI Agent Security for Enterprises: Complete Guide
FAQs about Claude Code Skills
1. What are Claude Code skills?
Claude Code skills are folders that contain a SKILL.md file with instructions, plus optional scripts and reference files. Claude reads the short description at the start and loads the full instructions only when a task matches or when you run the skill with a slash command. They teach Claude repeatable workflows without filling the context window.
2. Where do I put a Claude Code skill?
Put a personal skill in ~/.claude/skills/name/SKILL.md to use it in every project, or a project skill in .claude/skills/name/SKILL.md to share it through the repository. Plugins and enterprise managed settings are also supported. When names collide, enterprise takes precedence over personal, and personal over project.
3. What is the difference between a skill and a slash command?
Custom commands in .claude/commands are the older format. Skills replaced them and add supporting files, frontmatter controls and automatic loading by description. Existing command files still work, and if a skill and a command share a name, the skill wins. You can still run any skill manually by typing its name after a slash.
4. Are Claude Code skills safe to install?
Only if you trust the source. A skill is text and scripts that run with your permissions, so a malicious one can try to read secrets or run commands. Anthropic advises installing skills from trusted sources and auditing the scripts and files of any less trusted skill. Pin versions, review allowed-tools and keep logs of what runs.
5. Should I use a skill, CLAUDE.md or a hook?
Use CLAUDE.md for facts that always apply, a skill for a procedure you need sometimes, and a hook for a rule that must always hold. Anthropic's documentation says an instruction in CLAUDE.md or a skill is a request, not a guarantee, while a hook is deterministic and costs no context.
6. How long should a SKILL.md be?
Keep SKILL.md under 500 lines, as Anthropic's best practices recommend, and move detail into supporting files linked one level deep. Add a table of contents to any reference file over 100 lines. The description matters most, because Claude uses it to decide whether to load the skill at all.
7. Do skills work outside Claude Code?
Yes, because Agent Skills are an open standard that Anthropic published on December 18, 2025. Claude Code adds extra frontmatter fields, so a skill that uses them may not behave identically elsewhere. Uploads to claude.ai and the Skills API accept a smaller set of fields: name, description, license, compatibility, metadata and allowed-tools.
About the Author
Roger Howroyd is Head of Global SEO and AI at NeuralTrust, where he leads the company's search strategy across SEO, AEO, GEO, and LLM optimization. He specializes in AI-powered search, content strategy, and SEM. Connect on LinkedIn.
NeuralTrust is the leading platform for securing and scaling AI agents. Named a Pioneer in the Gartner Emerging Market Quadrant for AI Application Security 2026, recognized across four Gartner Hype Cycle reports in 2026, and featured in the Gartner Market Guide for Guardian Agents 2026, the Gartner Market Guide for AI Gateways 2025 and the KuppingerCole Leadership Compass for Generative AI Defense 2025. Headquartered in Barcelona with offices in London and New York. ISO 27001 certified.
Sources
- Anthropic, Extend Claude with skills, Claude Code documentation, accessed October 28, 2026.
- Anthropic, Extend Claude Code (features overview), accessed October 28, 2026.
- Anthropic Engineering, Equipping agents for the real world with Agent Skills, October 16, 2025.
- Anthropic, Skill authoring best practices, accessed October 28, 2026.
- Anthropic, anthropics/skills, GitHub, accessed October 28, 2026.
- Check Point Research, RCE and API Token Exfiltration Through Claude Code Project Files, February 25, 2026.
- Cloud Security Alliance, Agent Context Poisoning: SKILL.md and the New AI Supply Chain Attack Surface, May 6, 2026.
- Embrace The Red, Scary Agent Skills, February 11, 2026.
- OWASP Foundation, Agentic Skills Top 10, incubator project, accessed October 28, 2026.
- NeuralTrust Docs, Claude Code integration, accessed October 28, 2026.
)
)
)
)
)
)
)