SkillAgentSearch skills...

vibe-shield

92-rule static security scanner (SAST), secret detector, Supabase RLS auditor & SKILL.md prompt-injection guard for AI-generated Next.js/TypeScript apps. CLI & MCP server.

Install / Use

claude mcp add avivgerz-hue -- npx -y github:avivgerz-hue/vibe-shield

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

79/100

Category

Security

Supported Platforms

Claude Code
Claude Desktop
Cursor

Our assessment of vibe-shield

vibe-shield scores 79/100 on our quality scale, 1010th of 1,105 Security skills we index.

Its MCP Server is 35 KB long, well organised into 41 sections with 22 code examples: a thorough specification that gives an agent plenty to work with.

It has 45 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
7/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated today, so vibe-shield is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

vibe-shield compared with similar skills

All 4 of these similar skills score higher than vibe-shield; compare them before choosing.

SkillScoreStarsUpdatedFormat
vibe-shield (this skill)by avivgerz-hue7945todayMCP Server
Agent-Reachby Panniantong100112.4k9d agoCLAUDE.md
rufloby ruvnet10081.9ktodayCLAUDE.md
headroomby headroomlabs-ai10079.9ktodayCLAUDE.md
CowAgentby zhayujie10048.0ktodayCLAUDE.md

Frequently asked questions

How do I install vibe-shield?
Run claude mcp add avivgerz-hue -- npx -y github:avivgerz-hue/vibe-shield. The install tabs above show the steps for each supported agent.
Which AI agents does vibe-shield work with?
It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
Is vibe-shield safe to use?
It is MIT-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is vibe-shield still maintained?
The repository was last updated today, so vibe-shield is actively maintained.

🛡️ vibe-shield

📊 2026 Empirical Security Benchmark: We audited 160 published AI, MCP & Agent Skill packages (7,062 files) with ibe-shield — uncovering 597 security findings (167 Critical, 82 High) across CWE-798, CWE-89, CWE-639, and SKILL.md surfaces. Read the full benchmark & dataset →

The security gate for AI-written code. Find exposed secrets, unguarded routes and missing RLS before you ship.

⭐ If this tool helps your AI coding workflow, please give this repository a Star! It helps more developers discover the project.

npm version npm downloads CI node license zero dependencies rules self-scan

Live Terminal Demo

npx -y @vibefoundry/vibe-shield@latest scan .

<sub>Illustrative two-file scan; fixes are applied manually. Results vary by project. A clean score is not a security guarantee.</sub>

VibeFoundry Agent Suite

  • 🎨 unslop — UI Design DNA & Anti-Slop Engine · npx -y unslop-mcp@latest init
  • 🛡️ vibe-shield — Security Scanner for AI Code · npx -y @vibefoundry/vibe-shield@latest scan .
  • 👻 ghost-qa — Autonomous Headless Browser QA · npx -y ghost-qa@latest test http://localhost:3000

vibe-shield is a static security scanner plus an Agent Skill that helps Claude Code, Codex, Cursor and Windsurf audit before they say “done”.


v2.0.0: eight defensive vectors

The v2 catalogue covers client exposure; auth and route protection; database/RLS; AI and web sinks; infrastructure; dependency hygiene; secrets and cryptography; and agent/MCP integrity. The new hardening checks include production source maps, insecure JWT settings, explicit and omitted cookie flags, locally absent security headers, container users, lifecycle scripts, lockfiles and weak cryptography. Run rules for the complete catalogue.

The scanner produces a heuristic attack-surface inventory of route methods, observed guard signals, SQL tables and RLS signals, AI entrypoints, and MCP/agent files. Header checks cover recognized server configuration files; cookie checks cover common literal setter options. Both are advisory: external middleware, deployment settings and dynamic options require review. Signals do not prove guards or policies work, and code outside the scanned scope is not assessed. Run audit-skills separately for agent-integrity checks.

Generate an executive report or agent remediation prompt explicitly:

