Guides
Each guide answers one question in its first paragraph, then gives the commands, the limits and the sources. Every page also has a markdown version for agents; see llms.txt.
Guides
- What is slopsquatting?Slopsquatting is registering package names that AI assistants invent, so an agent that installs the invented name gets malware. How it works and how to stop it.
- How do I check an npm package before installing it?Check that an npm package exists, is the one you meant and is not removed malware: by hand with npm view, then automatically with npx ai-guard verify-deps.
- What is a release cooldown (min-release-age), and should I use one?A release cooldown makes your package manager skip versions newer than a set age. Settings for npm, pnpm, Yarn and Bun, and why one day is a good default.
- How do I add guardrails to Claude Code, Codex and Cursor?Add checks to AI coding agents with hooks: feedback after each edit, a finish gate, a guard on git commit --no-verify, a package check and a pre-commit gate.
- Why doesn’t AI Guard automatically fix empty catch blocks and floating promises?An automatic fix that hides a finding without handling the error defeats the purpose. Why no-empty-catch and no-floating-promise offer suggestions, not fixes.
Product
- What is AI Guard?AI Guard is an open-source ESLint plugin, CLI and set of agent hooks for JavaScript and TypeScript. What it does, who it is for, and what it is not.
- How do I stop an AI coding agent from installing a fake or misspelled npm package?AI Guard checks npm packages before install: it blocks names that don’t exist, removed malware and suspicious look-alikes, and warns on very new releases.
- Where does AI Guard run?Set up AI Guard in Claude Code, Codex and Cursor, as a pre-commit gate, in Oxlint, as an MCP server, and in GitHub Actions with Code Scanning.
- What did AI Guard’s package checks do on real projects?0 of 1,361 real dependencies blocked, 34 of 36 crossenv malware names blocked, 27 of 27 rules identical in ESLint and Oxlint. Method, limits and source.
Comparisons
- How does AI Guard relate to ESLint?AI Guard is an ESLint plugin: it adds rules and presets to ESLint and does not replace your config. How it fits with ESLint core, typescript-eslint and Oxlint.
- How is AI Guard’s package check different from npm audit?npm audit reports known vulnerabilities in your dependencies. AI Guard checks names and versions before install. What each does, and why to use both.