Before You Install: A Field Guide to Auditing AI Agent Skills and MCP Servers
Picture a normal afternoon: you find a skill that promises to automate your release notes, you copy the install line from its README, and two minutes later your agent is following instructions written by someone you have never heard of. Nothing in that workflow asked you to review anything. That gap is what this guide is about.
Agent skills are small, but they sit in a privileged spot. They are read by a model that can run commands on your machine, and many of them ship code with its own dependency tree. Auditing one does not take a security background - it takes knowing which handful of things to look at, and in what order.
What a skill can actually reach
It helps to separate the three shapes an "AI skill" usually takes, because each one fails in a different way:
- Instruction-only skills. A
SKILL.mdplus some reference notes. No code runs on its own, but the text tells your agent what to do. The risk is the content of the instructions. - Skills with bundled scripts. The
SKILL.mdpoints the agent at Python or shell scripts in the same repo. Now the risk is both the instructions and the code they trigger. - MCP servers and CLI tools. A long-running process or binary with its own
package.jsonorrequirements.txt. The risk shifts toward dependencies and network behavior.
Whatever the shape, it runs as your user account. Anything you can read - .env files, SSH keys, cloud credentials, your agent's settings - is in reach unless you deliberately narrow the environment.
Step one: read the instruction files like a reviewer
Start with SKILL.md, then any CLAUDE.md, AGENTS.md, .cursorrules or similar files the repo ships. These are the files your agent will treat as guidance, so they deserve the closest read. You are looking for text that tries to steer the agent rather than describe a task:
- Override language - phrases telling the model to set aside its earlier instructions, adopt an "unrestricted" persona, or keep something from the user.
- Credential handling - anything that mentions SSH keys,
.env, API keys or tokens in the same breath as an upload, a POST or an unfamiliar URL. - Commands with a big blast radius - recursive deletes of home or root, writes into
~/.claude/, flags that disable permission prompts, orcurl ... | shstyle installers. - Content you cannot see in a rendered view - HTML comments, zero-width characters, or long base64 strings. GitHub's rendered README hides all three.
A quick way to catch the last category is to open the raw file and search for <!--. A legitimate skill rarely has a reason to hide instructions from the person installing it. If you want a primer on the format first, see how to create a SKILL.md file and the SKILL.md glossary entry.
Step two: separate declared dependencies from resolved ones
The package.json you read may list a dozen packages. What lands on disk after install is often hundreds, because each of those pulls in its own. Known vulnerabilities usually live in that resolved tree, not in the top-level list.
Two levels of checking are worth knowing:
- Declared-dependency lookup. Take the names and versions from
package.jsonandrequirements.txtand query a vulnerability database such as OSV. Fast, no install needed, but it only sees what is written down. - Resolved-tree audit. Clone the repo, generate a lockfile without running install scripts (
npm install --package-lock-only --ignore-scripts), then runnpm audit. For Python, runpip-audit -r requirements.txt. Slower, but it sees transitive packages.
Do not panic at the first audit report. Plenty of findings sit in build tooling that never runs next to your agent. Put most of your attention on critical or high findings in packages the skill uses at runtime.
Step three: read the repo's vital signs
Metadata will not prove a skill is safe, but it tells you how much benefit of the doubt to give:
- Last push date. A year without commits means dependencies are drifting. Two years usually means nobody is watching.
- Archived flag. An archived repo will not get security fixes, full stop.
- License. No license means no clear right to use or modify the code. MIT and Apache-2.0 are the norm in this space.
- Install footprint. Fewer dependencies means a smaller surface. A formatting skill with a giant dependency tree deserves a second look.
Stars are a popularity signal, not a safety one. Treat them as context, never as a pass.
Step four: contain the first run
For anything you are still unsure about, give its first session a boring environment: a fresh container or VM, a scratch project with no real credentials, and your agent's permission prompts left on. Watch which commands it proposes and which hosts it contacts. If the behavior matches the README, widen access. If it surprises you, you found out cheaply.
Turning findings into a decision
| What you found | Suggested response |
|---|---|
| Critical CVE in a runtime dependency | Wait for a patched release or pin a fixed version yourself |
| Instructions that send secrets to an external host | Do not install; report it to the maintainer or the hosting platform |
| Hidden HTML comment carrying commands | Treat as hostile until the maintainer explains it |
| Remote install script piped to a shell | Common and often legitimate - read the script before running it |
| High CVE in a dev-only build tool | Low practical risk for most users; note it and move on |
| No commits in over a year | Usable, but expect to own any fixes yourself |
| No license file | Ask the author before using it in commercial work |
Where AgentsLLM helps
You can hand off the mechanical parts of this routine:
- The free security checker takes any public GitHub URL. It reads repo metadata through the GitHub API, looks up declared npm and PyPI dependencies in OSV, flags archived, stale and unlicensed repos, and scans instruction files plus the root README for the injection patterns described above. You get a Passed, Warning or Failed verdict and a shareable permalink.
- Skills listed in the catalog also get scanned on our side by a daily job: a shallow clone,
npm auditandpip-auditagainst the resolved tree, and the same heuristic prompt-injection check. For now, prompt-injection findings appear in the report but do not change a skill's status while we tune false positives. Browse MCP servers or AI agents, for example, and check the status on each skill page.
The two scanners use different inputs, so their verdicts can disagree. That is expected - one sees the declared list, the other sees the resolved tree.
Common questions
Is an instruction-only skill automatically safe? No. It cannot run code by itself, but it can tell your agent to. Reading the instructions is the whole audit for this type, so do not skip it.
Can a heuristic scanner prove a skill is clean? No scanner can. Pattern matching catches the common shapes of abuse; a determined author can phrase things it does not recognize. Read a clean result as "nothing obvious found", not as a guarantee.
How often should I re-check a skill I already use? Whenever you update it, and again when a new advisory lands against one of its dependencies. New CVEs are published against old versions all the time.
Should I trust a skill from a well-known company? More than an anonymous one, but still read the instructions. Official repos get compromised too, and their dependency trees age like everyone else's.
Summary
Read the instruction files first, check dependencies at whatever depth you can, look at how alive the repo is, and give the first run a sandbox. Most problems surface in the first two steps. When you want a quick second opinion before installing, paste the repo into the checker.