claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Verifies a package exists before install, defending against hallucination and slopsquatting. Use when adding, recommending, or installing a package.
$ npx -y skills add athola/claude-night-market --skill dependency-verification --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dependency-verificationContext preview
The summary Claude sees to decide when to auto-load this skill.
Verifies a package exists before install, defending against hallucination and slopsquatting. Use when adding, recommending, or installing a package.
name: dependency-verification description: Verifies a package exists before install, defending against hallucination and slopsquatting. Use when adding, recommending, or installing a package. alwaysApply: false category: workflow-methodology tags: - dependencies - supply-chain - hallucination - slopsquatting - verification dependencies: [] tools: [] usage_patterns: - pre-install-verification - supply-chain-defense - dependency-review complexity: basic model_hint: standard estimated_tokens: 1400 modules: - modules/registry-checks.md role: library
> A package name the model produced is a claim, not a fact. The > registry is the fact. Verify before you install.
Code-generating language models recommend packages that do not exist at a measured rate of 5.2% (commercial models) to 21.7% (open models) across 576,000 samples (Spracklen et al. 2024, arXiv 2406.10279). Worse, 58% of hallucinated names recur across reruns, so an attacker can predict them, register the empty name, and ship malware. This is "slopsquatting." A proof-of-concept package (`huggingface-cli`) drew over 30,000 downloads after being registered against a commonly hallucinated name. Package hallucination is also inversely correlated with coding-benchmark score, so a better model does not make this go away.
The defense is cheap: confirm the name exists in its registry before installing or recommending it. This skill defines that check and is enforced by the `guard_package_hallucination.py` PreToolUse hook.
Apply before any of these:
`yarn add`, `cargo add`, `poetry add`, or `pdm add`.
`package.json`, or `Cargo.toml`.
`sanctum:version-updates`)
`leyline:supply-chain-advisory`)
A package fails verification on either signal:
1. **Nonexistent**: the name is absent from its registry. This is a likely hallucination. Do not install it. Search for the correct name or confirm the package was renamed or removed. 2. **Typosquat / slopsquat**: the name is one or two edits from a popular package (for example `reqeusts` versus `requests`). This is either a typo or a deliberate impersonation. Confirm the exact name you intend before proceeding.
A name that is unknown to the bundled popular-package set but present in the registry passes. A name that cannot be checked because the registry is unreachable is reported as `unverified`, never blocked: the guard does not fail closed on a network error.
Registry existence is the pass/fail check. Real-world usage is a separate, softer signal that builds confidence on top of it. Once a package clears the two signals above, cross-checking that it is actually used by other projects raises your confidence that the name is the established one rather than a freshly-registered impostor that happens to exist.
Useful confidence signals, none of them blocking:
(an established package is imported across many repositories).
the package's source.
name registered yesterday is a red flag; a modest name with years of releases is reassuring).
Treat low usage as a prompt to look closer, never as a reason to reject on its own. New, niche, internal, and private packages are legitimately low-usage, so a missing GitHub footprint must not block an install the registry already confirmed. Use this signal to build confidence and to disambiguate between two similarly-named packages, not to gate.
1. Extract the exact package names the command or manifest edit would fetch (strip version specifiers and flags). 2. For each name, confirm existence in the registry. See [registry-checks.md](modules/registry-checks.md) for the per-ecosystem endpoints and the offline-degradation rule. 3. For any name close to a popular package, restate the intended name and confirm it is the one you meant. 4. Capture the verification as evidence (the registry URL and the HTTP status) when the install lands in a PR, per `imbue:proof-of-work`.
The `guard_package_hallucination.py` hook runs this check automatically on every Bash install command. Shadow mode (warn only) is the default; set `VOW_SHADOW_MODE=0` to block typosquat and nonexistent installs. Disable the network lookup with `IMBUE_PKG_REGISTRY_CHECK=0` to rely on the offline typosquat signal alone. The hook is a backstop, not a substitute: verify deliberately when you add a dependency rather than waiting for the gate.
auditing (lockfile drift, artifact integrity, bad versions).
confirmed present in its registry, or the install is abandoned.
and confirmed before install.
unverified and not silently installed.
proof-of-work evidence.
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.