Skip to content
HUIAHUB

GuideAgent skills

How to check if a Claude skill is safe before you install it

How to check if a Claude skill is safe: read SKILL.md and every script as text, find network calls, hooks and secrets, then pin the copy you read.

Edited by Published 7 min read7 sources

To check if a Claude skill is safe, read every file in it as text before you install it: SKILL.md, its frontmatter and each bundled script. Look for network calls, requests for secrets, hooks and shell commands that run when the skill loads. Then install the exact commit you read, and never run the skill as part of the check.

How to check if a Claude skill is safe: the five-line checklist

  1. Find the real source repository and the person or organization that maintains it.
  2. Read SKILL.md and its frontmatter, with special attention to allowed-tools and hooks.
  3. List every file in the skill folder and read each script without running it.
  4. Search the files for network calls, secrets, hooks and commands that run at load time.
  5. Install the commit you read from that same source, and pin it.

The rest of this guide explains why each line matters and what to look for.

What can an agent skill do once it is installed?

The Agent Skills specification (opens in a new tab) defines a skill as a directory with at least a SKILL.md file: YAML frontmatter followed by Markdown instructions. Three optional folders are named in the spec. scripts/ holds executable code that agents can run, references/ holds documentation and assets/ holds templates and data. Only name and description are required in the frontmatter.

Agents load a skill in stages. The spec says the name and description of every installed skill load at startup (about 100 tokens). The full SKILL.md body loads when the skill activates, and files in the other folders load only when the task needs them. A skill's instructions therefore reach the model whenever it decides the skill fits the task.

Claude Code adds more powers on top of the spec, all documented on its skills page (opens in a new tab):

  • allowed-tools lets Claude use the listed tools without asking you during the turn that invokes the skill. Paired with ${CLAUDE_SKILL_DIR}, it lets a skill run a bundled script without a permission prompt.
  • hooks in the frontmatter are registered when the skill is invoked and keep running for the rest of the session, according to the hooks reference (opens in a new tab).
  • The !`command` syntax runs shell commands before the skill content is sent to Claude, and the output replaces the placeholder.

The Claude Code docs also warn that workspace trust does not gate allowed-tools. A project skill's grant applies even in a -p run inside a folder you never trusted, so the docs tell you to review the allowed-tools of skills checked into a repository before you run Claude Code there. For how the file is meant to look, see how to write a SKILL.md for Claude Code.

How common are risky agent skills?

Two published studies measured this in early 2026. They used different samples and different scanners, so their numbers do not compare directly.

Snyk ToxicSkills. Snyk's ToxicSkills report (opens in a new tab), published February 5, 2026, scanned 3,984 skills from ClawHub and skills.sh as of that date. It found 534 skills (13.4%) with at least one critical-level issue and 1,467 skills (36.82%) with at least one security flaw of any severity. Human review confirmed 76 malicious payloads built for credential theft. Eight malicious skills were still live on ClawHub when the post went out.

The Snyk headline pairs the 36% figure with prompt injection. In the body, 36.82% is the share with any flaw, and the prompt injection rate across ClawHub is 2.6%. Among the top 100 skills on skills.sh, Snyk reported 5.0% with credential handling issues and 9.0% with third-party content exposure.

The arXiv paper Agent Skills in the Wild (opens in a new tab) (2601.10338, submitted January 15, 2026) collected 42,447 skills from two marketplaces and analyzed 31,132 of them. Of those, 26.1% had at least one vulnerability. Data exfiltration (13.3%) and privilege escalation (11.8%) were the most common patterns, and 5.2% showed high-severity patterns the authors read as strong signs of malicious intent. Skills that bundle executable scripts were 2.12 times more likely to contain a vulnerability than instruction-only skills.

The five steps, in order

Do every step on a copy you can read, in an editor or a terminal pager. Nothing in this method installs, imports or runs the skill.

Step 1: find the real source repository and who maintains it

A marketplace listing or directory page is a pointer. Open the repository it points to and confirm the skill folder is really there. Note the owner, whether that account maintains other projects, how recent the commits are and whether issues get answers.

Check that the folder name matches the name field. The spec requires the two to match, so a mismatch means the copy was renamed or repackaged somewhere along the way. If the listing has no repository at all and offers only a download, you have nothing to check against.

Step 2: read SKILL.md and its frontmatter as text

Open SKILL.md in a viewer that shows raw text, not a rendered preview. In the frontmatter, write down allowed-tools, hooks, shell, context, model and disable-model-invocation. Claude Code reads all of them. An allowed-tools value of the form Bash(...) names commands Claude may run without asking you.

Then read the body the way the model will. Flag any instruction to fetch a URL, send file contents anywhere, read credentials, skip confirmation, hide actions from you or ignore other instructions. Search the body for !` and for fenced blocks that open with ```!, since Claude Code runs those as shell commands before the model sees the text.

Step 3: list every file and read each script without running it

Clone the repository and list what is tracked. These commands only fetch and print files.

git clone https://github.com/OWNER/REPO.git skill-review
cd skill-review
git rev-parse HEAD
git ls-files

Write down the commit hash that git rev-parse HEAD prints. That is the version you are about to review. Read every file under the skill folder, not only scripts/, because the spec allows any extra files and directories. A minified bundle, a compiled binary or a long encoded string is code you cannot read, so treat its behavior as unknown.

Step 4: look for network calls, secrets, hooks and install-time commands

A text search finds most of what you need to read closely. Run it from the cloned folder.

