본문으로 건너뛰기
cccskills
무료GitHub에 공개

ce-simplify-code

Review and simplify code while preserving its behavior. Check readability, reuse, and efficiency, assess whether tests and comments add value, and verify applied changes with the project's configured checks before review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Simplify code for clarity, reuse, quality, and efficiency while preserving behavior, and prune tests and comments that carry no value. Use after implementation and before review, or to audit tests or comments in any part of a repo; use ce-debug for bugs.

설치 방법 보기

이럴 때 유용합니다

  • Cleaning up code after implementation
  • Improving readability before code review
  • Auditing tests for practical value
  • Reviewing redundant or unhelpful comments

포함된 파일(8)

  • SKILL.md7.3 KB
  • references/personas/code-quality-reviewer.md2.4 KB
  • references/personas/code-reuse-reviewer.md1.2 KB
  • references/personas/comment-reviewer.md2.7 KB
  • references/personas/efficiency-reviewer.md1.1 KB
  • references/personas/test-value-reviewer.md3.2 KB
  • references/reviewer-dispatch.md1.1 KB
  • references/standalone-report.md2.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Simplify code for clarity, reuse, quality, and efficiency, and prune tests and comments that carry no value, while preserving exact behavior. Prioritize readable, explicit code over compact code — fewer lines is not the goal.

Mode

Strip a mode:pipeline token and every proof-test:<path> token from the input before reading the rest as the scope. The proof-test path is context for Step 3, never scope; a caller may pass several.

  • Pipeline when mode:pipeline is present, or when no one asked for this run in their own current message: a step of another skill, or a run the agent starts itself, such as at a completion boundary. Work only on the current work, apply fixes without asking or waiting, and return the Step 5 summary to the caller. That summary is for the caller's record; never paste it into a commit, PR body, or other artifact.
  • Standalone when the user's own current message asked for this run. Their request sets the scope and focus. Report findings before editing anything, unless the request says to just fix them. Read references/standalone-report.md now, and again before applying any reported finding.

Step 1: Identify scope

Resolve the scope in this order:

  1. User-named scope is authoritative; do not widen it. In standalone mode it may be the whole repo, an area, or a path.
  2. Otherwise, in git, use the current branch versus its base. Without a usable base, use staged and unstaged changes (git diff HEAD).
  3. Outside git or without a diff, use files the user named or that were edited earlier in the conversation.

In pipeline mode the scope is what the caller passed, else the branch diff. Within it, prune only tests and comments the current work added or changed.

If none of the above produces a non-empty scope, pipeline mode reports "nothing to simplify" and returns. Standalone mode asks the user what to simplify, as references/standalone-report.md describes.

Preflight. If the scope has no substantive human-authored code — only documentation, generated or vendored files, dependencies or lockfiles, or mechanical churn — report that there is nothing to simplify and stop without reviewers. For mixed scopes, retain only the code and its tests. This check is about the kind of change, never its size: explicit small scopes still run, and any size or cost threshold is the caller's to set.

When the platform's task-tracking capability is available, show the review, apply, and verification outcomes without creating one task per reviewer. Otherwise continue without simulating a task list in chat.

Step 2: Launch review agents in parallel

Dispatch generic subagents via the platform's subagent primitive (Agent/Task in Claude Code, spawn_agent in Codex) where available; otherwise run the reviews inline or serially. For each reviewer, read its prompt asset from this skill's directory and pass the full file content as the subagent's prompt, together with the resolved scope (the full diff or file set), the mode, any proof test, the user's constraints, and the project standards governing the scope (or their file paths):

  • references/personas/code-reuse-reviewer.md
  • references/personas/code-quality-reviewer.md
  • references/personas/efficiency-reviewer.md
  • references/personas/test-value-reviewer.md, when the scope holds tests
  • references/personas/comment-reviewer.md, when the scope holds comments

A standalone request about only tests or only comments runs only that reviewer.

Do not paraphrase these rubrics from memory. Read each file and pass it verbatim, or the reviewer loses the rules that keep the pass behavior-preserving.

Read references/reviewer-dispatch.md before dispatching; it covers a full harness, releasing review agents, and the permission mode.

Model selection. Use the platform's balanced mid-tier model for these reviewers when the current harness exposes a known override. In Claude Code this is the Sonnet class. In Codex, apply this tier only when the active dispatch primitive exposes an explicit model or custom-agent selector; task wording alone does not select a different model. Otherwise omit the override and inherit the parent model -- a working pass on the parent model beats a broken dispatch.

