book-legacy-code
Use when the user explicitly asks for the Working Effectively with Legacy Code lens, book-legacy-code, or this skill by name.
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
--- name: "book-legacy-code" description: "Use when the user explicitly asks for the Working Effectively with Legacy Code lens, book-legacy-code, or this skill by name." license: "Apache-2.0" --- # Apply The Legacy Code Lens Gain control before redesigning: 1. State the requested behavior change and behavior that must remain. 2. Identify the change point and the nearest observable effect. 3. Characterize uncertain behavior with the smallest reliable test or observation path. 4. Create the smallest seam needed for sensing or substitution. 5. Break only the dependency that blocks feedback: construction, global state, time, environment, framework object, I/O, or hard collaborator. 6. Make the behavior change, verify it, then refactor locally. Keep behavior changes separate from broad cleanup. Use sprout/wrap or extraction techniques only as temporary change-enabling moves, and remove test-only or subclass tricks when safer structure exists. Do not launch a rewrite merely because the current design is unpleasant.
More Refactoring skills
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
analyze-project
lllllllama/rigorpilot-skills
Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories. Use when the user wants to read and understand a repository, inspect model structure and training or inference entrypoints, review configs and insertion points, or flag suspicious implementation patterns without modifying code or running heavy jobs. Do not use for active command execution, broad refactoring, speculative code adaptation, or automatic bug fixing.
request-refactor-plan
mattpocock/skills
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

