Code Evolution Review

VerifiedSafe

Evaluates whether changes to existing code maintain or degrade design quality. Use when reviewing diffs, PRs, or recently modified files.

Sby Skills Guide Bot
DevelopmentIntermediate
7/25/2026
Claude CodeCursorCodex
#code-review#refactoring#technical-debt#design-quality#pull-requests

Recommended for

Automated summary

This skill evaluates whether a change to existing code maintains or degrades design quality, judging each change as either designed-in or bolted-on.

Strengths

  • Offers a concrete three-question test that compares a diff against what the system would look like if designed from scratch with that requirement
  • Frames technical debt as the accumulation of small reasonable shortcuts and pushes for reducing it on every modification instead of in periodic big refactors
  • Includes a repetition audit with two strategies (extract and call, or restructure so the code runs once) plus guidance on when not to extract
  • Introduces the middle path: aim for the cleanest restructuring achievable within the current diff rather than an unaffordable ideal redesign

Limitations

  • Read-only and search-only tools (Read, Grep): the skill diagnoses but never edits or runs code, so the actual refactoring is left to the user
  • Judgment is entirely model interpretation, with no metrics or tests to ground the design assessment
  • The provided content cuts off at the start of a comments section, so its guidance on commenting is not usable as written
When to use it

Use it when reviewing a diff, PR, or recently modified files and you need to know whether the change fits the existing design or is patched on top of it.

When not to use it

Do not use it to scan for design smells in general (use red-flags) or to assess overall design investment (use strategic-mindset).

Security analysis

Safe
Quality score82/100

This is a purely analytical review lens. Its declared tools (Read, Grep) match its purpose of inspecting code, and the body contains no executable commands, no network calls, no file mutations, and no attempts to exfiltrate data or override safety behavior. The only dynamic element is $ARGUMENTS, used to scope which file/PR to read, which is benign.

No concerns found

How this analysis is made

Examples

Review a PR diff
Use code-evolution on the diff of this PR and tell me, for each change, whether it looks designed-in or bolted-on: https://github.com/acme/billing/pull/482
Judge a feature patch
I just added a discount rule to src/billing/invoice.ts. Run code-evolution on that file and tell me if I patched it on or designed it in, and what the minimum restructuring would be.
Audit repeated logic
Use code-evolution on src/reporting/ after my latest changes and run the repetition audit: is the same logic now duplicated, and should it be extracted or restructured to run once?

name: code-evolution description: "Evaluates whether changes to existing code maintain or degrade design quality. Use when reviewing diffs, PRs, or recently modified files to judge whether each change looks designed-in or bolted-on. Not for scanning design smells (use red-flags) or assessing overall design investment (use strategic-mindset)." argument-hint: "[file, module, or PR]" allowed-tools: Read, Grep

Code Evolution Review Lens

When invoked with $ARGUMENTS, focus the analysis on the specified file, module, or pull request. Read the target code first, then apply the checks below.

Evaluate whether code modifications maintain or degrade design quality.

When to Apply

  • Reviewing a PR that modifies existing code
  • After adding a feature to an existing system
  • When code has accumulated patches and feels degraded
  • When deciding whether to refactor during a feature change

Core Principles

Technical Debt

Technical debt doesn't come from catastrophic decisions. It comes from hundreds of small, reasonable shortcuts that compound silently until the codebase starts fighting back. Calling it "debt" at all is generous because the financial kind gets repaid.

During Modifications

  • Debt in the area being modified → fix it now (context is fresh, fix is cheapest)
  • Debt elsewhere affecting the modification → document it, fix if feasible
  • Never add to the pile. Each modification should reduce debt, not increase it

Refactoring

Refactoring is not a special event. It is the normal expression of strategic programming applied to existing code. Continuous small improvements, not periodic large refactors.

The "Designed This Way" Standard

"Ideally, when you have finished with each change, the system will have the structure it would have had if you had designed it from the start with that change in mind." — John Ousterhout, A Philosophy of Software Design

The design of a mature system is determined more by changes made during its evolution than by any initial conception. Every modifier either continues toward the original trajectory or bends away.

Three-Question Test

  1. If someone were designing this system from scratch knowing this requirement, what would it look like?
  2. Does the modified code match that ideal, or is the change visibly patched on?
  3. If not, what's the minimum restructuring to close the gap?

The Middle Path

When the ideal refactoring would require touching far more of the codebase than the current task budget allows, the question isn't "can I afford the full redesign?" It's "what's the best I can do within this change's scope?" That question often surfaces an approach nearly as clean as the ideal, achievable within the current diff, that the smallest-change mindset would never find because it anchors on the current code.

The "Smallest Possible Change" Trap

There is no neutral gear. Every change either improves the design or degrades it.

Each minimal change typically introduces a special case, a dependency, or a conditional that doesn't belong. Once, negligible. Across hundreds of modifications over years, this is how well-designed systems become legacy nightmares.

Repetition Audit

After a modification, ask yourself:

  • Does the same logic now exist in multiple places?
  • Was similar code duplicated instead of abstracted?
  • Would a similar change require edits in multiple locations?

Repeated code is a red flag that the right abstraction hasn't been found yet.

Two Strategies

  1. Extract and call: Works best when the method forms a deep abstraction. If the snippet is two lines but requires five parameters, extraction may add more complexity than it removes.
  2. Restructure so the code runs once: Sometimes better because it eliminates duplication entirely.

When not to extract: Code that looks identical can represent two independent decisions that happen to be expressed the same way. Merging them creates artificial coupling.

Comment Maintenance

Stale comments are worse than missing comments because they actively mislead. Once readers discover comments can't be trusted, they stop reading them entirely.

Five maintenance rules:

  1. Keep comments near the code they describe: proximity is a maintenance mechanism

  2. Put comments in code, not commit logs: developers navigate code spatially, not chronologically

  3. Document each decision exactly once: duplicated documentation drifts invisibly

  4. Check the diffs before committing: verify documentation still matches behavior

  5. Prefer higher-level comments: abstract comments that describe what and why survive code changes better than detailed how comments. As Ousterhout writes, "the farther a comment is from the code it describes, the more abstract it should be"

Review Process

  1. Apply the "designed this way" test: Does the modification look native or bolted-on?
  2. Check for incremental complexity: Did the change add special cases, dependencies, parameters, or flags?
  3. Run repetition audit: Did the change introduce or perpetuate duplication?
  4. Verify comment maintenance: Are all affected comments updated?
  5. Assess debt trajectory: Is the modification reducing or increasing technical debt?
  6. Recommend: Specific improvements to make the change feel designed-in

Red flag signals for code evolution are cataloged in red-flags (Repetition, Tactical Momentum).

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/code-evolution-review-mrzxuppg/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/code-evolution-review-mrzxuppg' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-evolution-review-mrzxuppg/download' --output '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md.part' && mv '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md.part' '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md' && test -s '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/code-evolution' && cp -R '.skill-downloads/code-evolution-review-mrzxuppg' '.claude/skills/code-evolution'

Cursor
test -f '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md' && test -s '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/code-evolution' && cp -R '.skill-downloads/code-evolution-review-mrzxuppg' '.cursor/skills/code-evolution'

Codex
test -f '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md' && test -s '.skill-downloads/code-evolution-review-mrzxuppg/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/code-evolution' && cp -R '.skill-downloads/code-evolution-review-mrzxuppg' '.agents/skills/code-evolution'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/code-evolution-review-mrzxuppg'

openskills read 'code-evolution-review-mrzxuppg'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/code-evolution-review-mrzxuppg/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills