Command Palette

Search for a command to run...

Назад к скиллам
скилл № 22071

Map Dependencies

Project dependency graph from build manifests, citing the file and declaration on every edge. Use when 'project reference graph', 'what references what'…

БесплатноЗапускает вложенные скрипты
melodic-softwareот melodic-software★ 34 звезды на GitHub

Установить Map Dependencies в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Map dependencies

Repository context

The current repository is the default subject. Collect its root with one Bash call, git rev-parse --show-toplevel. Treat a failure as an unknown root and ask for a path. Do not walk the working directory for nested repositories.

Purpose

Answer "which project depends on which, and in which direction" from build declarations a script read. Every edge names the file and the declaration it came from. The canonical artifact is dependency-graph.json. The human render is a mermaid flowchart of the internal edges. This is the model, not a C4 diagram.

The dialect decision lives in ${CLAUDE_PLUGIN_ROOT}/reference/config.md. Read it. Do not restate it, and do not emit a C4 view from this skill. This flowchart follows neither landscape_dialect nor diagram_dialect.system, the key the C4 views read.

Resolve home

Read ${CLAUDE_PLUGIN_ROOT}/reference/config.md for architecture_dir. Run bash "${CLAUDE_PLUGIN_ROOT}/lib/resolve-convention-home.sh" --root "${CLAUDE_PROJECT_DIR}" and follow the exit code. Never parse the root instruction file yourself.

--out <dir> wins for this run alone. Then a declared architecture_dir. With neither, including every non-interactive run, stop and point at /architecture:setup. This skill never writes the topic doc.

Build the graph

"${CLAUDE_SKILL_DIR}/scripts/dependency-graph.sh" \
  --out "<architecture_dir>/dependency-graph.json" "<repo-path>"

The script writes the record itself and exits 1 when it cannot. generated_on is the HEAD commit date (unknown with no commit), so a second run on the same commit is byte-identical; --generated-on <date> overrides it. The document is one object per line. Do not pretty-print it. A reader given another layout exits 1.

result is ok or unknown. unknown means no shipped adapter could read the tree. The message says which manifests were found. That is the answer. Do not draw a diagram, and do not fill the arrays by hand. An empty graph is result ok with project nodes and no edges. Read it as a repository that declares no references only when no unread-reference-tags or unread-manifest finding exists. The first means the collector skipped reference tags in a file, and the edge list is short by that count. The second means a manifest holds a declaration whose shape no reader handles; its evidence is the file, a colon, and the declaration skipped, one finding per declaration.

Every shipped adapter whose manifests are present runs, and their nodes, edges and findings are one record. ecosystem is the adapter's name when one ran, mixed when more than one ran, and unknown when none did. Each node carries its own ecosystem. reference/dependency-graph-record.md records the upstream source, verification date and recheck trigger behind each non-.NET adapter's rules below.

The .NET adapter:

  • ProjectReference is a directed internal edge. The target is the Include path relative to the project file. A target that is missing, or that resolves outside the repository root, is status unresolved. Never match it to a project of the same name somewhere else on disk.
  • PackageReference is an external package edge. The node id is pkg: plus the Include.
  • A ProjectReference or PackageReference in a Directory.Build.props or Directory.Build.targets is an edge from every project under that file's folder whose nearest such file it is, and the evidence cites the props file. A project never gets an edge to itself that way. Any other .props or .targets file, and Directory.Packages.props, has no known importer, so its references are counted in an unread-reference-tags finding and not drawn.
  • *.sln and *.slnx contribute membership. A project path that does not resolve inside the root is a finding, not an edge.
  • Source files are not read. A using or an import is not an edge.

The Node adapter:

  • Every package.json outside node_modules is a project node, id its repo-relative path. Workspace members are the package folders that the workspaces globs (array or {"packages": [...]} form) and a pnpm-workspace.yaml packages list expand to.
  • A dependency, dev, peer or optional dependency that names a member of the declaring package's workspace, or whose spec is workspace:, file: or link: pointing at a package folder inside the root, is an internal project edge. Every other entry is an external package edge to pkg:node:<name>.
  • A spec that names no member, leaves the root, or points at a folder with no package.json is unresolved. Never match it to a package of the same name elsewhere on disk.
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • reference/dependency-graph-record.md
  • scripts/dependency-graph.sh
  • scripts/dependency-graph.test.sh
  • scripts/render-dependencies.sh

FAQ

Что делает скилл Map Dependencies?

Project dependency graph from build manifests, citing the file and declaration on every edge. Use when 'project reference graph', 'what references what', 'internal dependencies', 'package references', 'which projects depend on which'. Skip for which repositories exist (map-landscape), shallow modules (improve), or source imports and call graphs.

Как установить скилл Map Dependencies?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Map Dependencies запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить Map Dependencies с