Langsung ke konten
Skillpedia
Pemrograman umum26k Β· #10046

ce-simplify-code

Fungsinya

Skill ini membuat kode yang sudah ada lebih mudah dibaca dan dipelihara tanpa mengubah apa yang dilakukannya. Ditujukan untuk pengembang yang menginginkan pembersihan setelah menulis kode dan sebelum tinjauan.

Kapan dipakai

  • βœ“Saat Anda selesai menulis sebuah fitur dan ingin kodenya dirapikan sebelum ditinjau.
  • βœ“Ketika Anda ingin memeriksa bagian proyek dari kode, tes, atau komentar tambahan yang tidak berguna.
  • βœ“Saat Anda punya bug untuk diperbaiki, ini alat yang salah, karena hanya membersihkan kode.

Link skill

https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-simplify-code/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-simplify-code/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda menyederhanakan kode yang saya ubah hari ini dan memastikan tidak ada yang rusak?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill membaca kode dalam cakupan, mencari bagian yang bisa dibuat lebih jelas atau lebih pendek, lalu menerapkan perubahan itu sambil mempertahankan perilaku yang sama.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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.

If the user's or project's active instructions or the live prompt name a model for this subagent, use that model instead of the default tier above. They can name it by the subagent's tier, by its prompt-asset name, or for the subagents bei

Pertanyaan umum

Apakah ini akan mengubah perilaku kode saya?

Tujuannya menjaga perilaku tetap persis sama dan hanya membuat kode lebih jelas atau lebih efisien.

Apakah ia memperbaiki bug?

Tidak. Skill ini berfokus pada pembersihan, dan perbaikan bug ditangani oleh skill debugging terpisah.

Bisakah ia hanya melihat sebagian proyek saya?

Bisa. Anda dapat menyebutkan folder atau path, dan pekerjaannya tetap dalam cakupan itu.

Detail

Deskripsi asli dari pembuat

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.

repo: EveryInc/compound-engineering-plugin

Popularitas

Bintang GitHub
26k
Peringkat
#10046
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa