Command Palette

Search for a command to run...

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

Map Components

C4 component view of a deployable's modules: one arrow per internal build reference, citing its declaration. Use for 'component diagram', 'what is inside this…

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

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

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

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

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

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

Map components

Repository context

The current repository is the subject. Collect its root with an individual Bash call, git rev-parse --show-toplevel. A failure (not a repository, git unavailable) is an unknown value; ${CLAUDE_PROJECT_DIR} is the root either way.

Purpose

Answer "what are the modules inside this one deployable, and which way do the arrows point" from build declarations, not from recall. The scope is one container. Charting every deployable is /architecture:map-containers. The landscape of repositories is /architecture:map-landscape.

Resolve home and dialect

Read ${CLAUDE_PLUGIN_ROOT}/reference/config.md first. Run bash "${CLAUDE_PLUGIN_ROOT}/lib/resolve-convention-home.sh" --root "${CLAUDE_PROJECT_DIR}" and resolve architecture_dir and the optional component_layers per ${CLAUDE_PLUGIN_ROOT}/reference/config.md "Where the config lives" and "Resolution order, per key"; never parse the root instruction file yourself. component_layers has no default. Absent, --group-by layer cannot run.

This skill does not read landscape_dialect and does not add a dialect key. The diagram dialect is diagram_dialect.system from the authoring-formats topic doc. Resolve it by restating this ladder, then running the resolver rather than parsing the topic doc yourself. The ladder is a resolution order, not a task list:

1. Anchor at the repository root: `${CLAUDE_PROJECT_DIR}` when set, otherwise
   `git rev-parse --show-toplevel`. Never a CWD-relative read.
2. Resolve the convention home `<home>` with the bundled resolver above. Never hand-parse the root
   file.
3. The printed home is repo-relative: join it to the root, then pass
   `<root>/<home>/authoring-formats/README.md` to the resolver.
4. Layer order is one layer deep: an explicit `--dialect` argument, then the team convention doc.
   There is no personal override.
5. `diagram_dialect.system` has no default. Allowed values are `likec4` and `c4-plantuml`. When it
   is unset, write `components.md` with the prose and tables and draw no diagram block.
6. Degrade soft, and say so. No pointer, no doc, no key, or an unrecognized value (mermaid
   included, which the convention refuses) each resolve to emitting no view. The resolver names
   the cause on stderr. Do not hard-fail and do not ask the operator to create the surface
   mid-task.
7. Report provenance: the key, the value, and the layer (`argument`, `team convention doc <path>`,
   or `unset (no C4 view emitted)`).
bash "${CLAUDE_PLUGIN_ROOT}/lib/resolve-diagram-dialect.sh" --kind system \
  --formats "<root>/<home>/authoring-formats/README.md"

Omit --formats when no convention home resolved. Stdout is likec4, c4-plantuml, or none. c4-plantuml writes components.md with one fenced plantuml block (C4_Component); likec4 writes it with one fenced likec4 block and a component view of the container. Both carry the tables. none writes components.md with the prose and tables and no diagram block.

This skill never writes the consumer's root instruction file or its topic doc.

Read the dependency graph

The view is a render of dependency-graph.json, the record /architecture:map-dependencies writes. The writer's layout is in the header of its dependency-graph.sh (--help prints it), and what this renderer reads from it is in dependency-graph.md. Do not draw a box the record does not contain, and do not add an edge the record does not cite.

  1. When <architecture_dir>/dependency-graph.json already exists, confirm it is schema_version 1, then render that file. Do not recollect, and leave the file untouched. Say so in the report.
  2. Otherwise run the shared extractor. It writes the record itself, and a second run on the same HEAD is byte-identical. Do not pretty-print it.
bash "${CLAUDE_PLUGIN_ROOT}/skills/map-dependencies/scripts/dependency-graph.sh" \
  --out "<architecture_dir>/dependency-graph.json" "<root>"

A tree holding no manifest that a reader handles is result unknown with empty node and edge arrays, not an empty architecture. The render says so and draws nothing. The ecosystems the extractor reads, and the ones it declines, are listed in /architecture:map-dependencies.

Choose one container

A container is one deployable: an indegree-zero project, plus the projects reached by following internal edges. A test project (the node's test field) is not a deployable: its references are not counted toward a project's indegree, so Api.Tests referencing Api leaves Api a root, and it is never listed as a choice. A stray manifest is not a deployable either: a project no internal edge touches, in an ecosystem that no linked project and no .NET project shares (a tooling package.json, a requirements file beside a .NET tree). It is not a <!-- portability-

Полный SKILL.md на GitHub

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

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

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

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

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

FAQ

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

C4 component view of a deployable's modules: one arrow per internal build reference, citing its declaration. Use for 'component diagram', 'what is inside this service', 'module dependencies', arrow direction, or layering. Not for repos (/architecture:map-landscape), deployables (/architecture:map-containers), module design (/architecture:improve).

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

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

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

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

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

Сравнить Map Components с