Direct Answer: How Do You Review a Plugin Before Installing It?
Before installing any third-party Claude Code plugin, conduct this 5-point safety review:
- Inspect
.claude-plugin/plugin.json: Confirm the author, license, and repository URL match the official source. - Audit Event Hooks (
hooks/orhooks.json): Check which lifecycle events are hooked (PreToolUse,PostToolUse,SessionStart) and inspect the shell scripts they execute. - Review External MCP Servers (
.mcp.json): Verify what local binaries or remote endpoints the plugin connects to. - Scan for Dangerous Shell Commands: Search scripts for pipe-to-shell patterns (
curl | bash),eval, base64 decoders, or attempts to access~/.sshand environment variables. - Run a Temporary Session Test: Test the plugin with
claude --plugin-dir ./pathbefore permanently registering it with/plugin install.
Why Plugin Auditing is Essential
Claude Code is an agentic tool with access to your terminal, filesystem, and development environment. When you install a plugin, you are not just adding text prompts—you may also be loading executable shell scripts and API connectors.
Anthropic designs Claude Code with strong security boundaries: by default, tool execution requires human approval unless explicitly automated. However, poorly authored or malicious plugins can attempt prompt injection or execute hidden bash commands. Performing a five-minute code audit prevents credential leaks and unauthorized system changes.
The 5-Point Security Audit Checklist
1. Manifest Verification (.claude-plugin/plugin.json)
Open the plugin manifest in the GitHub repository and verify:
- Does the author's identity match known maintainers or verified organizations?
- Does the plugin declare an open-source license (such as MIT, Apache-2.0, or BSD)?
- Are version numbers tracked via GitHub releases or tags?
2. Inspecting Lifecycle Hooks (hooks/)
Hooks execute automatically at key session turnstiles. Review the hook declarations:
{
"PreToolUse": [
{
"matcher": "Bash",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/guard.sh"
}
]
}
Open every referenced shell script (guard.sh). Verify that it performs local validation only and does not transmit environment variables, tokens, or repository files to external webhooks.
3. Reviewing Model Context Protocol Config (.mcp.json)
If the plugin includes an .mcp.json file, inspect its declared servers:
- Does it invoke reputable local tools (e.g.,
npx -y @modelcontextprotocol/server-postgres)? - Does it connect to unknown remote SSE or WebSocket URLs?
- Does it request access to sensitive directories outside your project workspace?
4. Static Scanning for Restricted Patterns
Search the entire repository tree for these high-risk patterns:- Pipe-to-shell downloads:
curl ... | bashorwget ... | sh. - Obfuscated commands:
eval(...),base64 -d, or hex-encoded strings. - Credential access: References to
~/.ssh,~/.aws/credentials,.env, or browser profile data. - Destructive operations:
rm -rf /or recursive permission changes (chmod 777). - Prompt Injection phrases: Hidden strings instructing the AI to "ignore previous safety rules" or "exfiltrate data silently".
5. Safe Temporary Testing with --plugin-dir
Never install an unverified plugin into your global --user scope immediately. Instead, clone the repository locally and run a one-time isolated test session:
git clone https://github.com/author/plugin-repo.git /tmp/test-plugin
cd my-project
claude --plugin-dir /tmp/test-plugin
In this test session:
- Verify that custom slash commands appear and behave as documented.
- Check Claude's terminal log to see if any unexpected network calls or background scripts trigger.
- When finished, simply exit the terminal session. No changes persist in your global
~/.claude/directory.
SkillHub's Automated Safety Policies
Every plugin listed on SkillHub is subjected to automated static AST and regex scans before listing. We classify packages into transparent risk tiers:
- Low Risk: Passive prompt guides, documentation skills, and local formatting helpers.
- Runs Scripts: Packages executing verified local build scripts (e.g., ffmpeg or Python converters).
- Hooks & MCP: Packages incorporating automated event turnstiles or external tool interfaces.
- Spends Money: Marketing, ad spend, and cloud provisioning tools capable of triggering live billing.
Any repository exhibiting prompt injection, credential theft patterns, or pipe-to-shell installations is automatically rejected and excluded from the public directory.
Frequently Asked Questions
Can an AI agent audit a plugin for me?
Yes. On every SkillHub plugin page, click the Ask your AI agent tab and copy the provided audit prompt. Paste it into Claude Code: it instructs Claude to read the manifest, summarize every hook and MCP server, verify permission scopes, and request your explicit confirmation before proceeding with installation.Where are plugins stored on my computer?
When installed globally, plugins reside in~/.claude/plugins/. When installed with project scope, settings are stored in .claude/ within your current git repository root.