The Zero-Trust Security Gate & Vulnerability Scanner for AI Agent Skills.
Intercept, sandbox, and deeply audit untrusted skills before granting them execution privileges in your AI agents.
Compatible with Claude Code, Antigravity, OpenCode, Codex CLI, Cursor, and Hermes.
Quickstart β’ Why safe-skills? β’ CLI Reference β’ Policy Engine β’ Roadmap
Running npx skills add <repository> grants third-party repositories direct execution capabilities inside your agentic coding workflows. Skills can bundle scripts, lifecycle hooks, and instructions executed directly on your workstation.
Unvetted or malicious skills can silently execute:
- π Credential Theft & Exfiltration: Stealthily harvesting
OPENAI_API_KEY,ANTHROPIC_API_KEY, AWS tokens, SSH keys (~/.ssh/id_rsa), and.envfiles. - π£ Arbitrary Remote Code Execution (RCE): Executing hidden reverse shells (
nc -e,bash -i) or downloaders through unreviewed lifecycle scripts. - π΅οΈ Hidden Host Persistence: Installing covert cron jobs, systemd services, or modifying user shell profiles (
.zshrc,.bashrc). - π Indirect Prompt Injection: Embedding subversive directives in Markdown comments or tool schemas that hijack agent reasoning during pair-programming.
- π¦ Supply-Chain Attacks: Smuggling compromised transitive npm dependencies and unpinned scripts.
safe-skills acts as a transparent security proxy for npx skills add. It intercepts every installation command, clones the target into an ephemeral sandbox, executes deep static and LLM security audits powered by NVIDIA SkillSpector, evaluates the risk score against strict policy thresholds, and requires your explicit informed consent before anything is installed.
βββββββββββββββββββββββββββββββββββββββββββ
β User runs: safe-skills add <repository> β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β 1. Isolated Temp Sandbox β
β Clones skill to an ephemeral folder β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β 2. NVIDIA SkillSpector Scanner β
β Static AST β’ YARA Rules β’ Lockfiles β
β Deterministic LLM Semantic Analysis β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β 3. Risk Score & Policy β
β LOW (0-20) β’ MED (21-50) β’ HIGH (51-80)β
β β Zero-Tolerance: RCE / Exfil / BH2 β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β 4. Human Consent & Security Review β
β Finding Breakdown β’ Audit Log Record β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β
ββββββββββββββββββββ΄βββββββββββββββββββ
β (Approved) β (Declined / Blocked)
βΌ βΌ
βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
β 5. Safe Installation β β Aborted Cleanly β
β npx skills add executed β β No files modified β
βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
npm install -g safe-skillscurl -fsSL https://raw.githubusercontent.com/harshsinghmp/safe-skills/main/install.sh | bashgit clone https://github.com/harshsinghmp/safe-skills.git ~/.local/share/safe-skills
ln -s ~/.local/share/safe-skills/bin/safe-skills ~/.local/bin/safe-skills
ln -s ~/.local/share/safe-skills/bin/skills ~/.local/bin/skillsNote
The installer automatically provisions the skills alias, allowing you to use skills add <repo> as a drop-in replacement for npx skills add.
Scan an untrusted repository and review its risk profile before installation:
safe-skills add anthropics/anthropic-quickstartsExtract and audit an individual skill from a mono-repo:
safe-skills add getsentry/skills --skill skill-scannerInspect a skill's vulnerability findings without modifying your system:
safe-skills add JuliusBrussee/cavekit --dry-runPin sampling parameters for reproducible audit scoring:
safe-skills add some-org/some-skill --seed 42 --temperature 0.0Reject any skill that exceeds a custom risk threshold:
safe-skills add some-org/some-skill --threshold mediumKeep safe-skills and the underlying NVIDIA SkillSpector scanner updated with one command (auto-detects npm, bun, or git environments, or can be specified explicitly):
# Auto-detects package manager (npm, bun, or GitHub git clone)
safe-skills update
# Or specify update source explicitly
safe-skills update --npm
safe-skills update --bun
safe-skills update --github
# Check for updates without installing
safe-skills update --checkAudit all installed skills against the cryptographic ledger (skills-lock.json) to detect post-installation tampering:
# Verify all installed skills in local project
safe-skills verify
# Verify a specific skill or audit strictly
safe-skills verify demo-skill --strictEliminate Time-of-Check to Time-of-Use network races and enforce read-only execution permissions:
# Install directly from verified sandbox directory and lock directory to chmod 555
safe-skills add some-org/some-skill --anti-toctou local --readonlyWhen you invoke safe-skills add, you receive an instant terminal breakdown:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SKILL SECURITY REVIEW
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Repository: https://github.com/example/untrusted-skill
Skill: crypto-helper
Scope: LOCAL
Commit: 7a8f3b9c12de
Source: UNKNOWN
Lockfile: audited (package-lock.json)
SkillSpector:
Score: 35/100
Severity: MEDIUM
Recommendation: REVIEW_CAREFULLY
Files: SKILL.md, scripts/fetch_price.py, package.json, hooks/hooks.json
Findings:
Critical: 0
High: 0
Medium: 1
Low: 2
Findings at or above threshold:
MEDIUM network_access β Outbound HTTP socket transmission in scripts/fetch_price.py:L14
MEDIUM BH1 β Untrusted bundled lifecycle hook registered in hooks/hooks.json
Decision: MEDIUM
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MEDIUM risk β secondary review recommended.
Install "crypto-helper" anyway? [y/N]
| Tier | Score Range | Default Behavior | Criteria & Findings |
|---|---|---|---|
LOW |
0 β 20 | Auto-Install | Clean static analysis, trusted sources, zero suspicious hooks. |
MEDIUM |
21 β 50 | Prompt Required | Network requests, script hooks, bundled lifecycle hooks (BH1), or permission tampering (BH3). |
HIGH |
51 β 80 | Blocked | Obfuscated code, unpinned supply-chain dependencies, high-severity CVEs. |
CRITICAL |
81 β 100 | Blocked | Known exploits, remote exfiltration, backdoor patterns. |
Regardless of the calculated numerical score, safe-skills halts execution immediately if any of the following are detected:
- β
BH2Remote Transfer: Directly proven unauthorized exfiltration of sensitive tokens or context. - β Credential Access: Tampering with
~/.ssh,~/.aws,~/.env, or system keychains. - β Remote Code Execution (RCE):
nc -e,bash -i, dynamiceval, or unverified subprocess spawning. - β Host Persistence: Writes to
/etc/systemd, crontabs, or user shell dotfiles (.zshrc/.bashrc).
Warning
Bypassing a hard block requires explicit interactive confirmation or the --force flag. All forced overrides are recorded to the immutable audit trail.
| Flag | Argument | Default | Description |
|---|---|---|---|
--skill |
<name> |
all | Target a specific skill directory inside a repository. |
--threshold |
<lvl> |
high |
Set maximum allowed risk before blocking (low, medium, high, critical). |
--seed |
<int> |
none | Forward deterministic seed to SkillSpector v2.11 for reproducible evaluation. |
--temperature |
<float> |
none | Set LLM sampling temperature (valid range: 0.0 to 2.0). |
--dry-run |
flag | false |
Execute full sandbox scan and log audit without invoking installer. |
--no-llm |
flag | false |
Run static AST & YARA analysis only (skips LLM provider calls). |
--llm |
flag | auto |
Force LLM semantic review pass. |
--force |
flag | false |
Allow prompting for manual bypass on high-risk/blocked skills. |
-g, --global |
flag | false |
Pass global installation scope to downstream agent installer. |
Trusted repositories skip interactive prompts if their scan score is LOW:
[trusted_sources]
repositories = [
"anthropics/skills",
"vercel-labs/agent-skills",
"github.com/my-org/*"
]Configure provider keys and sampling defaults locally outside version control:
# ~/.config/safe-skills/keys.env
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
SKILLSPECTOR_SEED=42
SKILLSPECTOR_TEMPERATURE=0.0Every single scan and installation decision is written to an append-only JSON Lines ledger:
{
"timestamp": "2026-09-04T12:00:00.000Z",
"repository": "example/untrusted-skill",
"skill": "crypto-helper",
"scope": "local",
"commit": "7a8f3b9c12de",
"risk_score": 35,
"severity": "MEDIUM",
"decision": "approved",
"forced": false
}safe-skills includes an end-to-end integration test suite with zero external network dependencies:
npm test
# Or run with syntax linting:
npm test && npm run lintCheck out ROADMAP.md for our full multi-milestone plan:
- v1.3.0: Anti-TOCTOU commit SHA pinning,
skills-lock.jsoncryptographic integrity ledger,safe-skills verifyaudit command, post-install write-protection (chmod 555). (Shipped) - v1.4.0: Automated dual-engine cross-validation (SkillSpector + Sentry) and MCP tool schema poisoning defense.
- v2.0.0: Runtime capability manifests (
CAPABILITIES.toml) and Linux Bubblewrap / Landlock OS sandboxing.
Distributed under the MIT License. Built for the developer agent ecosystem by Harsh.