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

simplify-code

하는 일

이 스킬은 AI가 방금 바꾼 코드를 동작 변경 없이 정리하도록 합니다. 공유하기 전에 작동하는 코드를 더 깔끔하고 단순하게 만들려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓최근 코드 변경을 단순화하거나 정리해 달라고 AI에게 요청할 때.
  • ✓재사용성, 단순성, 효율성, 설계 수준을 검토하고 싶을 때.
  • ✓파일을 바꾸지 않고 정리 아이디어만 보고하는 예행 실행을 원할 때.

스킬 링크

https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/simplify-code/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/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 — Parallel Review & Cleanup

Review your recent code changes with four focused reviewers running in parallel, aggregate their findings, and apply the fixes worth applying.

This is a cleanup pass, not a bug hunt. You are improving the quality of code that already works — removing duplication, flattening needless complexity, cutting waste, and deepening band-aid fixes. Do not go hunting for correctness bugs here; that's what requesting-code-review is for.

Core principle: Four narrow reviewers beat one broad reviewer. Each one deeply searches the codebase for a single class of problem — reuse, quality, efficiency, altitude — without diluting its attention across all four. They run concurrently, so you pay the latency of one review, not four.

When to Use

Trigger this skill when the user says any of:

  • "simplify" / "simplify my changes" / "simplify these changes"
  • "review my code" / "review my recent changes" / "clean up my changes"
  • "/simplify" (if they're carrying the Claude Code habit over)

Optional modifiers the user may add — honor them:

  • Focus: "simplify focus on efficiency" → run only the efficiency reviewer (or weight the aggregation toward it). Recognized focuses: reuse, quality (also accepts simplification), efficiency, altitude.
  • Dry run: "simplify but don't change anything" / "just report" → run the four reviewers, present findings, apply NOTHING. Ask before applying.
  • Scope: "simplify the last commit" / "simplify staged" / "simplify src/foo.py" → narrow the diff source accordingly (see Phase 1).

Do NOT auto-run this after every edit or tack it onto the end of unrelated tasks. It costs four subagents' worth of tokens — invoke it only when the user explicitly asks.

The Process

Phase 1 — Identify the changes

Capture the diff to review. Pick the source by what the user asked for, in this default order:

# 1. Default: uncommitted working-tree changes (tracked files)
git diff

# 2. If that's empty, include staged changes
git diff HEAD

# 3. Scoped variants the user may request:
git diff --staged                 # "staged changes"
git diff HEAD~1                    # "the last commit"
git diff main...HEAD              # "this branch" / "my PR"
git diff -- src/foo.py            # specific file(s)

If git diff and git diff HEAD are both empty and there's no git repo or no changes, fall back to the files the user explicitly named or that were recently created/edited in this session. If you genuinely can't find any changed code, say so and stop — there's nothing to simplify.

Capture the full diff text. Note its size: if it's very large (say >2000 changed lines), warn the user that four subagents each carrying the full diff will be token-heavy, and offer to scope it down (per-directory, per-commit) before proceeding.

Phase 2 — Launch four reviewers in parallel

Use delegate_task batch mode — pass all four tasks in one tasks array so they run concurrently. Four is the right fan-out for this pattern; it's within the delegation.max_concurrent_children budget on any default install.

No delegation available? If you can't call delegate_task in this context (you're a leaf subagent, delegation is disabled, or the budget is exhausted), do NOT skip the review or drop angles. Work through all four reviewer angles yourself, sequentially, in this context — same search standards, same finding format. Then say clearly in your final summary that this was a single-pass inline review, not the parallel fan-out, so the user knows what actually ran.

Give every reviewer the complete diff (not fragments — cross-file issues hide in the gaps) plus the absolute repo path so they can search the wider codebase. Each reviewer gets terminal, file, and search toolsets (so they can git, read_file, and search_files/grep).

Tell each reviewer to:

  • Search the existing codebase for evidence (don't reason from the diff alone).
  • Apply Chesterton's Fence: before flagging anything for removal, run git blame on the line to understand why it exists. If you can't determine the original purpose, mark it confidence: low — don't guess.
  • Report findings as structured output with the concrete cost, confidence, and risk:
    file:line → problem → cost (what's duplicated/wasted/harder to maintain) → suggested fix | confidence: high/medium/low | risk: SAFE/CAREFUL/RISKY
    
    The cost field forces each fi
자주 묻는 질문

버그를 찾나요?

아니요. 스킬은 정리 작업이며, 버그 찾기는 코드 검토 스킬이 담당합니다.

한 가지 종류의 검토만 고를 수 있나요?

네. 스킬에서 재사용, 품질, 효율, 설계 수준 중 하나에 집중할 수 있습니다.

파일을 바꾸지 않고 보고만 할 수 있나요?

네. 스킬은 결과만 보고하는 예행 실행을 지원합니다.

상세 정보

작성자의 원본 설명

Parallel 4-agent cleanup of recent code changes.

repo: NousResearch/hermes-agent

인기도

GitHub 스타
260k
순위
#623
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