Skip to main content
Glama

Tests Zero Dependencies Node.js >= 22.5 License MIT

Security scanner, Unicode steganography detector, broken-link auditor, and mcp-lock.json rug-pull verifier.

Works with Claude Code, Cursor, Windsurf, Codex CLI, and Antigravity.

Community SKILL.md files and third-party MCP configs run inside the agent's highest-trust instruction layer. A concealed Unicode Tag payload, a base64-encoded curl command inside an HTML comment, or an npx MCP server that silently mutates a tool description after install can read .env or ~/.ssh/id_rsa without throwing an error. Broken markdown links and conflicting rules also degrade agent behavior quietly.

skill-guard scans skills, rules, and MCP configs offline with zero npm dependencies, generates SARIF 2.1.0 reports for GitHub Code Scanning, and pins live stdio MCP tools/list schemas into mcp-lock.json to catch post-install rug pulls.

Quick start

Requires Node.js >= 22.5.0.

# Scan a directory or skill folder
npx -y github:keenfolk1-lgtm/skill-guard scan .

# Fail CI on high or critical findings and export SARIF 2.1.0
npx -y github:keenfolk1-lgtm/skill-guard scan . --format sarif --fail-on high > skill-guard.sarif

# Pin live stdio MCP tool descriptions and skill files into mcp-lock.json
npx -y github:keenfolk1-lgtm/skill-guard lock --config ./.mcp.json --dir ./.agents/skills

# Verify live MCP servers still match mcp-lock.json
npx -y github:keenfolk1-lgtm/skill-guard verify

MCP server registration

claude mcp add skill-guard -- npx -y github:keenfolk1-lgtm/skill-guard serve

Or add it to mcp.json:

{
  "mcpServers": {
    "skill-guard": {
      "command": "npx",
      "args": ["-y", "github:keenfolk1-lgtm/skill-guard", "serve"]
    }
  }
}

Related MCP server: mcp-security-suite

Example scan output

Running node ./bin/skill-guard.mjs scan ./fixtures/poisoned-skill produces:

skill-guard scan: ./fixtures/poisoned-skill
  files scanned: 2 | markdown tokens: 118 | risk score: 100/100
  findings: 10 (critical=5, high=3, medium=2, low=0)

[CRITICAL] SG-INJ-001 SKILL.md:10
  Explicit system or prior instruction override phrase detected
[CRITICAL] SG-SHD-001 SKILL.md:12
  Cross-tool shadowing attempt trying to hijack calls from built-in or peer tools
[CRITICAL] SG-HID-003 SKILL.md:14
  Base64-encoded payload triggers SG-EXF-003: Outbound curl POST/upload targeting local file or secret data
[HIGH] SG-CFG-001 mcp.json:4
  Plaintext HTTP remote MCP server URL exposes tool traffic and tokens
[MEDIUM] SG-STR-003 SKILL.md:8
  Broken relative link target "does-not-exist.md" does not exist on disk

Detection coverage

Category

Rule IDs

What it catches

Unicode steganography

SG-UNI-001 .. 004

Unicode Tag ASCII smuggling (U+E0020..007E, decoded in output), BiDi overrides, zero-width chars, mixed Latin/Cyrillic homoglyphs.

Prompt overrides

SG-INJ-001 .. 006

System/prior instruction overrides, stealth suppression ("do not tell the user"), spoofed <system> role tags.

Tool shadowing

SG-SHD-001 .. 003

Directives hijacking built-in tools (read_file, bash) or rerouting peer tool traffic.

Secret access & RCE

SG-SEC-001 .. 006, SG-EXF-001 .. 008

.ssh, .aws, .env, private key literals, curl | sh, irm | iex, outbound uploads, markdown tracking pixels.

Concealed payloads

SG-HID-001 .. 003

Imperatives and URLs inside HTML comments, recursive base64 decode and rescan.

MCP config & integrity

SG-CFG-001 .. 004, SG-STR-001 .. 004

Plaintext remote http:// URLs, inline shell wrappers, hardcoded secrets, missing YAML frontmatter, dead local links, conflicting rules.

MCP tools

Tool

Purpose

scan_path

Audits a folder or config file across all security and integrity layers.

scan_text

Checks untrusted markdown or tool output inline.

verify_lockfile

Introspects configured stdio servers and compares against mcp-lock.json.

Limitations

Static regex and base64 rules catch explicit smuggling and common injection phrasing, not subtle natural-language social engineering written with benign words. mcp-lock.json verification currently spawns stdio MCP servers (command + args) and skips remote SSE or HTTP servers. Contradiction checks compare explicit "always ..." vs "never ..." directives on matching verbs and nouns.

License

MIT

Related tools: mcp-diet · blast-radius-mcp · flight-recorder-mcp · agent-undo · vibe-to-prod

Available Tools

3 tools
scan_pathA

Audit a directory or skill/MCP config file for prompt injections, invisible Unicode steganography, credential leaks, broken links, and contradictory rules.

Inputs: path.

scan_textA

Inspect untrusted markdown skill text, tool output, or JSON config snippet for hidden Unicode tags, BiDi overrides, or injection patterns.

Inputs: text (required), label.

verify_lockfileB

Verify live stdio MCP tool descriptions and locked skill files against mcp-lock.json to catch silent rug-pull mutations.

Inputs: lockPath, configPath.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 3 tools

    Disambiguation4/5

    Each tool targets a distinct input type or workflow: filesystem paths, raw text, and lockfile drift verification. scan_path and scan_text overlap in detection goals (injections/Unicode), but their input boundaries are clear enough to avoid most misselection.

    Naming Consistency5/5

    All three names follow a consistent verb_noun snake_case pattern: scan_path, scan_text, verify_lockfile. The convention is predictable and easy to reason about.

    Tool Count5/5

    Three tools are well-scoped for a focused security-auditing server, with each covering a clear input mode. No tool feels redundant or out of place.

    Completeness4/5

    The set covers path auditing, raw text inspection, and lockfile verification, which are the core detection workflows. A minor gap is the absence of a tool to create or update the lockfile, and no remediation/reporting operation, but core scanning is complete.

    Maintenance

    ActivityNo data
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables authorized security auditing of AI-agent supply chains and agent-facing surfaces: deterministic local skill-bundle audits against eight attack patterns, secrets scanning, and scope-gated read-only recon of agent endpoints and MCP surfaces.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables enterprise MCP security auditing through 12 deterministic no-LLM tools for evidence-gated claims, skill/prompt supply-chain audits, token profiling, and server auth-mode checks.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A read-only MCP server that lets an agent audit its own environment by discovering local MCP configurations and skill folders on Windows, macOS, and Linux and running offline static checks for prompt injection, hidden instructions, hardcoded secrets, dangerous commands, unpinned packages, and excessive filesystem or transport permissions. It exposes tools to scan everything discovered, list configurations, vet a single skill, or analyze supplied text, returning text, JSON, SARIF, or HTML findings with CI-friendly severity levels.
      14 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Local-first security scanner for AI agent skills, plugins, hooks and MCP servers. Read-only, offline tools to scan a skill or MCP server before installing it, audit the installed setup and review proxy pins.
      5
      38 npm
      MIT