Command Palette

Search for a command to run...

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

modernize-map

Show me the structure — dependencies, data flow, entry points and business flows, as an interactive map

БесплатноБез исполняемых скриптов
smartworldarafathот 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 $ARGUMENTS names an existing dependency export (a compiler index, an MSBuild or Roslyn graph, an NDepend or jdeps export, a call graph in JSON, CSV, DOT or GraphML), read it and map its nodes and edges into topology.json instead 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/$system and read its machine-readable output (JSON, DOT, XML), never pretty-printed text: jdeps or the Maven/Gradle dependency reports for Java, the project graph for .NET, madge or dependency-cruiser for JavaScript, pydeps for 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:

  1. 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.
  2. The code-to-storage join is usually external configuration (job and deployment descriptors map logical names to physical stores).
  3. 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…ASSIGN with JCL DD, CICS file with CSD DEFINE FILE, EXEC SQL tables, 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.xml or 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": [
Полный SKILL.md на GitHub

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

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

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

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), без исполняемых скриптов.

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

Сравнить modernize-map с