Agent Skills Security: Vet Skills and Plugins Before You Install

TL;DR: Agent skills security comes down to treating every skill, plugin and MCP server as software you're about to run. Before you install one, check who publishes it, read every file it ships, list what it runs and what permissions it grants itself, pin the exact version you reviewed, and keep deny rules in place so a bad one can't reach your secrets.
A skill looks harmless: a folder with a SKILL.md file, mostly plain text. The vendors that build skill and plugin systems say otherwise in their own docs, and this article turns what they say into checks you can run before anything new goes into your agent. It stays on the defender's side: what to check, and how to limit what a bad skill could do.
If agent skills or MCP are new to you, start with those glossary entries. For writing your own skills, see writing gh skill definitions that work across coding agents.
What a skill or plugin can do once it's loaded
The open Agent Skills specification defines a skill as a directory with a SKILL.md file and optional folders, including scripts/, which "Contains executable code that agents can run." So a skill is two things: instructions the model reads, and code your machine may run.
Anthropic's skills documentation spells out the consequence. A skill gives the agent "new capabilities through instructions and code, which also means a malicious Skill can direct Claude to call tools or run code in ways that don't match the Skill's stated purpose" (Agent Skills overview). In Claude Code, the same page says, skills "have the same network access as any other program on the user's computer."
Plugins bundle more than skills. Claude Code's plugin security page opens with: "A Claude Code plugin you install can execute arbitrary code on your machine with your user privileges" (Plugin security and trust). It lists hooks that run as shell commands during the session, MCP and LSP servers that Claude Code starts on your machine, a bin/ directory added to the PATH of the agent's Bash tool, monitors that run background shell commands, and skills and agents that "enter Claude's context as instructions."
The part that surprises people is where your safety settings stop. The same page says permission rules and the sandbox "cover the tool calls Claude makes, not the code a plugin runs by itself," and that hooks and servers run outside the sandbox. A deny rule limits what the agent decides to do. It doesn't stop a hook script that runs on its own.
Seven checks before you install
1. Know who publishes it
Anthropic's guidance: "Use Skills only from trusted sources: those you created yourself or obtained from Anthropic," and for anything else, "exercise extreme caution and thoroughly audit it before use." A marketplace's name doesn't settle it. Claude Code's docs say a marketplace name "tells you who publishes the catalog, not what each plugin in it does." Run claude plugin marketplace list to see where each marketplace you've added actually comes from.
2. Read every file it ships
Anthropic's audit step is to "Review all files bundled in the Skill: SKILL.md, scripts, images, and other resources," looking for "unexpected network calls, file access patterns, or operations that don't match the Skill's stated purpose." For plugins, the details pane shows that a hook exists but not what it runs, so the docs name the files to open yourself: hooks/hooks.json, .mcp.json and every file in bin/ (Plugin security and trust). To list everything Claude Code would load from a plugin, clone it and run:
claude --plugin-dir <plugin directory> plugin details <plugin name>
That reads the files without starting a session and prints the plugin's skills, agents, hooks and servers. With GitHub's CLI, gh skill preview shows a skill's SKILL.md without installing anything, and in an interactive terminal it lets you open the other files the skill bundles (gh skill preview). GitHub's gh skill manual says the command set is in preview and subject to change without notice, so check its flags against the current manual.
3. Check what it runs as it loads
In Claude Code, a skill line using the !`command` syntax "runs shell commands before the skill content is sent to Claude" (Claude Code skills docs). Find those lines and read each command. If your team doesn't need the feature, the setting "disableSkillShellExecution": true replaces them with a policy notice for skills from user, project, plugin and additional-directory sources.
4. Check what permissions it grants itself
A skill's allowed-tools field lets the listed tools run "without asking permission during the turn that invokes this skill." The docs warn: "A skill can grant itself broad tool access, so review the allowed-tools of skills checked into a repository before you run Claude Code there." That matters whenever you clone someone else's repository, because project skills load from its .claude/skills/ folder. The open specification marks allowed-tools as experimental and says support "may vary between agent implementations," so check how your own agent treats it.
5. Look for fetches at run time
Anthropic flags this separately: "Skills that fetch data from external URLs pose particular risk, as fetched content might contain malicious instructions. Even trustworthy Skills can be compromised if their external dependencies change over time." A skill that downloads instructions or scripts while it runs can change after your review.
6. Pin the version you reviewed
Your review covers only the files you read. Claude Code's docs say that with auto-update on, plugins update in the background, "so the files you reviewed can change on disk." Auto-update is on by default for most of Anthropic's official marketplaces and off for community, third-party and local ones (Install and manage plugins). You can pin a marketplace with #ref, as in /plugin marketplace add your-org/plugins#v1.2.0, and recent Claude Code versions also accept a full commit SHA there. That pins the catalog. The marketplace reference notes that a plugin entry with its own remote source can still update unless that entry is pinned to a sha too. GitHub's CLI pins a skill "to a specific git tag or commit SHA" (gh skill install):
gh skill install github/awesome-copilot git-commit --pin v2.0.0
Prefer a commit SHA when you can. A SHA names one exact set of files, while a tag is a name its owner can move.
7. Decide who gets it
In Claude Code, user scope enables a plugin in every project on your machine, project scope enables it for everyone working in the repository, and local scope keeps it to you in one repository. Try a new plugin at local scope first. gh skill install defaults to project scope.
MCP servers need the same review
An MCP server is often the part of a plugin that actually runs. Claude Code's MCP docs say: "Verify you trust each server before connecting it. Servers that fetch external content can expose you to prompt injection risk" (Claude Code MCP docs). For servers in a repository's .mcp.json, Claude Code asks for approval in interactive sessions, but claude -p runs and Agent SDK sessions load them without asking, which is worth knowing before you run an agent headless in a repository you didn't write.
The MCP project's security best practices say clients offering one-click local setup must "Show the exact command that will be executed, without truncation," and should "Warn that MCP servers run with the same privileges as the client." Read the full command before you approve one. Our article on catching MCP tool poisoning covers the prompt side.
Limit the damage if one slips through
- Deny your secrets. Claude Code checks rules in the order "deny, then ask, then allow," and "An allow rule can't carve an exception out of a deny rule" (Configure permissions). Rules like
Read(./.env)andRead(./secrets/**)keep the agent's file tools away from them. - Keep side effects manual.
disable-model-invocation: truestops the agent from starting a skill on its own. The docs recommend it for/deploy-style workflows because "You don't want Claude deciding to deploy because your code looks ready." - Turn off what you don't use. Deny one skill with a rule like
Skill(deploy *), or denySkillto disable them all. - Use organization controls. Managed settings can allowlist or blocklist marketplace sources and limit hooks to managed ones.
- Remove it cleanly. Run
claude plugin uninstall <plugin>with the scope you installed it at. Cached files stay under~/.claude/plugins/cache/for 14 days unless you delete them.
This is the same thinking behind excessive agency and our lethal trifecta security checklist: the less a component can reach, the less a bad one can do.
A review prompt you can reuse
An agent can inventory a skill for you, as long as you treat its answer as a second opinion. Use a fresh session with read-only access, because the files under review are untrusted input to the reviewer too.
You are reviewing an agent skill before I decide whether to install it.
The skill is in the folder I've attached. Do not run, install or
execute anything from it. Only read files.
Report, in this order:
1. Every file in the folder, with one line on what it is.
2. Every command the skill runs or tells the agent to run, quoted
exactly, with the file and line it comes from.
3. Every network address, URL or package it fetches or installs.
4. Every file or folder it reads or writes outside its own directory.
5. Any tools it pre-approves and any hooks or server definitions.
6. Anything in the instructions that does not match the skill's
stated description.
List anything you are unsure about under "Unclear" instead of
guessing. Do not give an overall verdict.
Why this works: It asks for an inventory with exact quotes and locations you can check line by line, instead of a verdict you'd have to take on trust. The "Unclear" list stops the model smoothing over what it couldn't work out. You still read the flagged lines and make the call. More in the Security pillar.
Frequently asked questions
Are agent skills safe to install?
Treat installing one like installing software. Anthropic's docs say to use skills only from trusted sources, to audit anything else thoroughly before use, and that a malicious one can direct the agent "to call tools or run code in ways that don't match the Skill's stated purpose."
Can a skill or plugin run code on my computer?
Yes. Skills can bundle scripts the agent runs, and in Claude Code a skill can run shell commands as it loads. Claude Code's docs say an installed plugin "can execute arbitrary code on your machine with your user privileges."
How do I check a Claude Code plugin before installing it?
Run claude plugin marketplace list to confirm the marketplace's source, read the plugin's details pane in /plugin, and open its hooks/hooks.json, .mcp.json and bin/ files. Then run claude --plugin-dir <plugin directory> plugin details <plugin name> on a cloned copy.
Should I pin skill and plugin versions?
Yes, for anything you didn't write. Auto-update can change the files you reviewed, so pin a commit SHA or tag with gh skill install --pin. For a Claude Code marketplace, pin it with a #ref (a commit SHA where your version supports it) and check that plugins with their own remote source are pinned in the catalog too. Review the changes before you move any pin.
What's the difference between a skill and an MCP server, for security?
A skill is instructions plus optional scripts, loaded when a task matches. An MCP server is a running program that gives the agent tools, and a local one runs on your machine with your privileges. Both need the same review.
Terms in this article
From the library
Rather have someone set it up for you?
That's a fair call. LTFI, the agentic business operating system from Kief Studio, can set up the work these guides describe and run it with you. No website yet? Kief Studio will build you one for free.