npx -y @vibefoundry/vibe-shield scan --report SECURITY-REPORT.md --patch-prompt PATCH-PROMPT.md
npx -y @vibefoundry/vibe-shield scan --format html --out security-report.html
npx -y @vibefoundry/vibe-shield audit-skills --report agent-report.html

Reports include severity, CWE, locations, snippets, OWASP 2025 web mappings for every rule and contextual LLM mappings when applicable, and illustrative remediation. Examples are not automatic project-specific patches; validate them against the application. The scanner itself is offline and read-only by default; --cache, --out, --report, --patch-prompt and init explicitly write files. Installing with npx can require network access. An A+ score applies only to the rules and files examined and is not a security certification.

The npm 2.0.0 artifact predates the universal --agents initializer. Use npm 2.1.0 or later (once published), or the GitHub v2 ref. To exercise this checkout locally, run npm ci && npm run build, then node dist/bin/vibe-shield.js with the same arguments.


The problem, in one file

This is the shape of code an agent writes when you ask for "a delete endpoint":

// app/api/users/route.ts
export async function DELETE(req: Request) {
  const { id, userId } = await req.json();
  await db.query(`DELETE FROM users WHERE id = ${id} AND owner = ${userId}`);
  return new Response('ok');
}

It works. It also has three critical vulnerabilities — no authentication, SQL injection, and an IDOR that lets the caller choose whose data they delete. Nothing in a normal review loop catches all three, and the agent reported the task as complete.

npx -y @vibefoundry/vibe-shield scan catches all three in 17 milliseconds:

🛡️  vibe-shield · security scan (illustrative output for current source)
target  /home/you/app

💀 GRADE F — 0/100 · 3 critical

  CRITICAL 3    ███

Findings