Step 3: Fix issues

Proceed only after every review outcome is complete, whether returned by subagents or produced inline. In standalone mode, unless the request says to just fix them, report and stop here. Otherwise apply worthwhile findings directly; record false positives and low-value findings as skipped without asking the user.

Inspect beyond the resolved scope when needed to evaluate a finding, but edit only that scope and the import/export lines it needs. For a user-named file or directory scope, those import/export lines must also be inside it; skip any fix that would edit outside the mutation boundary.

Each fix must preserve outputs, errors, side effects, and ordering. If that cannot be established, skip it.

Never simplify away a safety check. Preserve trust-boundary validation, data-loss protection, security checks, and accessibility affordances. Skip any finding that would thin or remove one.

Protect the proof tests. In pipeline mode, each test the current work relied on to show its change works stays exactly as it is: every proof-test: path, else the tests the session's evidence names. Skip any finding from any reviewer that would delete, weaken, rename, move, merge, or rewrite one, or remove or rename the test-only code it calls. Behavior-preserving changes to the production code it exercises still apply. When you cannot tell which tests those are, delete or rewrite none of the tests the current work added or changed.

Honor caller-passed structure pins. A plan path passed with the structure-pin constraint is context, not scope. Preserve its session-settled: Key Technical Decisions, including deliberate duplication or separation.

Step 4: Verify behavior is preserved

Run project-wide typecheck and lint. Run tests matched to blast radius: scoped tests for local changes, broader tests for shared or wide-reach changes, and the full suite when the runner cannot scope tests.

Report failures with the check name and relevant output. Fix simplification-caused failures or revert the responsible change. Never weaken or remove a test to make a check pass. A test is removed only as a test-value finding, and any remaining tests that finding named must still pass afterwards.

If no test suite, lint, or typecheck is configured, state that explicitly in the summary; do not silently skip verification.

Step 5: Summarize

Summarize what was already sound and what improved. Report applied counts by reuse, quality, efficiency, tests, and comments; skipped count; check outcomes; and any comment kept because its constraint could not be encoded. If nothing changed, say so. Do not use net lines removed as the success metric. In pipeline mode this summary ends the skill, not the turn: the caller's next step follows it.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Monitor an open GitHub pull request over time, respond to review feedback, and address automated check failures. Apply and push fixes, then report whether it appears ready to merge or what still blocks progress.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Monitoring a pull request until it appears ready to merge
  • Addressing review feedback as it arrives
  • Handling automated check failures during review
EveryInc/compound-engineering-plugin2.6만2026년 10월 19일 업데이트

Develop independent solutions to a defined problem, compare them against shared requirements, and combine useful contributions into a coherent recommendation. An independent assessment and evidence checks support the selection, while unresolved tradeoffs and verification needs remain explicit.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Comparing concrete solutions to a defined problem
  • Developing rough options before choosing an approach
  • Comparing architectural or product proposals
EveryInc/compound-engineering-plugin2.6만2026년 10월 19일 업데이트

Turn a vague feature idea into clear requirements through dialogue. Define what to build, its scope, and success criteria, then capture the result in a short chat summary or a requirements document ready for implementation planning.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Clarifying a vague feature idea
  • Narrowing the scope of an ambitious improvement
  • Documenting requirements before implementation planning
EveryInc/compound-engineering-plugin2.6만2026년 10월 19일 업데이트

Review code changes or a pull request for bugs, effects on existing behavior, test gaps, and project standards. Receive findings supported by the code and a clear account of review coverage, with local fixes available when explicitly requested.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing a pull request before release
  • Checking changes for bugs and test gaps
  • Applying review findings locally
EveryInc/compound-engineering-plugin2.6만2026년 10월 19일 업데이트

ce-commit

무료

Save working changes as local Git commits with messages that explain the outcome. Follow the project's commit style, select files explicitly, and split clearly separate changes into a few logical commits when appropriate.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Saving completed work as a local commit
  • Writing messages that explain the outcome
  • Separating unrelated changes into commits
EveryInc/compound-engineering-plugin2.6만2026년 10월 19일 업데이트

Commit and push code changes, then open a pull request with a clear title and description. You can also draft or update PR descriptions and hand published requests to the follow-up monitoring workflow.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Committing changes and opening a pull request
  • Drafting only a PR title and description
  • Updating an existing PR description
EveryInc/compound-engineering-plugin2.6만2026년 10월 19일 업데이트

EveryInc의 스킬 모두 보기

이 스킬의 문제 신고