Map Context
C4 system context of one system from tracked config: actors and external systems from connection strings, base URLs, and broker namespaces (credentials…
от melodic-software★ 34 звезды на GitHub
Установить Map Context в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- evals/evals.json
- scripts/collect-context.sh
- scripts/collect-context.test.sh
- scripts/render-context.sh
- scripts/render-context.test.sh
FAQ
Что делает скилл Map Context?
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).
Как установить скилл Map Context?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Map Context запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…