modernize-map
Show me the structure — dependencies, data flow, entry points and business flows, as an interactive map
от smartworldarafath★ 16 звёзд на GitHub
Установить modernize-map в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Build a dependency and topology map of the system and render it as an interactive page. The assessment found the domains; this goes one level down: how do the pieces connect? It is the map an engineer needs before touching anything.
The code is legacy/$system, often a symlink to where it really lives: say where it points (readlink legacy/$system) in one line before you start. If legacy/$system does not exist, stop and say so: nothing can run without the code, so the fix is /code-modernization:modernize $system --source <path to the code>. Run every subagent in the foreground and wait for its result: never end your turn while one is still running.
Start from what already exists
Do not reinvent a dependency graph the customer or the ecosystem already has:
--graph <file>— if$ARGUMENTSnames an existing dependency export (a compiler index, an MSBuild or Roslyn graph, an NDepend orjdepsexport, a call graph in JSON, CSV, DOT or GraphML), read it and map its nodes and edges intotopology.jsoninstead of writing a parsing script. Spot-check about ten edges against the source, say what the file did not cover, and still add what graphs omit: entry points from deployment config, data stores, business flows.- The stack's own tooling — if it is installed, run it on
legacy/$systemand read its machine-readable output (JSON, DOT, XML), never pretty-printed text:jdepsor the Maven/Gradle dependency reports for Java, the project graph for .NET,madgeordependency-cruiserfor JavaScript,pydepsfor Python,go list -deps,cargo metadata. Use it for the module and import graph; your script adds the config-driven edges, entry points and data joins tools miss. - Otherwise, write the script below.
Big estates (more than about 2,000 source files or 500k lines) are mapped in
chunks, not in one pass: one domain or top-level directory at a time, each writing
analysis/$system/map/<chunk>.json (its modules and the edges it originates). A
rerun skips chunks whose file exists, so an interrupted map resumes. When all exist,
merge them into topology.json; an edge into another chunk resolves by id, and an
unresolved one becomes an observation. Say which chunks ran and which are missing.
What to extract
write_to_file a one-off script (Python or shell) that parses legacy/$system and extracts the
datasets below. Three principles matter across stacks:
- Edges live in two places: direct calls in source, and dispatcher calls whose targets are variables (config tables, route maps, dependency injection, dynamic dispatch). Resolve variables against config before calling an edge unresolvable.
- The code-to-storage join is usually external configuration (job and deployment descriptors map logical names to physical stores).
- Entry points usually live in deployment config, not source; without it every top-level module looks unreachable.
- Call graph — direct calls (
CALL, method invocations,import/require) and dispatcher calls (EXEC CICS LINK/XCTL, DI wiring, framework routing, factories). - Data dependencies — which modules read or write which stores, joined through
the relevant config (
SELECT…ASSIGNwith JCLDD, CICS file with CSDDEFINE FILE,EXEC SQLtables, ORM mappings, model files). Screens, JSPs and templates too. - Entry points — read from where the stack defines them: JCL
EXEC PGM=and CSD transactions,web.xmlor route files,main(), queue and scheduler subscriptions. - Dead-end candidates — modules with no inbound edges, meaningful only once all entry-point and edge types are in the graph. Never call something dead if it could be the target of an unresolved dynamic call (reflection, string-built class names, convention-based DI): record those call sites, with counts and examples, as observations instead.
For fixed-column source (COBOL columns 8–72, RPG), slice the code area and strip comment lines before matching, or you will match sequence numbers.
Save the script as analysis/$system/extract_topology.py (or .sh) so it can be
rerun and audited. It writes analysis/$system/topology.json and prints a summary
(cap at ~200 lines for large estates). Run it and show the summary.
topology.json feeds the viewer and must follow this schema:
{
"system": "<display name>",
"root": {
"id": "sys", "name": "<system>", "kind": "system",
"children": [
{ "id": "dom:<domain>", "name": "<Domain>", "kind": "domain",
"children": [
{ "id": "<MODULE>", "name": "<MODULE>", "kind": "module",
"language": "cobol", "loc": 1234, "file": "src/MODULE.cbl" }
] },
{ "id": "dom:data", "name": "Data stores", "kind": "domain",
"children": [ { "id": "ds:<NAME>", "name": "<NAME>", "kind": "datastore" } ] }
]
},
"edges": [ { "source": "<id>", "target": "<id>", "kind": "call" } ],
"entryPoints": [
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл modernize-map?
Show me the structure — dependencies, data flow, entry points and business flows, as an interactive map
Как установить скилл modernize-map?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл modernize-map запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…