NeuralTrust has been recognized by Gartner → Read more
Back

Claude Code Skills: The Complete Guide

Roger Howroyd November 2, 2026
Share
Claude Code Skills: The Complete Guide

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.

AspectWhat to know
FileA SKILL.md with YAML frontmatter and Markdown instructions, inside a named folder
InvocationAutomatic when the description matches the task, or manually with /skill-name
Context costDescriptions are always in context; the full body loads when the skill is used
LocationsEnterprise, personal, project, plugin, nested folders and extra directories
FormatThe open Agent Skills standard plus Claude Code extensions
Size guidanceSKILL.md under 500 lines; move detail into supporting files
Main riskSkills 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.

Try our AI Gateway today for free

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:

Copied!

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.

FieldWhat it does
nameBecomes the slash command; defaults to the folder name
descriptionTells Claude what the skill does and when to use it
disable-model-invocationBlocks automatic loading, so only you can run the skill
user-invocableControls whether the skill appears as a command for you
allowed-toolsTools usable without a prompt while the skill is active
contextSet to fork to run the skill in its own subagent
pathsGlob patterns that limit when the skill applies
model, effortOverride 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.

LevelPathWho gets it
EnterpriseManaged settings, .claude/skills/Everyone in the organization
Personal~/.claude/skills/name/SKILL.mdYou, in every project
Project.claude/skills/name/SKILL.mdAnyone who clones the repository
Nestedsubdirectory/.claude/skills/Work inside that subdirectory, useful in monorepos
Pluginplugin/skills/name/SKILL.mdWhere the plugin is enabled, namespaced as plugin-name:skill-name
Extra directoriesFolders added with --add-dirThe 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.

FeatureWhen it loadsBest forCan it enforce a rule?
CLAUDE.mdEvery sessionFacts and conventions that always apply, kept under about 200 linesNo, it is guidance
SkillDescription always, body on usePlaybooks and reference you need sometimesNo, it is guidance
Slash command (.claude/commands)On invocationOlder format, now merged into skillsNo
SubagentWhen delegatedIsolated work with its own contextOnly through its own tool limits
MCP serverTool names at start, schemas deferredConnecting external systemsThrough permissions and gateways
HookOn lifecycle events, zero context costDeterministic checks and automationYes

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.

  1. 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.
  2. 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.
  3. 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.
  4. Keep the body short. Stay under 500 lines. Give exact steps where order matters and loose guidance where several approaches work.
  5. 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.
  6. Set invocation controls. Add disable-model-invocation for anything with side effects, such as deploying or sending messages.
  7. 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.
  8. 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.

MistakeWhy it hurtsFix
Vague description such as "helps with files"Claude cannot tell when to load itName the task and the trigger terms
Time-sensitive factsThe skill goes stale quietlyLink to a maintained source
Many options with no defaultClaude hesitates or chooses badlyGive one default and an escape hatch
Assuming packages are installedThe script fails at run timeState 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:

Copied!

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.

CheckWhat to look for
PublisherA named, verifiable author or organization
SKILL.mdInstructions that match the stated purpose and nothing extra
ScriptsRead every script; look for network calls and file writes outside the project
allowed-toolsNarrow patterns, not broad shell access
Hidden textNo invisible characters or encoded blobs
UpdatesPin 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 itemNameHow it applies to a skill
LLM04Supply Chain (LLM Top 10 2026)A registry skill or repository skill carries hidden instructions or scripts
LLM03Excessive Agency (LLM Top 10 2026)allowed-tools or broad shell access gives a skill more power than the task needs
ASI04Agentic Supply Chain VulnerabilitiesSkills, plugins and MCP servers are pulled in at runtime from outside sources
ASI05Unexpected Code ExecutionA skill script or injected command runs on the developer's machine
AST01Malicious Skills (Agentic Skills Top 10)A skill built to exfiltrate data or persist
AST02Supply Chain Compromise (Agentic Skills Top 10)A trusted skill is changed after you approved it
AST03Over-Privileged Skills (Agentic Skills Top 10)Permissions exceed the stated purpose
AST05Untrusted 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.

ControlWhat it doesWhere it comes from
Install from trusted publishers onlyCuts exposure to typosquats and malwareAnthropic Engineering, CSA
Read SKILL.md and every scriptCatches odd network calls and file writesAnthropic Engineering
Scan for hidden UnicodeFinds invisible instructionsEmbrace The Red, CSA
Pin versions or commitsStops silent updatesCSA
Review allowed-tools and hooks in repositoriesBlocks unprompted tool useClaude Code docs
Disable shell injection where unneededRemoves pre-read command executionClaude Code docs
Put hard limits in hooksGives a guarantee that text cannotClaude Code docs
Log tool calls and network egressLets you reconstruct what ranCSA

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 situationStart hereWhy
You write skills for your own workflowOne task, three tests, a precise descriptionQuality depends on evaluation, not length
Your team shares skills in repositoriesReview .claude/ in code review and set allowed-tools narrowlyRepository skills carry repository trust
Developers install skills from registriesAllow only named publishers and pin versionsRegistry skills are the supply chain risk
Skills can run commands or touch secretsAdd hooks and runtime checks, and log tool callsText 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.

Try our AI Gateway today for free

Related Reading

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

  1. Anthropic, Extend Claude with skills, Claude Code documentation, accessed October 28, 2026.
  2. Anthropic, Extend Claude Code (features overview), accessed October 28, 2026.
  3. Anthropic Engineering, Equipping agents for the real world with Agent Skills, October 16, 2025.
  4. Anthropic, Skill authoring best practices, accessed October 28, 2026.
  5. Anthropic, anthropics/skills, GitHub, accessed October 28, 2026.
  6. Check Point Research, RCE and API Token Exfiltration Through Claude Code Project Files, February 25, 2026.
  7. Cloud Security Alliance, Agent Context Poisoning: SKILL.md and the New AI Supply Chain Attack Surface, May 6, 2026.
  8. Embrace The Red, Scary Agent Skills, February 11, 2026.
  9. OWASP Foundation, Agentic Skills Top 10, incubator project, accessed October 28, 2026.
  10. NeuralTrust Docs, Claude Code integration, accessed October 28, 2026.

Subscribe to our newsletter

Share

Join the leaders securing the agent ecosystem

Get a Demo