Refactor code while preserving passing tests and behavior. Use during the TDD refactor phase to remove duplication, improve design, and verify each structural change.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
1.6천건 · 관련도순
Refactor code while preserving passing tests and behavior. Use during the TDD refactor phase to remove duplication, improve design, and verify each structural change.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Review generated or changed production code before it ships, using Clean Code, SOLID, DRY, KISS, YAGNI, and LLM-specific failure-mode checks in any programming language. Best used reactively after an agent writes, edits, refactors, or fixes code, before presenting, committing, or merging the result. Use when the user asks "review this PR", "is this safe to merge?", "make this cleaner", "audit this code", "refactor this", "fix this bug", or after a coding agent produced implementation code. Can also guide writing when explicitly invoked before a risky edit. Invoke it on your own initiative the moment you finish writing, editing, or refactoring non-trivial production code, before presenting or committing — don't wait to be asked. DO NOT USE for factual/conceptual questions, CI/tooling config, git workflow, running/debugging tests, pure architecture discussion, prose writing, data analysis, or test-code review (use test-guard).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Refactor code to improve structure and maintainability
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Pre-refactor safety checklist. Verifies test coverage exists before AI modifies existing code. Use before asking AI to refactor anything.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Progressive L1-L6 refactoring hierarchy, 22 code smell taxonomy, atomic transformations, test code smells, and Fowler refactoring catalog
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when you need to verify Java performance optimizations by comparing profiling results before and after refactoring — including baseline validation, post-refactoring report generation, quantitative before/after metrics comparison, side-by-side flamegraph analysis, regression detection, or creating profiling-comparison-analysis and profiling-final-results documentation. This should trigger for requests such as Verify performance fix; Verify the performance; Verify the memory; Verify the threading; Compare before and after profiling results; Check for performance regressions after refactoring. Part of Plinth Toolkit
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when you need to refactor Java code based on trusted profiling analysis findings — including reviewing repository-owned or maintainer-sanitized docs/profiling-problem-analysis and docs/profiling-solutions files, identifying specific performance bottlenecks, and implementing targeted code changes to address CPU, memory, or threading issues. This should trigger for requests such as Refactor the code with profiling; Apply profiling; Optimize hot path; Reduce allocations found in profiling; Fix CPU bottlenecks from profiling analysis. Part of Plinth Toolkit
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
This skill should be used when refactoring existing CSS from inline styles or utility classes to semantic patterns. Triggers on "refactor CSS", "extract styles", "consolidate CSS", "convert inline", "clean up styles", "migrate to semantic". Transforms to semantic classes with dark mode and tests.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Assess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, architecture rot, and low-value tests. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to "assess technical debt", "find technical debt", "review technical debt", "what should we refactor", "find refactoring candidates", "where is the code rot", "what's our worst code", "find low-value tests", or "which tests can we delete". Analysis-only — does not modify code.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Write code through a disciplined, BDD-framed Test-Driven Development loop: build a behavior test list, then drive each behavior through red-green-refactor with an enforced observed-failure gate. Use when the user wants to implement, build, or write code test-first, "do TDD", follow "red-green-refactor", drive code from tests, choose the next test by the Transformation Priority Premise (TPP) or ZOMBIES ordering, or grow a feature behavior-by-behavior with tests leading. This skill writes and changes code; it does not produce a test plan document (use automated-test-planning, or manual-test-planning for a plan a person runs by hand), review or audit existing code (use code-review), restructure existing code outside a TDD loop (use refactor, or plan-a-change to plan a multi-module restructure), specify what a feature should do (use plan-a-feature), or find the root cause of a bug (use investigate). Runs its loop to completion without pausing for review; to review each behavior as it lands, use pairing.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Update Java test classes and methods to work with new code versions after refactoring or modifications. Use when code changes break existing tests due to signature changes, refactoring, or behavior modifications. Takes old and new code versions plus old tests as input, and outputs updated tests that compile and pass against the new code. Handles method signature changes, class refactoring, assertion updates, and mock modifications.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Intelligent code refactoring using IDE-level tools (rename, find-references, go-to-definition), AST-aware pattern matching, and TDD verification. Use for safe, large-scale refactoring with precision.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Identify and report code smells indicating poor design or maintainability issues in Python code, including duplicate code, magic numbers, hardcoded values, God classes, feature envy, inappropriate intimacy, data clumps, primitive obsession, and long parameter lists. Use when conducting code quality audits, preparing for refactoring, improving codebase maintainability, or performing design reviews. Produces markdown reports with severity ratings, locations, descriptions, and specific refactoring recommendations with before/after examples. Triggers when users ask to find code smells, identify design issues, suggest refactorings, improve code quality, or detect maintainability problems.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when the user wants to simplify, clean up, refactor, tidy, or refine code — their staged/unstaged git changes or a target file/path. Reduces complexity, flattens nesting, removes redundancy and dead code, scores each change by value (holding low-value churn), then runs tests to prove nothing broke. Invoke on: "simplify", "simplify this", "simplify my code/changes", "clean up", "clean this up", "clean up my changes", "refactor this", "make this cleaner", "tidy this up", "reduce complexity", "flatten this", "remove dead code", "make it more readable", "polish before commit", or "absolute simplify". Acts on your working diff; for repo-wide dead code use absolute-prune; for lint/type debt use absolute-debt.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Improve code quality and maintainability through systematic identification of code smells and application of proven refactoring patterns. Use when the user requests refactoring or provides relevant inputs for this workflow.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Restructure existing code safely without changing externally observable behavior. Composes context, design, architecture, code quality, and testing guardrails into a characterization-first refactoring workflow. Use when the user says 'refactor this', 'clean this up', 'untangle this module', 'move this to the right layer', 'simplify this code', or 'improve this structure'.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Apply clean code principles when generating or modifying implementation code. Enforces function focus, naming clarity, complexity management, error handling, and self-documenting style. Use when the user mentions 'clean code', 'code quality', 'coding guidelines', or 'implementation quality'. Loaded automatically by the code-generating molecules (code-forge, refactor-safely, bug-fix). This skill governs the craft of writing individual code units -- not architecture (see architecture), not security posture (see secure-coding), not test structure (see test-quality), and not refactoring workflows (see refactor-safely).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Plan, implement, or review refactor work in an existing codebase with compatibility, security, and verification controls. Use when the user explicitly requests refactor work.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Bulk-regenerate broken test selectors after a UI refactor or redesign. Detects drift between old and new DOM with an aria-snapshot diff, maps old locators to new equivalents using role-first + region scoping, validates against the new build, and produces a single PR with grouped per-file selector updates and per-change evidence. Assumes Playwright >= 1.50 (trace viewer DOM-snapshot panel, getByRole filtering, ariaSnapshot). Use when: "UI refactor broke tests," "redesign broke tests," "bulk update selectors," "regenerate selectors after refactor," "selector drift," "fix N broken tests after redesign." Not for: healing one flaky test at runtime — use test-reliability. Not for: writing a new test suite from scratch — use playwright-automation. Not for: re-recording tests after a framework switch (Selenium to Playwright) — use test-migration. Related: test-reliability, playwright-automation, test-migration, ci-cd-integration, visual-testing.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Makes working code easier to read and change without altering what it does, and proves the behaviour stayed the same. Use when someone says "simplify this", "clean up this function", "this file is a mess", "reduce the complexity", "refactor for readability", "tidy my diff before the PR", or when a linter reports high cyclomatic complexity or deep nesting. Covers pinning current behaviour with characterization tests, measuring complexity, choosing a named refactoring, applying it in small verified steps, and reporting suspected bugs found on the way instead of fixing them silently.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Systematic code cleanup and refactoring agent that identifies and fixes code quality issues without changing functionality. Focuses on: - Dead code removal - Import organization - Type improvements - Consistent patterns - File organization Use when "User asks to "clean up" code, User mentions "dead code" or "unused", User wants to "organize imports", User asks about "code quality", User wants to "refactor" without changing behavior, Code review identifies cleanup items, After major feature completion, cleanup, refactoring, code-quality, maintenance, organization" mentioned.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Keeping codebases healthy, performant, and maintainable - refactoring, performance optimization, and technical debt managementUse when "refactor, optimize, performance, technical debt, cleanup, architecture, speed up, bundle size, memory leak, slow query, code smell, complexity, dead code, performance, refactoring, optimization, technical-debt, architecture, cleanup, bundle, memory" mentioned.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Create a staged refactor plan for a module. Use when a mid-level developer needs a safe refactor path.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.