Plan dependency provenance
Skill kensaurus/cursor-kenji/skills/plan-dependency-provenance
π¦Curated Cursor AI agent skills, slash commands, MCP configs, subagents & rules for full-stack dev β React 19, Next.js 15, Supabase, Tailwind v4, TypeScript
npx -y skills add kensaurus/cursor-kenji --skill plan-dependency-provenanceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Audit dependencies for hallucinated or slopsquatted packages, supply-chain risk, and licensing/provenance gaps, then produce a phased remediation plan. Use when the user says "check my dependencies", "is this package real", "slopsquatting", "audit my supply chain", "license check", "SBOM", or "did the AI hallucinate a package". Audits package existence/age/popularity, lockfile integrity, typo-squatted names, transitive bloat, and license provenance. Plan only until approved. Pairs with plan-secrets-audit, workflow-housekeep. Do NOT use for version bumps or bundle size (audit-bundle-size).
The file declares its own license as MIT. That is the authorβs claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.0 KB, as published. Nobody here has run it
Dependency Provenance & Supply-Chain Audit + Remediation Plan
Role: Senior supply-chain engineer + open-source compliance specialist.
Task: Resolve every direct dependency against its registry, run checklist AβE,
build the provenance table, phase remediations, emit plan-dependency-provenance.md.
Audit & plan only β never install suspect packages to verify.
Verify every package is real, safe, and licensed. Install nothing until approved.
In a vibe-coding loop "just install the suggested package" is the default move β
and it's now a documented attack surface. The Cloud Security Alliance's 2026
research found AI coding tools recommend non-existent package names ~20% of the
time, and 43% of those hallucinated names recur on every run of the same prompt.
Consistent hallucinations are predictable; predictable names are registerable.
Attackers pre-register them on npm/PyPI β slopsquatting β then wait for
developers (or autonomous agents) to run the exact npm install / pip install
the AI just wrote. With agents executing their own generated install commands, the
human checkpoint disappears entirely.
This skill is the audit-and-plan half. Execution (removal, replacement, pinning, license remediation) is handed off after you approve each phase.
When this fires
Trigger phrases: "check my dependencies", "is this package real", "slopsquatting", "are my packages safe", "audit my supply chain", "license check", "generate an SBOM", "did the AI invent a package", "pre-launch / pre-open-source dependency audit".
Do not fire for: routine version bumps (/update-deps), bundle-size trimming
(audit-bundle-size), or general repo cleanup (workflow-housekeep). This skill
owns existence, integrity, provenance, and licensing of dependencies.
Why a dedicated skill
/update-deps assumes the packages are legitimate and just need upgrading.
This skill asks the prior question the AI era forces: is this package even real,
who published it, when, and under what license?
The audit
A Β· Existence & slopsquatting (the AI-era core)
- Resolve every direct dependency against its registry. Flag any that don't exist, were published very recently, have near-zero downloads, or inconsistent history.
- Typo / confusion check β names one edit away from a popular package
(
reqests,lodahs), or conflation names merging two real packages. - AI-origin flag β obscure/novel deps in vibe-coded projects: guilty-until-verified.
- Maintainer & repo signals β no source repo, single recent maintainer: elevate.
B Β· Lockfile & integrity
- Lockfile present and committed? No lockfile = every install is a fresh roll.
- Pinned vs floating β wildcard/
^/lateston security-sensitive deps. - Lockfile drift β manifest and lockfile disagree.
C Β· Provenance & patch history
- Source repo reachable, actively maintained, not archived.
- Known vulnerabilities β flag deps with open advisories (recommend Socket.dev /
Phylum /
npm audit/pip-auditin execution). - Install scripts β postinstall reaching network/filesystem: flag for review.
D Β· Licensing
- License inventory β SPDX per dependency. Flag copyleft in proprietary paths, "no license", conflicts with project license.
- Attribution gaps β bundled code lacking NOTICE.
E Β· Bloat & blast radius
- Transitive depth β direct vs total; duplicate libs.
- Unused dependencies β declared but never imported.
For each finding: package, issue, evidence, severity, remediation direction.
Procedure
- Inventory. Parse manifests + lockfiles. State ecosystems and resolution limits.
- Resolve & classify. Checklist AβE. Tag Critical / High / Med / Low.
- Build the provenance table β key artifact.
- Phase the burndown. Verify/remove suspect packages first.
- Emit
plan-dependency-provenance.md. End the turn. Do not install anything.
Guardrails
- Plan only. No
install,add,remove,update, or lockfile edits. - Never install to "check". That is exactly the attack.
- Guilty until verified for AI-suggested obscure deps.
- Existence β safety. Run the full checklist.
- License is a real finding.
- Recommend
create-hookpre-install allowlist as regression gate. - Minimal quoting of manifests.
Report template β plan-dependency-provenance.md
# Dependency Provenance & Supply-Chain Audit β <repo>
_Audit-only. Nothing is installed, removed, or upgraded until each phase is approved._
## Scope
- Ecosystems: npm β pip β other β | Direct deps: n Transitive: n
- Lockfile(s): present β committed β | Assumptions: β¦
## Verdict
| Severity | Count | Worst case |
|----------|-------|-----------|
| Critical | n | non-existent / squat-suspect / malicious package installed |
| High | n | no lockfile, license conflict, open advisory |
| Medium | n | floating pins, abandoned upstream |
| Low | n | bloat, unused deps |
## Provenance table (suspect + notable)
| Package | Exists? | First pub | Weekly DLs | License | Repo | Verdict |
|---------|---------|-----------|------------|---------|------|---------|
| fast-cache-utils | β none found | β | β | β | none | Crit: likely hallucinated β remove |
## Findings
| # | Package | Issue | Evidence | Sev | Direction |
|---|---------|-------|----------|-----|-----------|
## Phased burndown
- **Phase 1 β Verify/remove suspect packages** β manual verify + removal
- **Phase 2 β Lock & pin** β `workflow-housekeep`
- **Phase 3 β License & advisories** β wire Socket.dev/Phylum/npm-audit
- **Phase 4 β De-bloat** β remove unused/duplicate deps
- **Gate** β `create-hook` pre-install allowlist
## Execution handoff
Approve a phase to run it. Re-scan after; add the install-time gate.
Chains with
- Pre-launch hardening loop β supply-chain layer alongside security spine.
plan-secrets-auditβ both feedcreate-hookregression gates.- Execution:
workflow-housekeep,create-hook,/update-deps(after verified),audit-security. - Verify: re-resolve tree; confirm install-time gate is live.
Plan with a strong model; execute with
composer-2.5-execution.mdc. The plan says which packages are suspect; the rule forbids "just installing it to see".