# SkillVet **Pre-install security scanner, broken-reference auditor, token-budget profiler, and cross-agent spec linter for `SKILL.md` agent skills.** Zero runtime dependencies. Zero cloud uploads. Works offline across **Antigravity**, **Claude Code**, **Cursor**, and **Codex** skill bundles. [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [![Node.js >= 20](https://img.shields.io/badge/node-%3E%3D20-339933.svg)](https://nodejs.org/) [![Agent Skills Standard](https://img.shields.io/badge/Agent_Skills-SKILL.md-black.svg)](./SKILL.md) [![Zero Runtime Deps](https://img.shields.io/badge/runtime_deps-0-34d399.svg)](#architecture) --- ## Why SkillVet? Developers install third-party `SKILL.md` bundles daily without inspecting every markdown file, script, or reference inside them. A malicious or sloppy skill can hide: - **Prompt injection & stealth directives** (instruction-override phrasing, stealth user-hiding instructions, hidden HTML script comments, invisible zero-width Unicode characters). - **Supply-chain RCE patterns** (remote pipe-to-shell installers, encoded PowerShell commands, dynamic `eval` of decoded or env payloads). - **Credential access & wildcard permission abuse** (reads targeting SSH keys, AWS/cloud credential files, OS credential stores, or unbounded wildcard permission grants). - **Broken local links & path traversal** (`scripts/` or `references/` paths in `SKILL.md` that are missing or escape the skill directory). - **Context-token bloat** (`SKILL.md` exceeding progressive-disclosure limits instead of offloading guides into `references/`). SkillVet audits an entire skill folder or monorepo tree in milliseconds and assigns a deterministic **0–100 Trust Score** and **`PASS` / `WARN` / `FAIL`** verdict. --- ## GitHub Action (CI / GitHub Marketplace) Run SkillVet automatically on every pull request to block unsafe `SKILL.md` bundles, annotate risky lines inline, publish a Job Summary table, and optionally upload SARIF results to GitHub Code Scanning. ### Quick Workflow Setup ```yaml name: SkillVet Audit on: push: branches: [main] pull_request: jobs: skillvet: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Audit SKILL.md bundles uses: md1qamar/skillvet@v0.2.0 with: path: '.' fail-on: high ``` ### With SARIF Code Scanning Upload ```yaml - name: Audit SKILL.md bundles id: skillvet uses: md1qamar/skillvet@v0.2.0 with: path: './skills' fail-on: high sarif-file: skillvet.sarif json-file: skillvet.json - name: Upload SARIF to GitHub Code Scanning if: always() uses: github/codeql-action/upload-sarif@v3 with: sarif_file: ${{ steps.skillvet.outputs.sarif-file }} ``` ### Action Inputs | Input | Default | Description | | --- | --- | --- | | `path` | `.` | Path to a `SKILL.md` file, skill folder, or repository tree | | `fail-on` | `high` | Minimum severity to fail workflow (`critical`, `high`, `medium`, `none`) | | `sarif-file` | `""` | Optional output path to write SARIF v2.1.0 report | | `json-file` | `""` | Optional output path to write JSON audit report | | `quiet` | `false` | Hide `info`-level findings from logs and annotations | | `annotations` | `true` | Emit inline GitHub workflow annotations (`::error`, `::warning`, `::notice`) | | `summary` | `true` | Write Markdown audit summary to `$GITHUB_STEP_SUMMARY` | | `allow-empty` | `false` | Succeed instead of failing if no `SKILL.md` files are found | ### Action Outputs | Output | Description | | --- | --- | | `verdict` | Overall verdict (`PASS`, `WARN`, or `FAIL`) | | `trust-score` | Lowest Trust Score across scanned skills (`0`–`100`) | | `skills-count` | Number of skill bundles audited | | `critical-count` | Count of `critical` findings | | `high-count` | Count of `high` findings | | `medium-count` | Count of `medium` findings | | `low-count` | Count of `low` findings | | `info-count` | Count of `info` findings | | `findings-count` | Total findings across all severities | | `sarif-file` | Path to generated SARIF file (if enabled) | | `json-file` | Path to generated JSON file (if enabled) | --- ## Quick Start (CLI) ```bash git clone https://github.com/md1qamar/skillvet.git cd skillvet npm install npm run build # Audit a single skill or an entire skills repository node dist/cli.js /path/to/skill-repo # Machine-readable JSON output for AI coding agents node dist/cli.js /path/to/skill-repo --json # Generate SARIF v2.1.0 output for GitHub Code Scanning CI node dist/cli.js . --sarif > skillvet.sarif # Enforce CI threshold (critical | high | medium | none) node dist/cli.js . --fail-on high ``` --- ## Checks Performed | Category | Rule IDs | Severity | | --- | --- | --- | | **Security** | `sec/prompt-injection-override`, `sec/stealth-exfiltration-directive`, `sec/invisible-unicode`, `sec/remote-pipe-to-shell`, `sec/encoded-shell-payload`, `sec/hidden-html-command`, `sec/credential-store-access`, `sec/wildcard-permission-grant`, `sec/dynamic-eval-exec` | `critical` / `high` | | **Spec Compliance** | `spec/missing-frontmatter`, `spec/unclosed-frontmatter`, `spec/missing-name`, `spec/invalid-name`, `spec/name-dir-mismatch`, `spec/missing-description`, `spec/weak-description`, `spec/oversized-description`, `spec/missing-trigger-cue` | `high` / `medium` / `low` / `info` | | **References** | `ref/path-traversal`, `ref/broken-local-path`, `ref/orphaned-asset` | `critical` / `high` / `info` | | **Token Budget** | `budget/oversized-skill-lines`, `budget/high-context-tokens` | `medium` | --- ## Architecture - [`src/frontmatter.ts`](./src/frontmatter.ts) — Dependency-free YAML frontmatter parser & Agent Skills open-standard validator - [`src/securityScanner.ts`](./src/securityScanner.ts) — Prompt injection, invisible Unicode, pipe-to-shell, credential access, and permission-grant scanner - [`src/refAuditor.ts`](./src/refAuditor.ts) — Markdown link & backtick asset reference verifier + traversal guard - [`src/tokenProfiler.ts`](./src/tokenProfiler.ts) — Progressive-disclosure line and context-token profiler - [`src/scanner.ts`](./src/scanner.ts) — Recursive skill tree discovery, trust scoring, and exit-threshold evaluator - [`src/formatters.ts`](./src/formatters.ts) — Terminal, JSON, and SARIF v2.1.0 output formatters - [`src/cli.ts`](./src/cli.ts) — CLI entrypoint - [`src/action.ts`](./src/action.ts) & [`action.yml`](./action.yml) — GitHub Marketplace Action runner (Node 24, workflow annotations, step summaries, and outputs) --- ## Install as an Agent Skill SkillVet ships with its own [`SKILL.md`](./SKILL.md) so AI coding agents can run `skillvet` automatically before trusting third-party skills. ## License MIT License — Copyright (c) 2026 md1qamar