/nightvision:secure-buildfrom nightvision
Secure-by-default rules to follow while writing a web app or API, so vibe-coded and agent-built apps start out safe. Use whenever you create or materially change a web app, API, route handler, login or signup flow, database access, file upload, payment flow, admin page, or an AI feature that calls a model or tools. Covers access control, injection, secrets, sessions, CORS, headers, rate limits, uploads, SSRF, AI features, dependencies and backend-as-a-service rules.
Ships in nightvision. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Rules to apply while you write the code, not after. They cover the mistakes that show up most often in apps built quickly with an AI agent. Following them does not make an app secure on its own: before you call the work done, offer ship-check (or run it, when the developer asked for a security check or their organization requires one), which scans the running app with NightVision and proves what holds up.
Apply these silently as you build. Do not lecture the developer or ask permission to write secure code; just write it that way, and mention a rule only when it changes something they asked for (for example, you refused to put an API key in frontend code).
/orders/{id}, ?userId=, a body field), scope the lookup to the caller: WHERE id = ? AND owner_id = ?, or the framework's policy or permission layer. Checking after fetching is easy to forget on the next route; scoping the query is not. Return 404 for objects the caller does not own.role, is_admin, owner_id, price or tenant_id.authz-review after adding routes that take object IDs.eval, exec, Function(), pickle.loads, unsafe YAML loaders or shell commands built from user input. When a subprocess is unavoidable, pass an argument list, never a shell string.dangerouslySetInnerHTML, v-html, |safe, html_safe or innerHTML unless it went through a sanitizer such as DOMPurify..env files: add them to .gitignore when you create them, and commit a .env.example with placeholder values instead.NEXT_PUBLIC_, VITE_, REACT_APP_, EXPO_PUBLIC_ and similar ship to every browser, so never put a server secret or a service-role key in them. Calls that need a secret go through a server route.HttpOnly, Secure and SameSite=Lax or Strict. Do not keep session tokens in localStorage when a cookie will do.alg: none, set a short expiry, and keep the signing key server-side.SameSite plus an origin check).* with credentials.Strict-Transport-Security, X-Content-Type-Options: nosniff, and frame-ancestors (or X-Frame-Options). Use the stack's middleware (helmet, Django SecurityMiddleware, Spring Security headers) rather than hand-setting them per route.Content-Type and Content-Disposition.eval, a shell, a SQL string or raw HTML.auth.uid(). The anon key is public by design, so a table without RLS is readable by anyone. The service-role key never reaches the client.allow read, write: if true). Rules check request.auth.uid against the document's owner.Offer ship-check before telling the developer the app is done, or run it when a security check was asked for or is required. For a check of the source itself, the source-intelligence skill can also report hardcoded credentials and weak cryptography.
What SKILL.md sets; muted values are Claude Code's defaults
2 plugins ship this exact skill · first indexed Nov 17, 2026
Other plugins' skills for the same job
14 skills in this plugin
/api-discoveryFormer name of the source-intelligence skill, kept so that invoking api-discovery still works. Use source-intelligence instead./app-security-scanDAST-first NightVision scan for an app you just built or changed. Use when a user, or a project or org agent-instructions rule, wants a local, private, staging, or internal web app/API security-scanned. Drives the NightVision MCP `run-app-security-scan` harness./authz-reviewReview an app's object-level and function-level access control (BOLA/IDOR, broken function-level authorization, mass assignment) route by route, then write a two-user test the developer can run against their own local or dev app. Use after adding or changing routes that take object IDs, tenant or user identifiers, or admin-only actions, when a user asks "can one user see another user's data", or as part of ship-check.npx claudepluginhub nvsecurity/nightvision-mcp --plugin nightvision