跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

ln-33-code-modernizer

Modernizes a bounded capability by removing obsolete custom mechanisms or reducing bundle and maintenance cost. Use for proven modernization value; not routine upgrades or tuning.

levnikolaevich · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add levnikolaevich/claude-code-skills --skill ln-33-code-modernizer

技能说明


name: ln-33-code-modernizer description: "Modernizes a bounded capability by removing obsolete custom mechanisms or reducing bundle and maintenance cost. Use for proven modernization value; not routine upgrades or tuning."

Code Modernizer

Goal: Modernize a bounded capability only when the new design measurably reduces human workflow friction, maintenance, risk, dependency duplication, or delivered artifact cost. Preserve behavior, isolate migrations, and revert changes that do not create net value.

Execution contract: Treat the ordered checkbox workflow below as this skill's Definition of Done. Track every checkbox as PENDING, then resolve it to PROVEN with concrete evidence, CLEARED with evidence that its conditional trigger is absent, or UNPROVEN; reading, mentioning, delegating, skipping, or tool failure is not proof. Before returning, resolve every PENDING, count only PROVEN and CLEARED items as complete, apply this skill's verdict, decision, and approval rules to every UNPROVEN, and prepend Checklist: X/Y completeIncomplete: None | section/item — reason; outcome impact; exact next action; list every UNPROVEN item.

Tool Routing

NeedPreferred toolUse it whenFallback
Current mechanism and consumersNative file search plus language server or host-native code intelligenceMapping contracts, callers, configuration, data, lifecycle, and testsNarrow import, symbol, route, and configuration search with direct reads
Existing platform capabilitiesManifests, lockfiles, runtime APIs, and current official documentationAvoiding new dependencies or custom code for an already available featureRepository examples and source inspection; mark capability UNVERIFIED if current docs are unavailable
External replacement candidatesOfficial package registries, source repositories, documentation, releases, advisories, and license dataComparing maintained software with custom implementationPrimary-source web research; do not rely on popularity lists alone
Baseline and valueBuild output, bundle analysis, code inventory, benchmark, defects, or maintenance evidenceDefining what modernization must improveReproducible static counts with documented scope and limitations
Safe migrationGit isolation, focused edits, native package manager, and repository generation commandsReplacing one bounded capability and its consumersStop if user changes or generated state cannot be protected
VerificationRepository-defined build, lint, type, test, smoke, packaging, and runtime checksBefore migration and after every retained stepChoose the smallest portfolio action when existing evidence cannot prove a material contract
Delivered artifact analysisExisting bundle analyzer, size report, startup profile, or dependency reportBundle size, load path, or runtime cost is part of the goalBuild artifact comparison with reproducible file and compression rules

Do not replace working custom code merely because an external package exists. Do not introduce an unmaintained dependency, accept incompatible licensing, or remove the old path until all consumers and rollback conditions are understood.

Evidence Rules

  • Start from a concrete defect, cost, duplication, unsupported mechanism, audit finding, or user goal.
  • Compare net system complexity: removed code and risk minus new dependency, adapter, operational, and migration costs.
  • External candidate claims require current primary evidence for maintenance, security, license, runtime support, and API fit.
  • Bundle or performance value requires comparable measurements; line-count reduction alone does not prove a better design.
  • Preserve public behavior unless the request explicitly authorizes a contract migration.

Checklist

1. Define the Modernization Target

  • Resolve the bounded capability, protected outcome, current pain, affected users, developers, or operators, success metric, constraints, and explicit non-goals; label unsupported intent inferences.
  • Read repository instructions and inspect Git state, generated files, package-manager policy, and current user changes.
  • Inventory the current implementation, public contracts, consumers, configuration, persisted data, runtime registration, tests, and operational procedures.
  • Identify the specific workflow, maintenance, security, compatibility, duplication, bundle, startup, or delivery cost that must improve.
  • Establish behavioral and relevant quantitative baselines before changing code; for human workflows use reproducible observations such as required steps or concepts, time to first meaningful result, error comprehension, and recovery effort.
  • Isolate the work so each migration step can be reverted without touching unrelated or user-owned changes.
  • Start a run-owned resource ledger with every created absolute path, worktree, process ID, cache, report, and temporary artifact; never register pre-existing resources as cleanup targets.
  • Stop with NO_CHANGE if modernization is only aesthetic, depends on speculative future scale, or cannot define a reproducible benefit to the protected outcome.

2. Evaluate the Simplest Credible Design

  • Check language, runtime, framework, platform, and already-declared dependency capabilities before searching for a new package.
  • Identify obsolete compatibility paths, parallel mechanisms, unused extension points, duplicated integrations, and transitional adapters that can be removed directly.
  • For external candidates, evaluate functional fit, API stability, maintenance activity, security history, license, ownership, release cadence, size, runtime support, and ecosystem compatibility.
  • Verify candidate claims from official documentation, repository releases, advisories, and package metadata matching the intended version.
  • Inspect migration guides, breaking chan
阅读完整来源 ↗