본문으로 건너뛰기
Skillpedia
일반 코딩48k · #5784

simplify-code

하는 일

이 도구는 변경된 코드 조각을 검토합니다. 코드를 단순하게 만들고 이해하기 쉽게 하며, 올바르게 작동하는지 확인하는 방법을 찾습니다. 안전한 변경만 적용합니다.

사용하는 경우

  • ✓방금 변경된 코드를 단순하게 만들고 싶을 때.
  • ✓코드 변경이 명확하고 안전한지 확인하고 싶을 때.
  • ✓특정 코드 부분을 검토하거나 정리하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/simplify-code/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/simplify-code/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 코드를 검토하고, 가능하다면 단순하게 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

재사용, 품질, 효율성, 명확성이라는 여러 관점에서 코드를 분석하는 작은 '인공지능'들을 사용합니다. 그다음 원래 기능을 바꾸지 않는 가장 안전한 변경만 제안하거나 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Simplify Code

Review changed code for reuse, quality, efficiency, and clarity issues. Use Codex sub-agents to review in parallel, then optionally apply only high-confidence, behavior-preserving fixes.

When to Use

  • When the user asks to simplify, clean up, refactor, or review changed code.
  • When you want high-confidence, behavior-preserving improvements on a scoped diff.

Modes

Choose the mode from the user's request:

  • review-only: user asks to review, audit, or check the changes
  • safe-fixes: user asks to simplify, clean up, or refactor the changes
  • fix-and-validate: same as safe-fixes, but also run the smallest relevant validation after edits

If the user does not specify, default to:

  • review-only for "review", "audit", or "check"
  • safe-fixes for "simplify", "clean up", or "refactor"

Step 1: Determine the Scope and Diff Command

Prefer this scope order:

  1. Files or paths explicitly named by the user
  2. Current git changes
  3. Files edited earlier in the current Codex turn
  4. Most recently modified tracked files, only if the user asked for a review but there is no diff

If there is no clear scope, stop and say so briefly.

When using git changes, determine the smallest correct diff command based on the repo state:

  • unstaged work: git diff
  • staged work: git diff --cached
  • branch or commit comparison explicitly requested by the user: use that exact diff target
  • mixed staged and unstaged work: review both

Do not assume git diff HEAD is the right default when a smaller diff is available.

Before reviewing standards or applying fixes, read the repo's local instruction files and relevant project docs for the touched area. Prefer the closest applicable guidance, such as:

  • AGENTS.md
  • repo workflow docs
  • architecture or style docs for the touched module

Use those instructions to distinguish real issues from intentional local patterns.

Step 2: Launch Four Review Sub-Agents in Parallel

Use Codex sub-agents when the scope is large enough for parallel review to help. For a tiny diff or one very small file, it is acceptable to review locally instead.

When spawning sub-agents:

  • give each sub-agent the same scope
  • tell each sub-agent to inspect only its assigned review role
  • ask for concise, structured findings only
  • ask each sub-agent to report file, line or symbol, problem, recommended fix, and confidence

Use four review roles.

Sub-Agent 1: Code Reuse Review

Review the changes for reuse opportunities:

  1. Search for existing helpers, utilities, or shared abstractions that already solve the same problem.
  2. Flag duplicated functions or near-duplicate logic introduced in the change.
  3. Flag inline logic that should call an existing helper instead of re-implementing it.

Recommended sub-agent role: explorer for broad codebase lookup, or reviewer if a stronger review pass is more useful than wide search.

Sub-Agent 2: Code Quality Review

Review the same changes for code quality issues:

  1. Redundant state, cached values, or derived values stored unnecessarily
  2. Parameter sprawl caused by threading new arguments through existing call chains
  3. Copy-paste with slight variation that should become a shared abstraction
  4. Leaky abstractions or ownership violations across module boundaries
  5. Stringly-typed values where existing typed contracts, enums, or constants already exist

Recommended sub-agent role: reviewer

Sub-Agent 3: Efficiency Review

Review the same changes for efficiency issues:

  1. Repeated work, duplicate reads, duplicate API calls, or unnecessary recomputation
  2. Sequential work that could safely run concurrently
  3. New work added to startup, render, request, or other hot paths without clear need
  4. Pre-checks for existence when the operation itself can be attempted directly and errors handled
  5. Memory growth, missing cleanup, or listener/subscription leaks
  6. Overly broad reads or scans when the code only needs a subset

Recommended sub-agent role: reviewer

Sub-Agent 4: Clarity and Standards Review

Review the same changes for clarity, local standards, and balance:

  1. Violations of local project conventions or module patterns
  2. Unnecessary complexity, deep nesting, weak names, or redundant comments
  3. Overly compact or clever code that reduces readability
  4. Over-simplification that collapses separate concerns into one unclear unit
  5. Dead code, dead abstractions, or indirection without value

…

자주 묻는 질문

「diff」란 무엇인가요?

두 버전의 파일이나 파일 묶음 사이의 차이를 보여 주는 비교입니다. 어떤 변경이 이루어졌는지 정확히 보는 것과 같습니다.

「안전한 변경만 적용한다」는 무슨 뜻인가요?

코드가 깨지거나 프로그램의 예상된 동작이 바뀔 가능성이 낮은 변경만 한다는 뜻입니다. 위험한 수정은 피합니다.

도구가 왜 「하위 에이전트」를 사용하나요?

하위 에이전트를 사용하면 여러 전문가가 코드의 여러 측면을 동시에 살펴볼 수 있어, 더 빠르고 꼼꼼하게 검토할 수 있습니다.

상세 정보

작성자의 원본 설명

Review a diff for clarity and safe simplifications, then optionally apply low-risk fixes.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5784
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