agentleFS
lifebugzlifebugz/cc-mermaid/skills/dependency-map/SKILL.md

dependency-map

Skill0 starsChanged 4 months agoMITView on GitHub

Turns the project's dependency manifests into a Mermaid diagram, colour-coded by version staleness and by known vulnerabilities when a security auditor is installed. Reads package.json, requirements.txt, pyproject.toml, Cargo.toml, go.mod, pom.xml, Gemfile and composer.json.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. microsoft/github-copilot-modernization★ 48same name
    2. panpanc/math-skills★ 33same name
    3. limoaCatherine/game-studio-harness★ 4same name
    4. nandanosql/all_in_one_pm_skills★ 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 repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read-only and always exits 0.

    line 22
  2. Very specific:

    If a row's severity is unknown (some auditors report an advisory ID without a band), colour it grey and label it "advisory, severity not …

    line 55
  3. Distinctive:

    Never emit the severity legend in this mode.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Dependency map

Arguments: $ARGUMENTS

Draw the project's declared dependencies, coloured by risk.

Collect the facts

bash "${CLAUDE_PLUGIN_ROOT}/scripts/deps-collect.sh" <path>

Read-only and always exits 0. It never installs anything - it uses a vulnerability auditor only if one is already on PATH.

Sections in its output:

SectionContents
## manifestsManifest files found, with ecosystem
## direct_dependenciesname, ecosystem, version spec, kind (prod/dev/peer/optional)
## auditorWhich auditor was selected, and whether it ran
## severitiesPer-package advisories, when an auditor ran

The colour question - read this before drawing

Upstream's dependency diagram colours packages on a vulnerability-severity scale: green Good, blue Low, yellow Medium, orange High, red Critical. That implies a live vulnerability lookup against a scoring database.

This plugin does not have Mermaid Chart's scoring, and must not pretend to. Two honest modes:

Mode A - an auditor ran (audit_ran yes and severity rows present)

Colour by the highest severity advisory affecting each package, using the auditor's own severity label. Name the auditor in the output: "severities from osv-scanner", "from npm audit".

BandColour
criticalred #f8cecc / stroke #b85450
highorange #ffe6cc / stroke #d79b00
moderate / mediumyellow #fff2cc / stroke #d6b656
lowblue #dae8fc / stroke #6c8ebf
nonegreen #d5e8d4 / stroke #82b366

If a row's severity is unknown (some auditors report an advisory ID without a band), colour it grey and label it "advisory, severity not reported". Do not upgrade an unknown to a guess.

Mode B - no auditor, or it produced nothing (colour_basis staleness_only)

Colour by staleness only, and say so in one plain sentence directly beside the diagram:

No vulnerability auditor was found, so colours show version staleness only - not security risk.

Never emit the severity legend in this mode. A red node that means "two majors behind" while the reader assumes "critical CVE" is worse than no colour at all.

Never invent a severity. This is the single most important rule in this skill: a fabricated "critical" sends someone on a fire drill, and a fabricated "green" tells them they are safe when they may not be.

Draw it

This diagram carries real package names and advisory IDs, which on a private project can name internal or scoped packages. Rendering through the bundled server sends them to mcp.mermaid.ai. Say so before rendering, and offer the local mmdc path instead.

flowchart LR, grouped by ecosystem when there is more than one, with a legend. Hand off to the core /mermaid loop to render.

Scope control, because a full tree is unreadable:

  • Direct dependencies only by default. Transitive trees run to hundreds of nodes; say you limited it to direct dependencies and offer to expand a specific branch.
  • Above ~40 packages, do not draw them all. Draw everything with an advisory, plus the outdated ones, and summarise the healthy remainder as a single counted node ("+ 62 up-to-date"). Say that you did.
  • --prod-only drops dev dependencies. Worth suggesting on a repo with a large dev toolchain.
---
config:
  theme: base
---
flowchart LR
  classDef crit fill:#f8cecc,stroke:#b85450,color:#333
  classDef high fill:#ffe6cc,stroke:#d79b00,color:#333
  classDef med  fill:#fff2cc,stroke:#d6b656,color:#333
  classDef low  fill:#dae8fc,stroke:#6c8ebf,color:#333
  classDef ok   fill:#d5e8d4,stroke:#82b366,color:#333

  app(["my-app"])
  subgraph npm [npm]
    express["express ~4.18.0"]
    leftpad["left-pad ^1.3.0<br/>GHSA-xxxx high"]
  end
  subgraph py [python]
    requests["requests >=2.31.0"]
  end

  app --> express
  app --> leftpad
  app --> requests

  class express ok
  class leftpad high
  class requests ok

Always print with the diagram

  1. Which auditor ran, or that none did.
  2. Which colour basis is in force - severity or staleness.
  3. What was excluded - dev dependencies, transitive packages, packages collapsed into a count.
  4. Which manifests were read, since a monorepo has several and you may have covered only one.

Honesty rules

  • Say when a manifest could not be parsed. A missing ecosystem is not the same as no dependencies in it.
  • A version spec is not an installed version. ^1.3.0 is a range; the lockfile holds the truth. If you did not read a lockfile, say the graph shows declared ranges.
  • Do not editorialise about packages. Report advisories; do not add opinions about whether a dependency is a good choice unless asked.
  • Never run bun install, npm install, or any auditor that needs a fresh install to improve the data. Report what is available.

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.