Command Palette

Search for a command to run...

Back to skills
skill № 90839

Map Context

C4 system context of one system from tracked config: actors and external systems from connection strings, base URLs, and broker namespaces (credentials…

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

Install Map Context 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 context

Repository context

The current repository is both the consumer, whose convention home declares where artifacts land, and the default subject, the repository whose tracked configuration names external systems.

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. A [system] argument is the focal name (--focal). It does not select a different tree.

Purpose

Answer "what is this system, who uses it, and which external systems does its configuration name" for one software system. Every external node traces to a config key in a tracked file. The scripts collect and render. Do not draw a node the script did not emit, and do not invent a person.

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 `context.json` and `context.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.

Actors

Actors are operator-stated. Ask once, in an interactive run, who uses the system. Write only the names and descriptions the operator stated, one name<TAB>description line each, to a temp file, and pass that file as --actors. If the operator names nobody, omit --actors.

A non-interactive run omits --actors. The actors array stays empty. Never fill it from CODEOWNERS, git history, a README, or a guess.

The collector screens each line with the same redactor as config values and skips a line that carries a credential (Token=, ClientSecret=, Bearer <value>, a cloud key id, URL userinfo), naming the skip on stderr. Reword the line without the credential and pass it again.

Build the record

"${CLAUDE_SKILL_DIR}/scripts/collect-context.sh" \
  --repo "<subject-repo>" --generated-on "<YYYY-MM-DD>" \
  --out "<architecture_dir>/context.json"

Add --focal "<system>" when the invocation named one. Add --actors "<file>" only for operator-stated rows. Keep the ${CLAUDE_SKILL_DIR} anchor; ${CLAUDE_PLUGIN_ROOT}/reference/config.md § Script paths says why.

The collector creates the parent directory of --out. Exit 1 means the record could not be written and nothing was: report the message and stop before rendering.

The record is schema_version 1 in the one-object-per-line layout the script writes. focal.origin is derived. Each external row carries host, kind, port, file, key, and origin: derived. The value that produced the row is not stored. Actor rows exist only from --actors, and their origin is operator.

The collector reads tracked files only (git ls-files). It matches JSON, YAML, env, XML, config, T

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-context.sh
  • scripts/collect-context.test.sh
  • scripts/render-context.sh
  • scripts/render-context.test.sh

FAQ

What does the Map Context skill do?

C4 system context of one system from tracked config: actors and external systems from connection strings, base URLs, and broker namespaces (credentials redacted). Use for 'context diagram', 'what does this system talk to', 'who uses this system'. Not for repos (/architecture:map-landscape) or module depth (/architecture:improve).

How do I install the Map Context 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 Context skill run scripts?

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

Related skills

Compare Map Context with