agentleFS
tarek-zytarek-zy/anti-slopware/skills/dep-check/SKILL.md

dep-check

Skill2 starsChanged 6 days agoMITView on GitHub

Checks a project's dependencies against what the code really uses - finds declared packages nothing uses, imports of packages that are not declared, and names that may not exist at all (AI-invented packages), and never adds a package without evidence that it exists. Reports by default; edits the manifest on request. Use when the user asks to check, audit, prune or clean up dependencies, requirements or packages, asks about unused or missing dependencies or hallucinated packages, or types /dep-check or /anti-slopware deps.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. kronus-tech/kronus★ 4same name
    2. jrittelmeyer/ai-dev-kit★ 1same name
    3. shivae372/claude-bootstrap★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every dependency is code you did not write, running with your permissions.

    line 11
  2. Very specific:

    Declared: every manifest (requirements*.txt, pyproject.toml, setup.cfg, package.json, go.mod, Cargo.toml, pubspec.yaml, composer.json, …

    line 25
  3. Distinctive:

    Imported: every import in source and tests.

    line 26
  4. Distinctive:

    Run what is installed and confirm each hit by reading, because these tools misjudge the cases in step 6.

    line 33
  5. Distinctive:

    Check every missing package, and every declared package that is new in the current change.

    line 55
  6. Distinctive:

    Unused: remove the line from the manifest.

    line 77
  7. Distinctive:

    Missing, and it exists: add it, with the version from the lock file or the installed version.

    line 78
  8. Distinctive:

    Missing, could not verify: do not add it. Report it and tell the user to check the registry.

    line 79
  9. Distinctive:

    Missing, not in the registry: do not add it. The import is a bug in the code.

    line 80
  10. Distinctive:

    Do not run an install. Tell the user the command that refreshes the environment and the lock file.

    line 83
  11. Distinctive:

    Every import in the code is either declared, standard library, or listed in the report.

    line 88
  12. Distinctive:

    Run the project's checks if its dependencies are installed.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

dep-check

Every dependency is code you did not write, running with your permissions. Keep the list equal to what the project uses: nothing extra, nothing missing, nothing invented.

1. Read the request

ArgumentMeaningDefault
reportList findings. Change nothing.on
fixEdit the manifest, after showing the listoff
a pathProject or package folderthe repository root

This skill edits dependency manifests only. It never edits source code, never installs, upgrades or removes installed packages, and never rewrites a lock file.

2. Gather

  • Declared: every manifest (requirements*.txt, pyproject.toml, setup.cfg, package.json, go.mod, Cargo.toml, pubspec.yaml, composer.json, Gemfile, pom.xml, build.gradle) and its lock file.
  • Imported: every import in source and tests.
  • Used without an import: commands in scripts, Makefile, Procfile, Dockerfile and CI files; plugins and presets named in tool configuration; entry points; connection strings that select a driver.

Standard-library modules are not dependencies.

3. Use tools first

Run what is installed and confirm each hit by reading, because these tools misjudge the cases in step 6.

EcosystemTools
Pythondeptry ., pip-check-reqs
JavaScript, TypeScriptknip, depcheck
Gogo mod tidy -diff (Go 1.23+), go mod why <module>
Rustcargo machete, cargo udeps
PHPcomposer-unused
Dart, Flutterdart pub deps, the analyzer's depend_on_referenced_packages lint

4. Classify

  • Unused: declared, never imported, and not used by any command, configuration or connection string.
  • Missing: imported but not declared. It works today only because another package happens to pull it in, or it is installed on this machine.
  • Misplaced: a test or build tool among runtime dependencies, or the reverse.
  • Overlapping: two packages doing one job. Report it as a question, not a fault.

5. Does the package exist?

AI-written code sometimes imports packages that were never published, and attackers register those names. So before a name is added to a manifest, there must be evidence that it exists.

Check every missing package, and every declared package that is new in the current change. Long-standing declared packages are not checked.

Evidence, in this order:

  1. An entry in the lock file.
  2. It is installed in the project's environment.
  3. A lookup of the exact name in the ecosystem's registry, when the network is available. If it exists, check it is the package the code means and not a look-alike of a well-known one.

None of these: the answer is "could not verify". Your own memory of a package name is not evidence; that is how invented names get in. Never install a package to find out whether it exists.

6. Not unused

  • The import name differs from the package name: PyYAML is yaml, python-dateutil is dateutil, Pillow is PIL, beautifulsoup4 is bs4, scikit-learn is sklearn.
  • Plugins and presets a tool loads by name: pytest plugins, linter plugins, Babel presets, webpack loaders.
  • Command-line tools called from scripts, Procfile, Dockerfile or CI: servers, migration tools, formatters.
  • Drivers selected by a connection string or configuration, such as a database driver named in a URL.
  • Optional imports inside try/except ImportError.
  • Type stubs and @types/* packages.
  • Peer dependencies, and packages loaded through entry points or dynamic imports.

7. Fix (only with fix, after showing the list)

  • Unused: remove the line from the manifest.
  • Missing, and it exists: add it, with the version from the lock file or the installed version.
  • Missing, could not verify: do not add it. Report it and tell the user to check the registry.
  • Missing, not in the registry: do not add it. The import is a bug in the code. Report the file and line; do not edit the code.
  • Misplaced and overlapping: report only, unless the user asks.

Do not run an install. Tell the user the command that refreshes the environment and the lock file.

8. Verify

  • The manifest still parses.
  • Every import in the code is either declared, standard library, or listed in the report.
  • Run the project's checks if its dependencies are installed. If they are not, say the checks did not run.

9. Report

dep-check: <declared> declared, <imported> imported

Unused: <n>
  - <package>: no import, command or configuration uses it. <removed | reported>
Missing: <n>
  - <package>: imported in <file>:<line>. Exists: <yes, lock file | yes, installed | yes, registry | no, not in the registry | could not verify>. <added <version> | not added>
Misplaced: <n>
Overlapping: <n>
Kept (looks unused, is not): <package>: <why>
Checks: <what ran, or why it did not>
Next: <command to refresh the environment and lock file>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.