# What is AI Guard?

Source: https://getaiguard.dev/about · Last updated: 2026-11-14 · AI Guard 1.4.7

AI Guard (eslint-plugin-ai-guard) is an open-source ESLint plugin, CLI and set of agent hooks that catches risky patterns AI coding tools often produce in JavaScript and TypeScript and checks npm packages before they are installed. It is free, MIT licensed, and runs locally: the same code gives the same result, with no model in the loop.

## What it does

- **Lint rules.** 27 rules in 4 presets for patterns such as hardcoded or client-exposed secrets, empty catch blocks, floating promises, imports of packages that are not declared, placeholder code, and tests that cannot fail. They run in ESLint, in Oxlint, or through the zero-config `ai-guard` CLI. See the [rule catalog](https://getaiguard.dev/rules).
- **Checks on an agent's change.** `ai-guard verify` gives one verdict for a change and counts only what the change introduced; `ai-guard integrity` reports changes that weaken checks, such as a skipped test or a new `eslint-disable`. See [Checks on the agent's change](https://getaiguard.dev/docs/verify).
- **Package checks.** `ai-guard verify-deps` looks packages up on npm before they are installed and blocks names that don't exist, removed malware and suspicious look-alikes. See [Package checks](https://getaiguard.dev/package-checks).
- **Agent hooks.** One command, `npx ai-guard init-hooks`, sets up feedback and a finish gate in Claude Code, Codex and Cursor. See [guardrails for AI coding agents](https://getaiguard.dev/guides/ai-agent-guardrails).
- **Pre-commit gate, CI and MCP.** A Git hook, a GitHub Action with Code Scanning output, and an MCP server with 9 tools.

## Who it is for

Teams and individual developers who write JavaScript or TypeScript with AI coding assistants or agents and want deterministic checks at each point code passes through: the editor, the agent's own loop, the commit, and the pull request.

## What it is not

- AI Guard does not detect AI-written code. It reports risky patterns that AI tools often produce, wherever they came from.
- It is not a replacement for type-aware linting, CodeQL, Semgrep, a secret scanner, `npm audit` or code review. It is meant to sit beside them. See [AI Guard and ESLint](https://getaiguard.dev/compare/eslint) and [AI Guard and npm audit](https://getaiguard.dev/compare/npm-audit).
- Lint rules see one file at a time and do not follow data across modules. A security finding means "look here", not "this is exploitable".

## Key facts

| | |
| --- | --- |
| Package | `eslint-plugin-ai-guard` on npm |
| Current version | 1.4.7 (published 13 November 2026) |
| Licence | MIT |
| Requirements | Node.js 20 or later; ESLint 8 or later (flat config and legacy config) |
| Rules and presets | 27 rules, 4 presets |
| MCP server | `ai-guard-mcp`, 9 tools, MCP Registry id `io.github.ai-guard-dev/ai-guard` |
| Machine-readable facts | [/facts.json](https://getaiguard.dev/facts.json), [/llms.txt](https://getaiguard.dev/llms.txt) |

## Who maintains it

AI Guard is developed in the open at [github.com/ai-guard-dev/eslint-plugin-ai-guard](https://github.com/ai-guard-dev/eslint-plugin-ai-guard) by Yash Jadhav and Vaishnavi Sawant. Issues and pull requests are welcome.

```bash
# npm
npm install --save-dev eslint-plugin-ai-guard

# pnpm
pnpm add -D eslint-plugin-ai-guard

# yarn
yarn add -D eslint-plugin-ai-guard

# bun
bun add -d eslint-plugin-ai-guard
```

## Sources

- [README.md](https://github.com/ai-guard-dev/eslint-plugin-ai-guard#readme)
- [CHANGELOG.md](https://github.com/ai-guard-dev/eslint-plugin-ai-guard/blob/main/CHANGELOG.md)
- [npm package page](https://www.npmjs.com/package/eslint-plugin-ai-guard)
- [docs/evidence.md: results on real projects](https://github.com/ai-guard-dev/eslint-plugin-ai-guard/blob/main/docs/evidence.md)
