AGENT SKILL

legacy-refactor

Use when the user wants to modernize legacy code incrementally. Covers strangler-fig, seams, characterization tests, safe extraction, and risk reduction.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
1

01 前言 Front Matter

name
legacy-refactor
triggers
[ "user", "model" ]
description
Use when the user wants to modernize legacy code incrementally. Covers strangler-fig, seams, characterization tests, safe extraction, and risk reduction.

03 SKILL.md 正文

Legacy Refactor

Modernize legacy code without big-bang rewrites.

When to use

  • Code is hard to test, read, or change.
  • Need to migrate to a new framework or language.
  • Want to extract a service from a monolith.
  • Technical debt is blocking features.

Core protocol

  1. Add characterization tests. Capture current behavior before touching code.
  2. Find seams. Identify interfaces where new code can replace old code.
  3. Strangle incrementally. Route small slices through new implementations.
  4. Refactor locally. Extract functions, rename, reduce duplication.
  5. Verify at each step. Run tests and, if possible, a diff-check.
  6. Document decisions. ADRs for architecture changes and deprecated paths.

See also

  • improve-codebase-architecture - deepening and navigation improvements.
  • legacy-refactor - incremental modernization of legacy code.

Output rule

  • Each commit must leave the system testable and no worse than before.
  • Before/after: tests, complexity metrics, and migration status.

04 同仓库更多 Skills

Leostruka
Leostruka/devin-bundle

montador-de-ideias

Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.

★ 0
Leostruka
Leostruka/devin-bundle

git-github-adaptive-engineering

Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.

★ 0
Leostruka
Leostruka/devin-bundle

adaptive-agenda-calendar-routine-engine

Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0