Command Palette

Search for a command to run...

Back to skills
skill № 10744

Map Containers

C4 container diagram of a system: deployables, stores and brokers their tracked config binds, and resolved endpoint edges. Use for 'what actually runs'…

FreeRuns bundled scripts
melodic-softwareby melodic-software★ 34 GitHub stars

Install Map Containers in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Map containers

Repository context

The current repository is both the consumer, whose convention home declares where artifacts land, and the default subject, the repository whose tracked files name deployables and stores.

Collect with an individual Bash call, one command per call: the project root, git rev-parse --show-toplevel. Treat a failure (not a repository, git unavailable) as an unknown value and carry on; ${CLAUDE_PROJECT_DIR} is the resolver's --root either way.

An optional [system] argument is only a focal label. It does not select a subdirectory and it does not walk for nested repositories. Pass it to the collector as --focal. When it is absent, the focal name is the github.com origin repository name, otherwise the directory basename.

Purpose

Answer "what actually runs, and which stores does it bind" from tracked project files, Dockerfiles, process manifests, and configuration, dirty files flagged. Every deployable cites the fact that made it a container. Every store cites a config key. The scripts collect and render. Do not draw a node the script did not emit, and do not turn a directory name into a service.

This is the C4 container rung. map-landscape is the rung above it. What is inside one deployable is /architecture:map-components. A request trace is /architecture:map-flow.

Resolve home and dialect

Read ${CLAUDE_PLUGIN_ROOT}/reference/config.md first. This skill writes into architecture_dir. It does not read landscape_dialect and it does not add a dialect key. The diagram dialect is diagram_dialect.system from the authoring-formats topic doc.

Run bash "${CLAUDE_PLUGIN_ROOT}/lib/resolve-convention-home.sh" --root "${CLAUDE_PROJECT_DIR}" and resolve architecture_dir per ${CLAUDE_PLUGIN_ROOT}/reference/config.md "Where the config lives" and "Resolution order, per key"; never parse the root instruction file yourself.

Resolve diagram_dialect.system 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 `containers.json` and `containers.md` with the 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. An explicit --dialect likec4|c4-plantuml on the invocation wins and the resolver is not required.

This skill never writes the consumer's root instruction file or its topic doc. /architecture:setup apply owns both.

Build the record

When <architecture_dir>/dependency-graph.json already exists and is schema_version 1, pass it as --graph. Containment then comes from that graph's project edges and is not re-derived. Otherwise omit --graph. The collector reads ProjectReference Include attributes itself and records containment as project-references.

"${CLAUDE_SKILL_DIR}/scripts/collect-containers.sh" \
  --repo "<subject-repo>" --out "<architecture_dir>/containers.json" \
  --focal "<system-or-omit>" --graph "<dependency-graph.json-or-omit>"

Keep the ${CLAUDE_SKILL_DIR} anchor; ${CLAUDE_PLUGIN_ROOT}/reference/config.md § Script paths says why.

The record is schema_version 1 in the one-object-per-line layout the script writes. Container lines start with {"id":. Module lines start with {"container":. Edge lines start with {"from":. Finding lines, in an optional findings array, start with {"kind":. A deployable kind is web, api, worker, cli, function, or process. A store kind is store. technology is a runtime, framework, or image, or the literal unknown. An edge kind is uses or shared-infrastructure. A store with three owners is three `shared-infrastruct

Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • evals/evals.json
  • scripts/collect-containers.sh
  • scripts/collect-containers.test.sh
  • scripts/render-containers.sh

FAQ

What does the Map Containers skill do?

C4 container diagram of a system: deployables, stores and brokers their tracked config binds, and resolved endpoint edges. Use for 'what actually runs', 'deployables and databases', 'modular monolith', or service-to-broker binding. Not for repos (/architecture:map-landscape), one deployable (/architecture:map-components), or environment topology.

How do I install the Map Containers skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the Map Containers skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare Map Containers with