Command Palette

Search for a command to run...

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

modernize-preflight

Run this first — checks the environment, records where the code lives, and says what to fix before anything else runs

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

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

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

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

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

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

Check whether this environment can analyze — and eventually modernize — the system $system, and tell the user exactly what to fix before the other commands run into it. Modernization runs fail late and confusingly when this is skipped: metrics silently degrade without analysis tools, tests can't run without a build toolchain, and dependency maps come out wrong when half the source isn't in the tree.

Run every check even when an early one fails — the point is one complete readiness report, not the first error.

Where the code lives

The code is legacy/$system: a copy, or a symlink to where it really lives (how a large repository stays put). Nothing is ever copied for you.

  • If $ARGUMENTS contains --source <path> (a directory, absolute or relative), check that it exists and is not the filesystem root or the user's home directory, then, only if legacy/$system does not exist yet, create the link: mkdir -p legacy && ln -s <absolute path> legacy/$system (on Windows a junction: cmd /c mklink /J legacy\$system <absolute path>). If legacy/$system already exists and points elsewhere, say so and change nothing.
  • Say where legacy/$system points (readlink legacy/$system, or "a directory in this workspace") in one line before you start.
  • If $target_stack starts with --, it is a flag, not a stack.

Never modify anything under legacy/$system.

Check 0 — Ask the human (these answers are not in the source)

The most expensive modernization mistakes are things a person who knows the system answers in seconds. Ask only the five questions below — add none — and accept "don't know" for any of them.

Ask with the ask_question tool (a pop-up), never in chat text. It takes at most four questions per call: ask 1–4 in one call and 5 in a second. Give each question its own options, one of them "Don't know", and let the person type an answer instead. Do not print the questions in your reply and do not answer them yourself. While the pop-up is open, run the other checks — none of them needs the answers.

  1. Scope — Is this code the complete system, or one slice of a larger codebase? If a slice: what outside it depends on code inside it, and is breaking those consumers acceptable? (Check 6 verifies the crossing from the source; the answer says whether it matters.)
  2. Build & test locally — Can this environment restore, build, and run the tests? Roughly how long does the full CI pipeline take?
  3. Bespoke build infrastructure — Is there organization-specific build or dependency machinery (an internal package feed, a code generator, a wrapper around the standard build tool) a newcomer would not guess? Where is it documented?
  4. Prior attempts — Has anyone tried to modernize this before? What went wrong?
  5. Off limits — Is anything in this code not allowed to change in this pass (a component another team owns, a frozen branch, generated code)?

write_to_file each question in a section of PREFLIGHT.md called Answers, with the person's answer verbatim under it — never paraphrase away a caveat. If a question has no answer (the tool is unavailable, as in a headless run, or the person skips it), write an open item the human must fill in under it. All five always appear.

Check 1 — Detect the stack

Fingerprint legacy/$system from file extensions and manifests: languages, build system, deployment and config descriptors. Report what you found and the rough file split.

Check 2 — Analysis tooling

Check availability (command -v), version and what degrades without it:

Tool Used by Without it
scc (or cloc) assess LOC and complexity fall back to find + wc; the COCOMO index gets coarser
python3 (3.8 or newer; on Windows it may be python or py -3: use whichever runs Python 3 wherever a command says python3) map, extract-rules, verify, report the dependency scripts, the shard builder, the proof scripts and the HTML report can't run
lizard assess --portfolio complexity is estimated from decision-keyword counts

Give the platform's install one-liner for anything missing.

Check 3 — Build toolchain (prove it on THIS code, not just presence)

3a — view_file the build definition first. Something already builds this system. Find the CI or pipeline definition (azure-pipelines.yml, Jenkinsfile, .github/workflows/, .gitlab-ci.yml, build JCL procs, a Makefile) and the build configuration above or beside the source (Directory.Build.props and nuget.config; a parent POM, settings.xml or .mvn/; a private-registry .npmrc or pip.conf; a root build/, eng/ or scripts/). It is the most honest record of the pinned toolchain, where dependencies really come from and what a naive build skips. Quote the pinned version and the dependency source, and flag anything bespoke: a homegrown binary-resolution scheme is what a transformation must not discover halfw

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

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

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

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

FAQ

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

Run this first — checks the environment, records where the code lives, and says what to fix before anything else runs

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

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

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

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

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

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