일부 편집 내용은 현재 영어로 제공됩니다.

프롬프트 편집 전용 업데이트

코드 리팩토링 프롬프트

코드 조각을 안전하고 점진적으로 리팩토링합니다. 이름 변경, 분할, 단순화로 동작을 유지하며 변경 사항과 위험을 나열합니다.

코드 리팩토링코드 리뷰프롬프트 엔지니어링
재사용 가능한 프롬프트

내용으로 변경

프롬프트 언어: 영어
브라우저에서 실행

워크플로

5 단계
  1. Paste the code and state the goal and constraints.
  2. Generate the refactor.
  3. Review the change list and risk list.
  4. Run tests to confirm identical behavior.
  5. Commit the refactor separately from feature work.

네거티브 프롬프트

rewrite the whole file, change the API, add dependencies, drop error handling, unrequested features

기록할 매개변수

goal
readability
constraint
do not change the public API
output
refactored code + change list + risk list
변수
3 개의 맞춤 항목

제한 사항

  • AI refactors can silently change edge-case behavior.
  • It is not a substitute for running your test suite.
  • Long files may need to be refactored in smaller pieces.

관련 템플릿

전체 보기 →