Command Palette

Search for a command to run...

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

modernize-transform

Rewrite one legacy module in the target stack, with tests that prove it behaves the same

БесплатноБез исполняемых скриптов
smartworldarafathот smartworldarafath★ 16 звёзд на GitHub

Установить modernize-transform в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Transform module $module of $system into $target_stack, with proof of behavioral equivalence. This is one vertical slice of the strangler fig; output goes to modernized/$system/$module/.

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. Stop any server or other process you started (a legacy app on a local port, a watcher) before you finish, and say you did. If $module or $target_stack is empty, read analysis/$system/MODERNIZATION_BRIEF.md: take the target stack it names, and the first module of the earliest phase whose Command: is transform that has no modernized/$system/<module>/TRANSFORMATION_NOTES.md yet (with no brief, the target in INTENT.md). Say which you picked.

Step 0 — Toolchain, then the plan (human gate)

Target stack (required). The runtime, package manager and test framework must respond (java -version and mvn -v, node -v and npm -v, python3 -V and pytest --version). If not, stop and say what to install: a plan gate now would only defer the failure an hour. Point to /code-modernization:modernize-preflight $system $target_stack.

Target versions. Build on the versions in the brief's Target versions table. If it has none for this module, or they are unverified or were checked over 30 days ago, look them up now as ${ANTIGRAVITY_PLUGIN_ROOT}/references/target-versions.md says (never from memory), show the table in the plan and keep it in TRANSFORMATION_NOTES.md. Anything not supported and not yet decided is a question at the plan gate. A dependency with no row takes the newest compatible stable release the package registry reports.

Legacy stack (advisory, never a blocker). Try a syntax-only compile of the module. Legacy code often cannot build locally by nature (CICS and IMS programs have no local translator; the real runtime is a mainframe you do not have). If it cannot, dual execution is off the table: the tests assert against recorded traces and golden-master fixtures (real production outputs, captured reports, SME-confirmed examples). Say so in the plan and in TRANSFORMATION_NOTES.md ("equivalence is trace-based; legacy was not executable here"), so reviewers know how strong the proof is.

Run the old system only where it is safe. Record baselines from the legacy code running on this machine, or against a test environment the person named. Never call a production or third-party service, register an account, or send or change real data to record a baseline unless the person approved that exact target in the plan (say which calls, and which of them write). A token, password or session cookie in a recorded response is a secret: replace it with a fixed fake value before anything is saved, and never print it.

The brief is binding. If MODERNIZATION_BRIEF.md exists, find the phase whose Command: is this one and whose Modules: include $module, and treat its scope, entry criteria, exit criteria and any edits the user made as binding. An unmet entry criterion is the next step: meet it, never re-plan around it. If no phase covers $module, stop and ask which phase this is.

view_file the module's source and the rules in BUSINESS_RULES.md that reference it, and any verdicts on them in analysis/$system/RULE_REVIEWS.json: a rule marked wrong is not pinned as the oracle (use the reviewer's note for what is right, and if the note does not say, ask), and a P0 rule marked discuss is a question to settle at this plan gate before any code. Then present the plan and stop: write no code until the user explicitly approves (plan mode if available): which source files are in scope, the target structure, which rules and behaviors it implements, how you will prove equivalence, and anything ambiguous that needs a human decision now.

Step 1 — Characterization tests first

Spawn the test-engineer subagent: "write_to_file characterization tests for module $module of legacy/$system. view_file the source, identify every observable behavior and encode each as a test with concrete input and expected output derived from the legacy logic. Target framework: <right for $target_stack>. write_to_file to modernized/$system/$module/src/test/. These tests define 'done'. Name the RULE-NNN id(s) each test pins (from analysis/$system/BUSINESS_RULES.md) in its name or a one-line comment, so the trace can find it. Follow your secret-handling rules: no credential from legacy code becomes a fixture; use fake same-shape values and read anything live from environment variables." Show the user the test file and get a yes before going on.

Step 2 —

Полный SKILL.md на GitHub

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

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

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

FAQ

Что делает скилл modernize-transform?

Rewrite one legacy module in the target stack, with tests that prove it behaves the same

Как установить скилл modernize-transform?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл modernize-transform запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

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