pkg guard

    1

    Prevent typosquatting and hallucinated package installs with automated dependency verification and lockfile scanning.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    pkg guard

    Example session with this skill installed

    I need a library to handle dates in this Node project. Can you install 'moment-js'? Also, scan the current repo for risks.

    • Read your context and instructions
    • Compiled the pkg guard

    I have audited the repository and checked the requested package. The scan of your existing package.json and package-lock.json found no high-risk dependencies. However, I have blocked the installation of moment-js because it appears to be a typosquat or hallucination of the popular moment library.

    Dependency Security Report

    ActionTargetResultReason
    Scanpackage.jsonPASSNo suspicious packages found in manifest.
    Scanpackage-lock.jsonPASSLockfile hashes appear consistent.
    Checknpm install moment-jsBLOCKEDPackage "moment-js" looks like a typosquat of "moment".
    Checknpm install momentRECOMMENDEDEstablished package with high download volume.

    I recommend installing moment instead, or better yet, using the native Intl object if you only need basic formatting to avoid adding a dependency.

    Next steps

    • Run npm install moment if you require the full library features.
    • Review your PKG_GUARD_ALLOW environment variable if you intended to use a specific fork.
    • Consider using native Date methods to keep the dependency tree light.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Supply chain attacks via typosquatting and slopsquatting are a constant threat to developer environments. This skill enforces a strict verification workflow before any new package enters your codebase, preventing the accidental installation of malicious or hallucinated dependencies. It integrates a defensive check into the agent's decision-making process to ensure every npm install or pip install command is legitimate.

    What it does

    • Dependency verification checks package names against typosquatting patterns and known popular libraries.
    • Risk assessment blocks packages that are brand new, have low download counts, or contain suspicious postinstall scripts.
    • Project auditing scans existing lockfiles (package.json, pyproject.toml, Cargo.toml) for pre-existing vulnerabilities.
    • Standard library preference prioritizes built-in language features over adding unnecessary third-party bloat.
    • Automated blocking uses a dedicated Python script to validate installation commands before execution.

    How it works

    1. Inventory check involves auditing the current manifest files to see if the required functionality is already available.
    2. Command validation runs the pkg_guard.py check command on any proposed installation string.
    3. Risk reporting identifies why a package was flagged, such as "first published N days ago" or "looks like a typosquat".
    4. Resolution requires the agent to find established alternatives or ask for manual user overrides via environment variables.

    Frameworks & tools

    The skill supports all major package managers including npm, pip, uv, poetry, cargo, gem, and go. It uses a standalone pkg_guard.py script compatible with Python 3.9+.

    Why this beats prompting it yourself

    Generic prompts often fail to catch subtle typos or "slopsquatted" packages that AI models frequently hallucinate. This skill uses a deterministic script to verify real-world package metadata and download counts, providing a layer of security that LLM reasoning alone cannot guarantee.

    Use cases

    • Prevent installing a hallucinated Python library suggested by an LLM.
    • Audit a legacy repository's lockfiles for suspicious dependencies.
    • Verify if a new npm package is a typosquat of a popular utility.
    • Block packages that execute untrusted code during the postinstall phase.

    Known limitations

    Requires Python 3.9+ to run the validation script. The agent cannot bypass blocks and requires the user to manually update PKG_GUARD_ALLOW if a flagged package is genuinely required.

    Requires Python 3.9+. Agent cannot bypass blocks; users must manually set PKG_GUARD_ALLOW for exceptions. Supports npm, pip, uv, poetry, cargo, gem, and go.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 21 days ago

    • Free with an Agensi account

    Requires

    GitHub
    Golang
    Deps
    Npmjs
    Pypi
    Crates
    Rubygems
    X
    Node.js
    uv (Python tool runner)

    Permissions

    Terminal / Shell
    Browser
    Network Access
    Read Files
    Write Files
    Environment Variables

    Allowed Hosts

    github.com
    proxy.golang.org
    api.deps.dev
    api.npmjs.org
    registry.npmjs.org
    pypi.org
    crates.io
    rubygems.org
    Listed21 days ago

    What's inside

    Frequently Asked Questions

    Pkg Guard prevents "slopsquatting" (installing AI-hallucinated packages) and typosquatting by verifying package names and metadata against real-world registries before any installation command is executed.

    The skill is compatible with all major package managers, including npm, pip, uv, poetry, cargo, gem, and go, provided the agent's environment has Python 3.9+ installed to run the validation script.

    Pkg Guard includes the core validation script, the agent-specific configuration logic, and a set of security protocols that integrate directly into your agent's decision-making workflow.

    The skill uses a deterministic script to check live package data; if a legitimate but new package is flagged, you can manually override the block by adding the package name to the `PKG_GUARD_ALLOW` environment variable.

    Unlike a prompt, which relies on the LLM's static training data, Pkg Guard performs real-time verification of download counts, publication dates, and suspicious scripts to provide a factual security layer.

    New in LLM Ops