code-evolution skill
diff와 pull request를 분석하여 코드 수정이 설계 품질을 유지하는지 또는 저하시키는지 평가합니다.
- GitHub 스타
- 18
- 파일
- 1
- 마지막 커밋
- 2026년 10월 8일
- 라이선스
- MIT
- 허용된 도구
- 2
code-evolution skill은 무엇을 하나요?
code-evolution은(는) agent skill입니다. diff와 pull request를 분석하여 코드 수정이 설계 품질을 유지하는지 또는 저하시키는지 평가합니다.
skill의 SKILL.md에서 생성된 요약입니다.
code-evolution skill 정보
pull request를 검토하거나 최근 파일 수정을 분석하는 개발자는 이 SKILL을 사용하여 코드 변경 사항이 구조적 무결성을 유지하는지 판단할 수 있습니다. 이 도구는 코드 수정이 시스템 설계의 일부처럼 자연스러운지, 아니면 임시방편적인 패치인지 판단하는 특화된 렌즈 역할을 합니다. 에이전트가 diff나 특정 모듈을 검토하는 작업을 수행할 때, 새로운 기능이 기술 부채나 불필요한 복잡성을 초래하지 않도록 이 도구를 로드해야 합니다.
이 프로세스는 엄격한 평가 프레임워크를 적용하기 전에 Read 및 Grep 도구를 사용하여 대상 코드를 조사합니다. 새로운 예외 케이스나 의존성 같은 점진적 복잡성을 식별하고, 중복을 찾아내기 위해 반복 감사(repetition audit)를 수행하는 데 집중합니다. 일반적인 설계 결함(design smells)을 스캔하는 도구와 달리, 이 SKILL은 코드베이스의 진화 궤적을 구체적으로 타겟팅하여 사용자가 이상적인 시스템 구조를 유지하기 위해 즉각적인 리팩터링이 필요한지 결정하도록 돕습니다.
agent가 수행할 수 있는 작업
- 1pull request 설계 품질 평가pull request를 검토하여 변경 사항이 처음부터 시스템에 설계된 것처럼 보이는지 확인합니다.
- 2코드 중복 감사최근 변경 사항으로 인해 추상화되었어야 할 중복 로직이 도입되었는지 확인합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
code-evolution skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 code-evolution skill 설치
/plugin marketplace add codybrom/clairvoyance /plugin install clairvoyance@clairvoyance-plugins
Claude Code에 code-evolution skill 설치
~/.claude/skills/code-evolution/SKILL.md
$ npx degit codybrom/clairvoyance/skills/code-evolution ~/.claude/skills/code-evolutionClaude Code (project)에 code-evolution skill 설치
.claude/skills/code-evolution/SKILL.md
$ npx degit codybrom/clairvoyance/skills/code-evolution .claude/skills/code-evolutionCodex에 code-evolution skill 설치
~/.agents/skills/code-evolution/SKILL.md
$ npx degit codybrom/clairvoyance/skills/code-evolution ~/.agents/skills/code-evolutionGemini CLI에 code-evolution skill 설치
~/.gemini/skills/code-evolution/SKILL.md
$ npx degit codybrom/clairvoyance/skills/code-evolution ~/.gemini/skills/code-evolutionClaude.ai에 code-evolution skill 설치
npx degit codybrom/clairvoyance/skills/code-evolution code-evolution && zip -r code-evolution.zip code-evolution # claude.ai → Customize → Skills → + → Create skill → Upload a skill → code-evolution.zip
SKILL.md
GitHub에서 보기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
- If someone were designing this system from scratch knowing this requirement, what would it look like?
- Does the modified code match that ideal, or is the change visibly patched on?
- 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
- 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.
- 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:
-
Keep comments near the code they describe: proximity is a maintenance mechanism
-
Put comments in code, not commit logs: developers navigate code spatially, not chronologically
-
Document each decision exactly once: duplicated documentation drifts invisibly
-
Check the diffs before committing: verify documentation still matches behavior
-
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
- Apply the "designed this way" test: Does the modification look native or bolted-on?
- Check for incremental complexity: Did the change add special cases, dependencies, parameters, or flags?
- Run repetition audit: Did the change introduce or perpetuate duplication?
- Verify comment maintenance: Are all affected comments updated?
- Assess debt trajectory: Is the modification reducing or increasing technical debt?
- Recommend: Specific improvements to make the change feel designed-in
Red flag signals for code evolution are cataloged in red-flags (Repetition, Tactical Momentum).
이 스킬의 파일
1code-evolution skill 질문
Claude Code에 code-evolution skill을 어떻게 설치하나요?
npx degit codybrom/clairvoyance/skills/code-evolution ~/.claude/skills/code-evolution를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
code-evolution skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
수정 과정에서 기술 부채를 어떻게 처리하나요?
컨텍스트가 최신 상태일 때 수정 중인 영역의 부채를 해결할 것을 권장하며, 수정 사항에 영향을 미치는 다른 곳의 부채는 문서화하도록 안내합니다.
설계 품질을 위한 '세 가지 질문 테스트'란 무엇인가요?
새로운 요구 사항을 반영하여 처음부터 시스템을 설계하더라도 현재와 같은 모습일지, 수정된 코드가 그 이상적인 모습과 일치하는지, 그리고 그 차이를 줄이기 위해 필요한 최소한의 구조 재편은 무엇인지 묻는 테스트입니다.