app/api/users/route.ts
  CRITICAL 2:1      VSB-AUTH-001  Next.js App Router mutation handler has no authentication check
           export async function DELETE(req: Request) {
  CRITICAL 4:22     VSB-DB-007    SQL statement built by concatenating request data
           await db.query(`DELETE FROM users WHERE id = ${id} AND owner = ${userId}`);
  CRITICAL 4:22     VSB-AUTH-004  Record ownership taken from the request instead of the session (IDOR)

  7 files  ·  1 KiB  ·  412 files/s  ·  17 ms  ·  80 rules

  ⚠  3 critical findings — rotate any exposed credential before anything else.
  Fix it      npx -y @vibefoundry/vibe-shield scan --fix-prompt    # writes SECURITY_PATCH_PROMPT.md for your agent
  Explain     npx -y @vibefoundry/vibe-shield explain VSB-AUTH-001
  Gate CI     npx -y @vibefoundry/vibe-shield scan --fail-on critical --format github

Then hand the fix list to the agent that wrote the bug:

npx -y @vibefoundry/vibe-shield scan --fix-prompt   # → SECURITY_PATCH_PROMPT.md

That file contains, for every finding: the severity, the CWE id and link, the exact file:line, the vulnerable snippet, the ordered remediation steps, the target code shape, and a verification command. It is written for a machine to execute and a human to audit.


⚡ Quick start

# 1. Scan (npx may download the package; the scanner itself is offline)
npx -y @vibefoundry/vibe-shield scan

# 2. Give your agent the fix list
npx -y @vibefoundry/vibe-shield scan --fix-prompt

# 3. Install the gate permanently — skill + CI + ignore file
npx -y github:avivgerz-hue/vibe-shield#v2 init --agents all

Use the scoped name. vibe-shield is published as @vibefoundry/vibe-shield. The unscoped name vibe-shield on npm belongs to an unrelated project, so npx vibe-shield runs someone else's code. Always include the @vibefoundry/ scope. The package ships a prebuilt dist/, needs no TypeScript, and starts in milliseconds.

Supported Coding Agents (1-Command Setup)

Run this from the repository you want to protect (Node.js and Git required):

npx -y github:avivgerz-hue/vibe-shield#v2 init --agents all

To configure selected agents, substitute a comma-separated list such as --agents claude,cursor,zed:

| Agent | Selector | Native integration | | --- | --- | --- | | Claude Code | claude | .mcp.json, CLAUDE.md, .claude/skills/vibe-shield/SKILL.md, .claude-plugin/plugin.json | | OpenCode | opencode | opencode.json MCP and AGENTS.md | | OpenAI Codex CLI / universal agents | codex | AGENTS.md and .agents/skills/vibe-shield/SKILL.md | | Cursor | cursor | .cursor/mcp.json and .cursor/rules/vibe-shield.mdc | | Windsurf | windsurf | .windsurfrules | | VS Code / GitHub Copilot | copilot | .vscode/mcp.json and .github/copilot-instructions.md | | Cline / Roo Code | cline or roo | .clinerules | | Zed | zed | .zed/settings.json context server |

The existing --agent claude|cursor|generic|all remains supported. The shared .mcp.json, ignore file, and (unless --no-workflow is set) CI workflow are also installed. JSON configuration is merged by server name; malformed JSON or JSON with comments is left untouched and reported. Existing instructions are appended only once, and existing files are not overwritten without --force. Restart the relevant editor or reload its configuration after setup.

🧠 Why AI code needs its own scanner

Traditional SAST rules are built around human mistakes: a forgotten escape, a missing prepare(). Agent-written code fails differently — it is confidently complete and structurally plausible:

| What a human does | What an agent does | | --- | --- | | forgets to validate one input | writes a perfect endpoint with no auth at all | | uses eval in one legacy file | puts a tool execute that shells out behind an LLM | | commits a .env by accident | puts SUPABASE_SERVICE_ROLE_KEY behind NEXT_PUBLIC_ because "it needed the env var" | | writes CREATE TABLE | writes CREATE TABLE and forgets the ENABLE ROW LEVEL SECURITY, so the anon key reads everything | | adds dangerouslySetInnerHTML to render a doc | renders model output with it, creating stored XSS with a step counter |

vibe-shield encodes those specific shapes: 92 signatures across eight defensive categories, each one derived from a real agent-generated bug rather than a generic CWE checklist.


📊 Vulnerability Coverage Matrix

Client-boundary limitation: Client reachability is a best-effort static graph of literal imports, re-exports and require calls using relative paths and root tsconfig.json/jsconfig.json aliases. Dynamic paths, inherited or nested configurations, excluded or oversized files and other bundler resolution may be missed. A server-side service-role helper still bypasses RLS: use import 'server-only', authorize every privileged request, and verify the production bundle. Auth-helper names and with* wrappers are signals, not proof that authorization is enforced.

80 code signatures + 12 agent-integrity signatures = 92. The scan command runs the 80 code rules; audit-skills runs the 12 agent rules. Every rule has an id, a CWE, an illustrative vulnerable shape, remediation guidance, and an OWASP association — run npx -y @vibefoundry/vibe-shield rules or npx -y @vibefoundry/vibe-shield explain <ID>.

Client-side secret & data exposure — VSB-CLIENT-*

| ID | Detects | CWE | Sev | | --- | --- | --- | --- | | VSB-CLIENT-001 | NEXT_PUBLIC_ / VITE_ / PUBLIC_ / REACT_APP_ + a server-only secret name (SERVICE_ROLE_KEY, OPENAI_API_KEY, STRIPE_SECRET_KEY, DATABASE_URL…) | CWE-200 | critical | | VSB-CLIENT-002 | server-only process.env.*SECRET* read inside a "use client" module | CWE-200 | high | | VSB-CLIENT-003 | createClient(url, SERVICE_ROLE_KEY) — RLS bypass in a client-reachable file or public env | CWE-250 | critical | | VSB-CLIENT-004 | supabaseAdmin / adminClient / serviceRoleClient referenced from browser code | CWE-250 | critical | | VSB-CLIENT-005 | dangerouslyAllowBrowser: true, provider SDK keyed in the browser | CWE-749 | high | | VSB-CLIENT-006 | .env* assigns a live-looking cred

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars45
CategorySecurity
Updated8h ago
Forks2

Languages

TypeScript

Trust signals

97/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 info