Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

A developer's terminal showing a Claude Code session with a highlighted warning message about a hallucinated npm…
Open SourceScore: 100

Version Sentinel: A Claude Code Plugin That Blocks Hallucinated Package Versions

Version Sentinel uses Claude Code's hook system to intercept dependency changes and require version verification, preventing supply-chain risks from hallucinated package versions.

·Apr 27, 2026·3 min read··388 views·AI-Generated·Report error
Share:
Source: dev.tovia devto_claudecode, reddit_claude, gn_claude_code, hn_claude_code, medium_claudeWidely Reported
TL;DR

Stop Claude Code from installing fake or outdated packages — Version Sentinel hooks into manifest edits and blocks them until you verify the version.

What Changed

If you've used Claude Code for any length of time, you've seen it do this:

npm install lodash@4.17.21

...when the latest version is actually 4.17.21 (or worse, a version that doesn't exist on the registry at all). Claude hallucinates package versions just like it hallucinates anything else — and that's a supply-chain risk.

Developer KSEGIT built Version Sentinel, a Claude Code plugin that uses the hook system to hard-block any dependency change until you've verified the version is real and current.

How It Works

Version Sentinel intercepts two types of actions via PreToolUse hooks:

  1. Manifest file edits — changes to package.json, requirements.txt, pyproject.toml, Cargo.toml, *.csproj
  2. Install commandsnpm install, pip install, cargo add, dotnet add

If there's no fresh version check on record → the action is blocked with exit code 2. You then run WebSearch to verify the latest version, use /vs-record to log it, and Claude retries the action.

PostToolUse hooks auto-record successful installs, so verified packages stay unblocked for future sessions.

Try It Now

claude plugin add KSEGIT/Version-Sentinel

Cover image for I Built a Claude Code Plugin That Blocks Hallucinated Package Versions

Prerequisites: bash, jq, curl, python3

Once installed, you also get the /check-versions command — it audits ALL dependencies in your project against upstream registries. It reports drift without blocking, showing you which deps are outdated and which are intentionally pinned.

Why This Matters

This is a concrete example of using Claude Code's hook system to build guardrails around a specific failure mode. The same pattern could be applied to:

  • Blocking rm -rf / or other destructive shell commands
  • Requiring confirmation before modifying production config files
  • Enforcing that API keys or secrets aren't written to source files

Version Sentinel is MIT-licensed and available on GitHub at KSEGIT/Version-Sentinel.

gentic.news Analysis

This plugin addresses a real pain point that's been discussed extensively in the Claude Code community. As we've covered in previous articles on Claude Code's hook system, the PreToolUse and PostToolUse hooks are still underutilized by most developers. Version Sentinel demonstrates the pattern well: intercept, verify, then proceed.

Anthropic (the company behind Claude Code, founded 2021, HQ San Francisco) has been rapidly iterating on the Claude Code product since its 2025 launch. The hook system was added in response to developer feedback about safety and control — and this plugin is exactly the kind of community-built guardrail they envisioned.

For developers managing large projects with Claude Code (like the parallel instance architecture we covered last week), this plugin could be a critical safety net. When you're running 10+ instances simultaneously, you can't manually verify every package version Claude suggests.

What to do: Install Version Sentinel today, then think about what other guardrails you could build using the same hook pattern. The plugin's source code is MIT-licensed, so you can fork it and adapt it for your own failure modes.

[Updated 02 May via hn_claude_code]

Another Claude Code plugin, Governor by 0xhimanshu, tackles a different pain point: token and context waste. Governor monitors Claude's context window usage and can automatically trigger cleanup actions when it approaches limits, preventing costly context overflows. It's available on GitHub at 0xhimanshu/governor and was recently discussed on Hacker News (16 points, 3 comments). While Version Sentinel blocks supply-chain risks, Governor addresses efficiency—together they showcase the growing ecosystem of community-built guardrails for Claude Code.


Sources cited in this article

  1. KSEGIT
Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from 1 verified source, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

**What Claude Code users should do differently:** 1. Install Version Sentinel immediately if you use npm, pip, Cargo, or .NET — it's a one-command install (`claude plugin add KSEGIT/Version-Sentinel`) and immediately protects against hallucinated versions. 2. Use the `/check-versions` command weekly to audit your entire dependency tree. This catches drift before it becomes a security issue. 3. Study the plugin's source code on GitHub to understand how PreToolUse hooks work. The same pattern can be adapted for other safety checks — for example, blocking edits to `.env` files or preventing `rm -rf` commands. **Workflow change:** When Claude Code suggests installing a package, pause and let it run WebSearch first to verify the latest version. Version Sentinel enforces this, but you can also adopt it as a manual habit.
Compare side-by-side
Claude Code vs Version Sentinel

Mentioned in this article

Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Open Source

View all