/lstack-extras:codebase-modernizerfrom lstack-extras
Audits a stale or inherited codebase across deps, bugs, security, tests, CI, docs, and UI/UX, then produces a phased, testable modernization plan. Read-only — never applies changes.
Ships in lstack-extras. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
For a codebase you are returning to after a long gap, or one that has drifted through many unoptimized changes. It audits every applicable dimension, then converts the findings into a phased, sprint-sized, testable plan for a better, up-to-date version.
Produces exactly two files in the target repo root:
| File | Contents |
|---|---|
MODERNIZATION_REPORT.md | Baseline evidence + every finding, severity-ranked, each citing path:line |
MODERNIZATION_PLAN.md | Phases → sprints → tasks → milestones, every task closing named findings |
This skill never modifies source code, dependencies, lockfiles, or configuration — no tracked
file's content changes. On a clean tree that is git diff --stat empty. On a stale, already-dirty
tree, git status --porcelain and git diff after the run must match a snapshot taken before it
(declared artifacts set aside). Beyond the two reports, only three kinds of new file may appear,
all enumerated in the report's Artifacts section: a report backup
(MODERNIZATION_REPORT_backup_*.md, made before overwriting an earlier report), a declared
delegate artifact (CODE_REVIEW.md, from code-review mode review) and probe byproducts
(build dirs such as obj/, .dart_tool/, target/, .gradle/). Nothing else.
npm update, ncu -u,
cargo update, poetry update, or any equivalent. A blind bulk upgrade on a stale tree produces a
broken build and an unreviewable diff, which is exactly what the plan exists to prevent.CLAUDE.md, AGENTS.md) are planned via /agent-config create or
/agent-config update in the plan's Pre step — never created or rewritten during the audit.This skill invokes the two skills declared in frontmatter dependencies: code-review (modes
review and perf, for BUG and PERF) and dont-make-me-think (UX). Run this before Phase 0,
the first phase that probes anything. Discovery acquires nothing:
if command -v asm >/dev/null && asm deps --help >/dev/null 2>&1; then
asm deps discover codebase-modernizer --json || echo "discover failed; acquire at first use" >&2
printf 'cm_session=%s\n' "codebase-modernizer-$(date +%s)-$$" # record it; reuse it verbatim
else
echo "asm deps unavailable: npm install -g agent-skill-manager@latest" >&2
fi
asm deps unavailable, record every delegated dimension Not Assessed —
skill unavailable, skip steps 2–5, and continue.BUG or PERF, run
asm deps acquire code-review --session <cm_session> --json. When it first reaches UX, run the
same command for dont-make-me-think. Never acquire for a dimension that is Not Assessed.skillMdPath to the dimension worker as
delegate_skill_md. Read that path directly.references/delegation-policy.md
(Missing dependency). Record Not Assessed — skill unavailable for BUG and PERF
(code-review) or UX (dont-make-me-think), continue, and name it in Limitations. A missing
dependency is fail-soft, not fatal.finally. If any acquire ran, run
asm deps release --session <cm_session> --json once at every terminal outcome (after Phase 5,
on a stop, or on an error), before the final report. Put a failed release under Uncertainty:.Lease-owned copies and the inline dimensions: references/delegation-policy.md → Lease-owned copies.
baseline-green, finding record (with its finding ID, F-<DIM>-<NNN>), Not Assessed,
fail-soft, and upgrade wave have exact meanings. Details: references/scope-detection.md →
Leading terms.
Default: do not sync. This skill merges nothing and commits nothing — it writes two untracked
report files. Rebasing mid-audit can pull in a year of upstream commits, invalidating every
path:line citation and the recorded SHA. Audit the tree as you found it.
Sync only when the user asks for the reports committed or pushed. Then sync at the start of
Phase 3, after the audit is recorded. Because HEAD moves, re-record the commit SHA and re-verify
every citation. If any citation no longer resolves, stop with Result: BLOCKED — audit stale after sync and re-run the audit.
When syncing, sync the current branch with remote — stash first if the tree is not clean:
git stash push -u -m "pre-sync" # only when `git status --porcelain` is non-empty
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash pop # only if you stashed
If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user
before continuing. A dirty tree is common on a neglected repo — never discard uncommitted work.
Resolve all nine branches in references/scope-detection.md before Phase 0. Each is a real
branch in the workflow, not a preference. Check No Bash and No UI detected first
(references/scope-detection.md → Check these two first).
If a branch was not checked, take its restrictive side.
The finding-generators already exist. This skill's own contribution is dependency and runtime currency, the baseline gate, and the audit → plan bridge. Everything else is delegated.
| Dim | Dimension | Audited by | Skip when |
|---|---|---|---|
DEP | Dependency + runtime currency | this skill — references/dependency-audit.md, scripts/dep_scan.sh | no manifest found |
BUG | Bugs, security holes, quality | invoke code-review mode review | never |
PERF | Bottlenecks, leaks, algorithmic waste | invoke code-review mode perf | never |
UX | Usability and UI flow | invoke dont-make-me-think | no UI detected |
CLEAN | Readability vs Clean Code standards | inline — plan task runs code-review mode clean | never |
DEAD | Dead code, duplication, slop, weak types | inline — plan task runs code-review mode cleanup | never |
TEST | Untested branches and edge cases | inline — plan task runs test-coverage | never — an absent suite is itself a Critical finding |
CI | Pipelines, pre-commit, quality gates | inline — plan task runs devops-pipeline | never |
SEC | Secrets, dependency vulnerabilities | inline — plan task runs security-setup | never |
DOCS | Docs drifted from code | inline — plan task runs doc-manager | never |
Delegation policy — one rule: a delegate is invoked only if it changes no tracked file.
Invoked dimensions record Path: delegated; inline ones are audited from
references/dimension-map.md, record Path: inline, and never invoke their writing delegate.
Details: references/delegation-policy.md → Invoked path (including the Redesign Mode ban) and
Inline path.
Read references/delegation-policy.md before Phase 2. It holds the invocation args, the
CODE_REVIEW.md declared-artifact handling, the review-only rule for dont-make-me-think, the
/agent-config Pre-step rule, and the Skill-tool-unavailable fallback (which is reduced depth).
Follow references/baseline.md. Record each of these with the command that produced it: build
status, test command and pass rate, coverage if obtainable, lint status, CI presence and last
result, runtime/toolchain versions in use.
A RED baseline (does not build, tests do not run, there is no suite, or the build could not be
probed at all) does not stop the audit. Record Baseline: RED, continue, and make restoring
baseline-green the plan's Sprint 0 — nothing downstream is verifiable without it.
Probes must not mutate tracked files. A tracked file a probe changes is a finding. The
snapshot procedure and the no-test-command fallback are in references/baseline.md (Phase 0
rules: tracked files and the no-test-command fallback).
Completion criteria: every row of the baseline table in references/baseline.md holds a recorded
value or an explicit Not Assessed with a reason; the overall verdict is GREEN, AMBER, or
RED; every value cites the command that produced it.
Detect stack, ecosystems, UI presence, repo size, and entry points. Produce the dimension worklist: each of the 10 dimensions marked audit or Not Assessed + reason. If a requested area maps to no dimension ID, or to more than one, ask the user once which to audit. Otherwise proceed without asking.
Completion criteria: all 10 dimensions have a disposition; every ecosystem with a manifest is listed; repo-size branch and Agent-tool branch are both resolved and stated.
Read references/delegation-policy.md before invoking any delegated dimension.
Run DEP first — its output feeds the plan's upgrade waves and often explains findings in other
dimensions. Then run the remaining audited dimensions. If the Repo size and Agent tool branches
select subagents, spawn one agents/dimension-auditor.md per dimension in parallel. Otherwise run
them inline, one at a time.
DEP uses agents/dependency-auditor.md and references/dependency-audit.md, one invocation per
ecosystem. All DEP findings share the F-DEP- prefix, so allocate each ecosystem a distinct
id_start (1, 101, 201, …) before spawning them; gaps in the numbering are fine, collisions
are not.agents/dimension-auditor.md with that dimension's row from
references/dimension-map.md. Each has its own prefix and numbers from 1, so they need no ID
coordination.path:line (or a manifest entry and version
for DEP), or it is dropped. A dimension that produced nothing citable is Not Assessed, not
"no issues found".Completion criteria: every dimension marked audit in Phase 1 returned either ≥ 1 finding record
or an explicit "clean — checked X, found nothing" with the checks named; zero finding records lack
evidence; finding IDs are unique and follow F-<DIM>-<NNN>.
Merge all finding records into MODERNIZATION_REPORT.md using references/report-template.md.
Rank by severity: Critical → High → Medium → Low.
Deduplicate before writing, by the Deduplication rule in references/report-template.md.
Completion criteria: the file exists at the repo root; it contains the baseline table, a dimension coverage table showing all 10 dispositions, and the full finding table; every finding has ID, dimension, severity, evidence, and fix direction; the counts in the summary equal the rows in the table.
Spawn agents/plan-architect.md with the report path (or run it inline when the Agent tool is
unavailable). It writes MODERNIZATION_PLAN.md from references/plan-template.md, using the fixed
skeleton: unconditional Pre Agent environment (ME), then P0 Stabilize (M0), P1 Secure
& Patch (M1), P2 Modernize (M2), P3 Clean & Harden (M3), and P4 Polish (M4).
Do not rename or renumber P0–P4. Each phase's goal and exit milestone are in
references/plan-template.md (The fixed phase skeleton). Phases split into sprints. Every task uses the tasks-generator task format so the plan interoperates
with that skill, plus a Closes: line naming finding IDs.
Completion criteria: Pre is present and ordered before P0; every Critical and High finding
is closed by ≥ 1 task; every task has ≥ 2 testable acceptance criteria; every P0–P4 task asserts
baseline-green still holds; the dependency table references only task IDs that exist and has no
cycles; the critical path is stated explicitly; Pre and each of P0–P4 have a milestone with a
measurable exit condition. references/plan-template.md carries the task-ID format, the Pre
create-vs-update rule, and the RED-baseline exemption.
agents/plan-validator.md with fresh context, giving it both output files and the repo.
It verifies evidence citations resolve, severities are defensible, no finding is orphaned, no
task invents work not traceable to a finding or a milestone, and the stated critical path is
actually the longest chain in the dependency table.must-fix correction it returns.must-fix, re-run the validator once. Never run a third round.must-fix still open after round 2 in the report's Limitations, with a reason.Completion criteria: the validator has run at least twice when round 1 returned any must-fix;
zero unresolved must-fix items remain, or each survivor is recorded in Limitations with a reason.
After each phase, emit the block in references/output-format.md (Step Completion Reports) with
that phase's check names. Never report PASS while a phase
completion criterion, required output file, or safety guardrail is unresolved.
Walk references/acceptance-criteria.md before writing the final report. It is the full run
checklist: outputs, the read-only contract, findings, the plan, and an understandable final report.
The two bars this skill exists to keep:
git status --short is one of the two reports, a report backup, a
declared delegate artifact (CODE_REVIEW.md), or a probe byproduct, each listed in the
report's Artifacts section.If any criterion fails, report it as a FAIL row in the Step Completion Report and set Result: by
the rules below.
End the run with one final report in chat. Its first four lines are fixed; field contents, the
outcome table, and the format rule are in references/output-format.md.
Result: COMPLETE | PARTIAL — <reason> | BLOCKED — <reason>
Evidence: <checks that actually ran, and what each showed>
Uncertainty: <Not Assessed rows, degraded paths, untested items, labeled assumptions>
Decision: <approval needed, or "No approval needed."> Next: <remaining user action>
Set Result: with the first rule that matches:
BUG, PERF, or UX ran inline at reduced depth; a huge-repo
cap left paths unscanned; the read-only check could not run (not a git repo); a must-fix
survived round 2; an acceptance criterion fails.Result: COMPLETE — 47 findings; Pre + P0–P4 plan; 0 must-fix
Evidence: git status --porcelain and git diff match the pre-run snapshot; validator ran 1 round
Uncertainty: coverage Not Assessed (no coverage tool); no plan task was executed
Decision: No approval needed. Next: review MODERNIZATION_PLAN.md, then run Task Pre.1
The summary facts that follow these four lines (target, baseline, dimensions, findings, outputs,
plan, validation, source files changed) are in references/output-format.md (Full example).
Read references/edge-cases.md when a case arises: not a git repo, no manifest, no network,
baseline RED, a huge repo, a narrowed dimension filter, a monorepo, or existing report
files. A user asking mid-run to apply fixes is handled by the Read-only contract above.
Optional and propose-only. After the run's result is delivered, run this check:
references/ (the directory holding this SKILL.md). Bump the patch number of metadata.version. If the skill is an installed copy or tracked in git, say so. Commit nothing unless the user asks.Off — the user opted out.Read each file only when its phase needs it; that keeps the agent's context budget for the audit.
references/scope-detection.md — the nine scope branches, detection, and resolution order.references/delegation-policy.md — invocation args, artifact handling, fallbacks per path.references/baseline.md — Phase 0 probe protocol per stack, and the baseline evidence table.references/dependency-audit.md — per-ecosystem fail-soft probes, classification schema,
upgrade wave rules, and migration lookup for majors.references/dimension-map.md — the 10 dimensions: inline checklist, severity rubric, skip rules.references/report-template.md — report structure and the deduplication rule.references/plan-template.md — plan structure, task format, task-ID and Pre rules.references/acceptance-criteria.md — the full run checklist.references/output-format.md — Step Completion Report checks, final-report fields, format rule.references/edge-cases.md — the full edge-case list.scripts/dep_scan.sh — read-only ecosystem and dependency probe; prints a markdown summary.Agents (spawn with the Agent tool; run inline if unavailable): agents/dependency-auditor.md
(DEP), agents/dimension-auditor.md (one non-DEP dimension per invocation),
agents/plan-architect.md (report → plan), agents/plan-validator.md (fresh-context validation).
agents/dependency-auditor.md (opens in a new tab)agents/dimension-auditor.md (opens in a new tab)agents/plan-architect.md (opens in a new tab)agents/plan-validator.md (opens in a new tab)references/acceptance-criteria.md (opens in a new tab)references/baseline.md (opens in a new tab)references/delegation-policy.md (opens in a new tab)references/dependency-audit.md (opens in a new tab)references/dimension-map.md (opens in a new tab)references/edge-cases.md (opens in a new tab)references/output-format.md (opens in a new tab)references/plan-template.md (opens in a new tab)references/report-template.md (opens in a new tab)references/scope-detection.md (opens in a new tab)scripts/dep_scan.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
maxnpx claudepluginhub luongnv89/skills --plugin lstack-extras32 skills in this plugin
/agent-profileRun a task with a saved agent profile (harness, model, thinking level) built only from what this machine has installed. User-invoked: /agent-profile. Don't use for free opencode runs, Herdr or Rex fleets, or mcc account setup./ai-job-scoutFind open AI engineering jobs that fit a candidate, verify location and apply links, and assess each employer's product. Use for one-off shortlists or a job alert's research step. Don't use for résumé writing, job applications, or company news./appstore-assetsGenerate App Store screenshots, header/search images and looping videos for iPhone, iPad, Mac from code or a landing page, or re-render a set. Use when preparing a submission. Don't use for App Previews, ASO, review audits, icons, Google Play./appstore-review-checkerAudit iOS/macOS apps against App Store Review Guidelines before submission, with evidence-backed verdicts and fixes. Don't use for Google Play, general code review, or rejection appeals./aso-marketingOptimize App Store and Google Play listings via a 7-phase, plan-approval-gated ASO workflow: keywords and rank tracking, metadata, screenshot captions, localization. Don't use for web SEO, Search Ads/paid UA, or pre-submission compliance audits./brand-name-checkerCheck product and brand names for conflicts across trademarks, domains, social handles, and package registries. Returns a risk level and Proceed/Modify/Abandon verdict. Don't use for name brainstorming, logo design, or trademark filings.Other plugins' skills for the same job