refactor — for Claude Code refactor, psc-comet, community, for Claude Code, ide skills, Behavior-preserving, restructuring, different, structure, produces

v0.1.0

이 스킬 정보

적합한 상황: Ideal for AI agents that need behavior-preserving restructuring. the goal is a different structure that produces identical. 현지화된 요약: # Refactor Skill Behavior-preserving restructuring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

기능

Behavior-preserving restructuring. The goal is a different structure that produces identical
What Claude Gets Wrong Without This Skill
The Behavior Contract
The One-Change Rule
One structural change at a time:

# 핵심 주제

andrem-sec andrem-sec
[1]
[0]
업데이트: 4/2/2026

Skill Overview

Start with fit, limitations, and setup before diving into the repository.

적합한 상황: Ideal for AI agents that need behavior-preserving restructuring. the goal is a different structure that produces identical. 현지화된 요약: # Refactor Skill Behavior-preserving restructuring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

이 스킬을 사용하는 이유

추천 설명: refactor helps agents behavior-preserving restructuring. the goal is a different structure that produces identical. Refactor Skill Behavior-preserving restructuring. This AI agent skill supports Claude Code

최적의 용도

적합한 상황: Ideal for AI agents that need behavior-preserving restructuring. the goal is a different structure that produces identical.

실행 가능한 사용 사례 for refactor

사용 사례: Applying Behavior-preserving restructuring. The goal is a different structure that produces identical
사용 사례: Applying What Claude Gets Wrong Without This Skill
사용 사례: Applying The Behavior Contract

! 보안 및 제한 사항

  • 제한 사항: Do not batch. Do not "while I'm in here" add improvements. Do not rename AND restructure in one change.
  • 제한 사항: Remove duplication Same logic in 3+ places — but only if the logic is genuinely identical, not just similar
  • 제한 사항: Do not refactor code you do not understand. Read it until you can state its behavior contract before touching it.

About The Source

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Labs 데모

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ 및 설치 단계

These questions and steps mirror the structured data on this page for better search understanding.

? 자주 묻는 질문

refactor은 무엇인가요?

적합한 상황: Ideal for AI agents that need behavior-preserving restructuring. the goal is a different structure that produces identical. 현지화된 요약: # Refactor Skill Behavior-preserving restructuring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

refactor은 어떻게 설치하나요?

다음 명령을 실행하세요: npx killer-skills add andrem-sec/psc-comet/refactor. Cursor, Windsurf, VS Code, Claude Code와 19개 이상의 다른 IDE에서 동작합니다.

refactor은 어디에 쓰이나요?

주요 활용 사례는 다음과 같습니다: 사용 사례: Applying Behavior-preserving restructuring. The goal is a different structure that produces identical, 사용 사례: Applying What Claude Gets Wrong Without This Skill, 사용 사례: Applying The Behavior Contract.

refactor 와 호환되는 IDE는 무엇인가요?

이 스킬은 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer 와 호환됩니다. 통합 설치에는 Killer-Skills CLI를 사용하세요.

refactor에 제한 사항이 있나요?

제한 사항: Do not batch. Do not "while I'm in here" add improvements. Do not rename AND restructure in one change.. 제한 사항: Remove duplication Same logic in 3+ places — but only if the logic is genuinely identical, not just similar. 제한 사항: Do not refactor code you do not understand. Read it until you can state its behavior contract before touching it..

이 스킬 설치 방법

  1. 1. 터미널 열기

    프로젝트 디렉터리에서 터미널 또는 명령줄을 여세요.

  2. 2. 설치 명령 실행

    npx killer-skills add andrem-sec/psc-comet/refactor 를 실행하세요. CLI가 IDE 또는 에이전트를 자동으로 감지하고 스킬을 설정합니다.

  3. 3. 스킬 사용 시작

    스킬이 이제 활성화되었습니다. 현재 프로젝트에서 refactor을 바로 사용할 수 있습니다.

! Source Notes

This page is still useful for installation and source reference. Before using it, compare the fit, limitations, and upstream repository notes above.

Upstream Repository Material

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Upstream Source

refactor

# Refactor Skill Behavior-preserving restructuring. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows. Behavior-preserving

SKILL.md
Readonly
Upstream Repository Material
The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.
Upstream Source

Refactor Skill

Behavior-preserving restructuring. The goal is a different structure that produces identical observable behavior.

What Claude Gets Wrong Without This Skill

Without refactor discipline, "refactoring" becomes a mix of restructuring, behavior changes, and new features in one pass. When something breaks, there is no way to know which change caused it. Tests that fail mid-refactor mean the scope was too large, but without the discipline to go one change at a time, the error is impossible to isolate.

The Behavior Contract

Before touching any code, state what it currently does in terms of observable behavior — inputs, outputs, side effects. This is the contract.

If the refactor changes any of these, it is not a refactor — it is a feature change or a bug fix. Handle those separately.

The One-Change Rule

One structural change at a time:

  • Extract a function
  • Rename a variable
  • Remove duplication
  • Flatten nesting
  • Extract a class
  • Move a module

Run tests after each. If they pass, continue. If they fail, the change broke something — revert it and understand why before proceeding.

Do not batch. Do not "while I'm in here" add improvements. Do not rename AND restructure in one change.

The Coverage Gate

Refactoring without tests is rearranging furniture in the dark. Before the first structural change:

  • Run the test suite
  • Check coverage
  • If coverage is below 80% on the code being refactored, stop and write tests first

This is not optional. Skipping it means the refactor cannot be verified.

Common Refactor Operations

OperationWhen to Use
Extract functionBlock of code used in 2+ places, or a block that has a single clear responsibility
RenameName does not reflect current purpose (this happens after behavior is understood, not before)
Remove duplicationSame logic in 3+ places — but only if the logic is genuinely identical, not just similar
Flatten nestingMore than 3 levels of nesting in a single function
Extract classA function or module has grown to handle 2+ distinct concerns
InlineAn abstraction that adds complexity without clarity — sometimes the direct version is better

Anti-Patterns

Do not refactor code you do not understand. Read it until you can state its behavior contract before touching it.

Do not refactor and fix bugs in the same pass. Fix first, then refactor.

Do not refactor code with no tests. Write tests first.

Do not "improve" variable names speculatively — rename only when you understand the current name is wrong.

Mandatory Checklist

  1. Verify test coverage was checked before any changes
  2. Verify the behavior contract was stated before any structural changes
  3. Verify only one structural change was made per test run
  4. Verify no test failures occurred without a full stop and reassessment
  5. Verify the full test suite passes after all changes
  6. Verify coverage did not regress
  7. Verify the behavior contract is still satisfied after all changes

관련 스킬

Looking for an alternative to refactor or another community skill for your workflow? Explore these related open-source skills.

모두 보기

openclaw-release-maintainer

Logo of openclaw
openclaw

현지화된 요약: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

333.8k
0
인공지능

widget-generator

Logo of f
f

현지화된 요약: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf

149.6k
0
인공지능

flags

Logo of vercel
vercel

현지화된 요약: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
브라우저

pr-review

Logo of pytorch
pytorch

현지화된 요약: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
개발자