ai-install-guard

中文文档
0.8.14发布于 2026/11/03Apache-2.0零依赖构建来源已验证

A Claude Code mod that runs in the background: every /plugin install and marketplace you add, yours or Claude's, is scanned before it happens, without running any of it, and nothing installs until you approve.

原始使用文档
文档目录8 节
  1. What it does
  2. Using it
  3. Review badge
  4. What the guard itself can do
  5. Uninstall
  6. Status
  7. Contributing
  8. License
Reviewed by AI Install Guard

AI Install Guard

A Claude Code mod that runs in the background. Install it once, and every /plugin install, marketplace and MCP server, yours or Claude's, and every skill or settings change Claude makes, is checked before it lands: nothing to run, nothing to remember.

AI Install Guard: No red flags at d2ba94d10f3f

npm version npm downloads GitHub stars license last commit

/plugin install ai-install-guard --marketplace ziniman/ai-install-guard

What it does

Everything you add to Claude Code runs with your permissions: a plugin's hooks run every session, an MCP server can download and launch a package, a skill can carry hidden instructions. Checking it is usually a separate step you have to remember, and it never sees what Claude installs by itself.

AI Install Guard lives inside Claude Code instead. When something new is about to be added, it fetches the exact version, reads every file without running any of it, and holds it until you press Install or Reject.

  • Automatic. No command to run first: from the moment it is installed, it is in the way of every install.
  • It catches Claude too. What Claude adds on its own is checked like what you type, and waits for you unless it is something Claude wrote itself with no red flags.
  • Pinned. A verdict belongs to one commit and content hash, and only that version installs.
  • Local and open. No account or server, and every check is in this repository.

It holds /plugin install and /plugin marketplace add, and, when Claude does them: plugin installs, MCP servers it adds, skills, commands and agents it writes with a red flag, settings changes that widen what it may run, and the same changes made with a shell command. A mod that loads with files you never approved (picked from the /plugin menu, updated on its own, changed in place) is kept off until you approve it, a skill that came with no install (from a repository you cloned, copied in by hand) is checked as it is first used, and a plugin that is on but new or changed since the guard last looked (updated on its own, installed from a terminal) is checked as a session starts, as are the MCP servers and hooks in your configuration (brought by a git pull, written by another program's installer). A plugin picked from the menu is not scanned before it installs, so type /plugin install <name>@<marketplace> instead. Where it steps in has every case.

Using it

Install plugins as you always do. The guard answers with a verdict in its pane:

  • No red flags: nothing suspicious. The "It can" line says what it would be able to do, so you can judge whether that fits.
  • Worth a look: something specific deserves a look first.
  • Do not install: a red flag. Installing it anyway asks twice.
  • Could not verify: the guard could not tell what would be installed. Installing it anyway asks twice.

Press Install (i) or Reject (r). When it holds a command Claude ran, approve it in the pane, then tell Claude to run it again.

To check something before you install it anywhere:

CommandWhat it does
/guard scan <folder or repository>Scan it without installing it
/guard reportReopen the last report
/guard listYour approved and rejected versions
/guard heldThe mods kept from loading, and the plugins and configuration that wait for your decision
/guard forget <name>Forget a decision, so it is judged again

The same scanner also runs in Claude chat, as a skill: Use it in Claude chat. For everything else, see How it works, Commands and the pane and the rest of the documentation.

Review badge

If you publish a plugin, scan your repository and run /guard badge for a badge that names the verdict and the exact content scanned. A badge is a picture anyone can paste, so the guard never trusts one: to know, scan the repository yourself. See Review badge.

What the guard itself can do

A security tool should be held to its own rules. Everything this mod uses, as claude plugin validate . lists it:

CapabilityWhy
process.runRuns git to fetch the exact commit being scanned into its own temporary folder, the claude command to validate a candidate, to find where a plugin comes from and to list the plugins that are on, readlink to see where a link points, and printenv to find your home folder. It never runs anything from a candidate.
fs.read, fs.list, fs.statReads the files it scans, where a file Claude is about to write would really land, and, as a session starts, your configuration files. It writes no files itself.
command.runIntercepts /plugin to hold an install, and runs your own /plugin command again once you approve it, or /plugin disable when you turn off a plugin it found on. Sees every other slash command too, to check a skill or command by that name before it runs, and answers only one it holds.
tool.callReads each shell command and file write Claude is about to make, and refuses only those that add something where Claude Code loads from, until you approve. Checks each skill Claude is about to run the same way, and refuses the tools of an MCP server you rejected.
classic.CwdChangedNotes the folder Claude's shell commands run in, so a relative path is read where it lands.
plugin.registerChecks each mod Claude Code is about to load, and keeps out one whose files are not a version you approved.
skill.promptChecks a skill that came with no install (yours, a repository's) again as its instructions load, for one found where the slash command and the Skill tool did not look, and holds one with a red flag until you approve it.
http.fetchReads a GitHub repository's public details (age, stars, whether the commit is signed) and, only if you turn them on, the outside lookups.
store, state, ui, command.registerRemembers your decisions, draws the pane, and adds the /guard command.

Every detail is in What the guard itself can do, and what it cannot promise is in What it is not.

Uninstall

/plugin uninstall ai-install-guard@ai-install-guard

To turn it off for a while, use /plugin disable ai-install-guard@ai-install-guard. The guard fails closed, so a bug could hold something that should have gone through. If it ever gets in your way, turn it off from a terminal outside Claude Code, where it sees nothing, and open an issue:

claude plugin disable ai-install-guard@ai-install-guard

More, including your stored decisions and installs for one project only: Uninstall and troubleshooting.

Status

Early development. The gates above work today; next, an update shows what changed since the version you approved, and an optional model review can add warnings. See the roadmap.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md.

License

Apache 2.0, see LICENSE.

版本与发布记录

ai-install-guard 共发布 31 个版本,首次发布于 2026/10/22;过去 12 个月发布了 31 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.8.14latest2026/11/03今天
0.8.132026/11/03今天
0.8.122026/11/03今天
0.8.112026/11/02今天
0.8.102026/11/021 天前
0.8.92026/11/012 天前

关于 ai-install-guard 的常见问题

ai-install-guard 是什么?

一个后台运行的Claude Code mod:你添加的每一个/插件安装和市场,你的或Claude的,在它发生之前都会被扫描,不运行任何一个,直到你批准才会安装。

如何安装 ai-install-guard?

在项目目录运行 npm install ai-install-guard,或使用 pnpm add / yarn add / bun add。

ai-install-guard 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ai-install-guard 是否存在。

ai-install-guard 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

ai-install-guard 可以商用吗?

ai-install-guard 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

ai-install-guard 还在维护吗?

最新版本 0.8.14 发布于 2026/11/03(今天);至今共发布 31 个版本,其中过去 12 个月发布了 31 个;首次发布于 2026/10/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。