grep -rnE "curl|wget|https?://|fetch\(|requests\.|urllib|socket" .
grep -rnE "\.env|\.ssh|api[_-]?key|token|secret|password|credentials" .
grep -rnE "base64|eval|exec\(|subprocess|child_process|\| *(ba)?sh" .
grep -rnE "^hooks:|PreToolUse|PostToolUse|allowed-tools" .

Each hit needs a reason the skill's description explains. A PDF skill that posts data to an unknown host, or reads ~/.ssh, has no such reason. Read the README too. Install steps that pipe a remote script into a shell, or install packages at run time, are commands that never appear in the skill folder you reviewed. For background on what a hook can do once registered, see the Claude Code hooks guide.

Step 5: install from the source you checked and pin it

Install the files you read, at the commit you read. For a plain skill folder, copy the reviewed folder into ~/.claude/skills/<skill-name>/ (personal) or .claude/skills/<skill-name>/ (project), and keep the commit hash with it. An install route that fetches its own copy can deliver different files.

Pinning matters because Claude Code watches skill directories and picks up added, edited or removed skills within the current session without a restart. If the skill comes through a plugin marketplace you control, the marketplace reference (opens in a new tab) lets a github, url or git-subdir source set sha to a full 40-character commit SHA. When both ref and sha are set, Claude Code checks out the sha.

What the HuiaHub security note on each skill page records

HuiaHub's methodology says each skill page is written from the skill's own files. The security note records four things, as far as those files show: whether the skill runs scripts, makes network calls, installs hooks or asks for secrets. A flag HuiaHub has not checked shows as unknown and is never shown as a "no". A skill page needs this note before it can appear in search engines or in site search.

The note is a reading of the files at one point in time. It covers the same ground as steps 3 and 4 above and does not replace your own check of the commit you install.

When should you walk away from a skill?

Use this decision table after steps 1 to 4. It is a template for your own review, not a record of any specific skill.

What you foundWhat it meansWhat to do
No public repository, or the listing only offers a downloadNothing to compare the installed files againstWalk away
A script you cannot read (minified, binary, encoded and decoded at run time)Its behavior is unknownWalk away
Network calls to hosts the description does not explainData can leave your machineWalk away
Reads .env, ~/.ssh, cloud credentials or tokens with no stated needCredential accessWalk away
README tells you to pipe a remote script into a shellCode you never reviewed runs at installWalk away
allowed-tools grants broad Bash accessClaude can run those commands without asking during that turnNarrow it in your copy, or skip the skill
hooks in the frontmatterThe hook keeps running for the rest of the session after invocationInstall only if you would accept that hook in your own settings
!`command` lines in SKILL.mdShell runs before Claude sees the skillReview each command as you would a script
Instructions only, no scripts, narrow or no allowed-toolsLower exposure, per the 2.12x script finding in the arXiv studyRead it anyway, then pin it

If you also add MCP servers alongside skills, the same habits apply. The guide on connecting Claude Code MCP servers and keeping them safe covers that side.

Frequently asked questions

Can a scanner or a directory's grade replace a manual review?

Treat a scanner as a first filter. Snyk says its detectors were tuned to minimize false positives, and no scanner reads intent the way a person does. The arXiv authors report 86.7% precision and 82.5% recall for their own detector, so it missed about one in six vulnerable skills in their evaluation.

Do I need to check a skill again after it updates?

Yes. An update can add scripts, hooks or network calls that the version you reviewed did not have. Claude Code picks up changed skill files within a running session, so keep the pinned commit until you have read the diff to the new one.

Can I stop skills from running shell commands when they load?

In Claude Code, setting `disableSkillShellExecution` to `true` replaces each `` !`command` `` with a notice that execution is disabled by policy. It applies to user, project, plugin and additional-directory skills, not bundled or managed ones.

Does this check apply to Codex, Cursor and other agents?

The file layout comes from the shared Agent Skills specification, so steps 1 to 5 apply to any agent that reads it. The spec marks `allowed-tools` as experimental and says support varies between agents. Frontmatter hooks and `!` commands are documented for Claude Code; check each other agent's own docs for what it runs.

Is it safe to open a cloned repository that contains project skills?

Check its `.claude/skills/` folder first. Claude Code applies a project skill's `allowed-tools` even in a `-p` run in a folder you have not trusted, and registers the skill's frontmatter hooks when it is invoked there too.

Sources

  1. 1.Specification - Agent SkillsOfficial docsPrimaryagentskills.io
  2. 2.Extend Claude with skills - Claude Code DocsOfficial docsPrimarycode.claude.com
  3. 3.Snyk Finds Prompt Injection in 36%, 1467 Malicious Payloads in a ToxicSkills Study of Agent Skills Supply Chain Compromise | SnykOfficial docsPrimarysnyk.io
  4. 4.[2601.10338] Agent Skills in the Wild: An Empirical Study of Security Vulnerabilities at ScaleOfficial docsPrimaryarxiv.org
  5. 5.Methodology · HuiaHubOfficial docsPrimaryhuiahub.com
  6. 6.Hooks reference - Claude Code DocsOfficial docsPrimarycode.claude.com
  7. 7.code.claude.com/docs/en/plugins/marketplace-referenceWeb

Spotted an error? See our corrections policy.

Enjoyed this? Get the weekly brief.

New guides, Project & Tool of the Week and the AI developments that matter. One email, no spam.

Read next

More on these topics