A Claude Code plugin that verifies and enforces use of the latest stable library and package versions using live documentation lookups.
Claude's training data has a knowledge cutoff. When recommending library versions, install commands, or dependency configurations, it may suggest outdated versions — leading to:
- Security vulnerabilities from known-vulnerable older releases
- Wasted migration effort when users install old versions and immediately need to upgrade
- Deprecated API usage from code examples targeting superseded releases
- Poor developer experience from outdated patterns and missing features
version-guard intercepts version-sensitive contexts and verifies the current stable release against live documentation via the Context7 MCP server before making any recommendation. It works across 13+ package ecosystems.
| Ecosystem | Dependency Files |
|---|---|
| Node/npm | package.json, package-lock.json |
| Python/pip | requirements.txt, pyproject.toml, setup.py, Pipfile |
| Python/uv | pyproject.toml, uv.lock |
| Python/poetry | pyproject.toml, poetry.lock |
| Rust/cargo | Cargo.toml, Cargo.lock |
| Go | go.mod, go.sum |
| Ruby | Gemfile, Gemfile.lock, *.gemspec |
| Java/Maven | pom.xml |
| Java/Gradle | build.gradle, build.gradle.kts |
| .NET | *.csproj, packages.config |
| PHP/Composer | composer.json, composer.lock |
| Swift | Package.swift |
| Elixir | mix.exs |
claude plugin install version-guard@<marketplace-name>
Clone the repository and install from the local directory:
git clone https://github.com/zircote/version-guard.git
claude plugin install --local /path/to/version-guard
claude plugin install --git https://github.com/zircote/version-guard.git
- Claude Code CLI
- Context7 MCP server — The plugin uses Context7 for live documentation lookups. Configure it in your Claude Code MCP settings:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@context7/mcp"]
}
}
}
- Network access — Required to query Context7 and (as a fallback) web search for version info
/version-guard
Then describe the library or dependency you need to verify. For example:
/version-guard What is the latest version of React?
The plugin activates automatically when Claude detects version-sensitive contexts:
- Recommending or selecting a library version
- Adding dependencies to a project
- Writing install commands (
npm install,pip install,cargo add, etc.) - Writing code examples with version-sensitive imports
- Responding to "what version of X should I use?" questions
- Upgrading or auditing existing dependencies
When the plugin verifies a version, you'll see output like:
Using React v19.1.0 (verified current — training data may reference v18.x)
If a breaking change is detected:
React 19 removed legacy context API (
contextType). UsecreateContext+useContextinstead. See migration guide: https://react.dev/blog/2024/04/25/react-19-upgrade-guide
- Detects version-sensitive context in the conversation
- Loads Context7 MCP tools (deferred tools, loaded on demand)
- Resolves the library via
mcp__context7__resolve-library-id - Queries current documentation via
mcp__context7__query-docs - Applies the verified version to recommendations and install commands
- Flags breaking changes and deprecated patterns when upgrading
If Context7 cannot resolve a library, version-guard falls back to:
- Web search for the latest release
- GitHub releases page or package registry
- Clearly states the source of version information
version-guard/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── commands/
│ └── version-guard.md # User-invocable /version-guard command
├── skills/
│ └── version-guard/
│ └── SKILL.md # Proactive skill definition
├── references/
│ └── ecosystem-patterns.md # Ecosystem detection and naming patterns
├── LICENSE
└── README.md
No additional configuration is needed beyond the Context7 MCP server. The plugin works out of the box once installed and Context7 is available.
MIT License. See LICENSE for details.