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

rt-remove-dead-code

Deletes provably unreachable code using the repo's wired-in analyzers — whole-program deadcode for Go and knip for the dashboard — plus manual cross-language reachability checks before every deletion. Use when the user asks to run the rt-remove-dead-code routine or sweep for unreachable code.

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

bex-co/bex스타 574(GitHub 574 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.3 KB
  • agents/openai.yaml204 B

SKILL.md(원문)

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

Routine: Dead-Code Removal

Delete code that provably cannot run, and only that.

Routine ground rules

  • A user request to run this routine authorizes the full cycle: plan, fix, verify, then invoke $ship (Codex) or /ship (Claude) directly in the same run. Honor explicit user limits such as audit-only or no-ship.
  • Keep a concise execution plan in the conversation and update it as findings are confirmed. Continue into implementation without a planning approval pause. Do not create or file a .pm milestone/task as a prerequisite or substitute for fixing; use the board only if the user requests it.
  • After the verification phase, follow the shipping phase below without asking the user to invoke ship separately. Preserve the ship skill's branch, conflict-resolution, and safety rules.
  • Fix everything you find directly in the working tree. If a fix can't be finished safely in this run, revert only your partial work for that fix and list it under Deferred in the report — never leave the tree half-refactored.
  • Scope: parse $ARGUMENTS per Phase 1 — an optional path/module scope or skill-specific target. No argument = the skill's stated default (usually the whole repo via parallel agents per module: lego/types, lego/operator, lego/backend, lego/cli, dashboard).
  • False-positive discipline: if a finding is intentional, load-bearing, or ambiguous, skip it with a one-line reason — don't argue it into a change.
  • Every change must pass the verification gates for the modules it touched before being reported as done: operator make test + make lint (from lego/operator/), cd lego/backend && go test ./..., cd lego/cli && go test ./..., dashboard yarn test + typecheck.
  • Run npx prettier@3.4.2 --write on any markdown touched.
  • Before shipping, summarize results in commentary using: Fixed (file:line + one-line rationale) / Deferred (item + why) / Skipped (finding + reason) / Gates (commands run + outcomes).

Phase 1 — Scope

Parse $ARGUMENTS: go | dashboard | a path. Empty = both sides.

Phase 2 — Run the analyzers

  • Go — exactly what CI runs: cd lego/operator && make deadcode && bash hack/deadcode.sh "$PWD/bin/deadcode" (the pinned deadcode, run per module with -tags=e2e -test and the shared types findings intersected; see the script header). make lint runs the same script after golangci-lint.
  • Dashboard — cd dashboard && yarn lint:unused (knip; config in dashboard/knip.jsonc).

Phase 3 — Triage every hit

Before deleting anything:

  • Public API surface, CRD types, generated code (zz_generated*, codegen outputs), and entry points → skip.
  • Helpers used only by the env-gated t.Skip tests (envtest/e2e/live guards — there are ~87 of them) are NOT dead; check the skipped tests before believing the tool.
  • Grep the symbol repo-wide, including cross-language edges the analyzers can't see: dashboard clients, scripts/, workflow YAML, docs examples.

Phase 4 — Delete

Remove confirmed-dead symbols and files together with their now-orphaned tests and imports. Re-run both analyzers; repeat until the output is clean or every remaining hit has a one-line skip reason.

Phase 5 — Verify and report

Run gates for touched modules (deadcode runs inside operator make lint); dashboard also needs a clean yarn lint:unused. Report per the standard format.

Final phase — Ship

After all required gates pass, read and execute the ship skill for the routine's completed changes. Stage only intended changes from this run; preserve unrelated work. Do not end at a plan, findings report, milestone, or request for shipping approval. If there are no changes, report that outcome without creating an empty commit. If a required gate remains blocked or fails after reasonable repairs, report the exact blocker and do not ship unverified changes.

Once the push succeeds, report the shipped HEAD SHA and subject per the ship skill and stop; do not monitor CI or deployment.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Deploy a bex App to the current Kubernetes cluster and verify it reaches Ready. Use when the user asks to deploy a render.yaml (or legacy bex.yml) or the sample app and validate the rollout end to end. Optional argument: path to render.yaml.

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

bex-co/bex5742026년 10월 26일 업데이트

Deploy a local checkout to a production Hetzner App using the manual image-import runbook. Use when the user asks to ship local working-tree code to a live bex App rather than deploy from remote Git. Arguments are the local repo path and app name.

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

bex-co/bex5742026년 10월 26일 업데이트

loopx

무료

Autonomously drain a `.pm` workstream — triage every open item (milestone or inbox-note task), then work it to done, park it in `blocked/`, or delete it as invalid, until the workstream has no open items left. Use when the user asks to "loop", drain, or clear a whole workstream's backlog (e.g. `/loopx w1`). Sequential, not interval-based; for a timed poll use /loop.

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

bex-co/bex5742026년 10월 26일 업데이트

mermaid

무료

Create concise, syntax-verified Mermaid architecture diagrams. Use when the user asks to diagram a repository component, document, system, dependency flow, or supplied description in Mermaid.

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

bex-co/bex5742026년 10월 26일 업데이트

Stand up or scale the local CAPD mock cluster and deploy the bex operator into it. Use when the user asks to create, inspect, or resize the repository's local development cluster. Optional argument: scale N.

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

bex-co/bex5742026년 10월 26일 업데이트

pm

무료

Inspect and maintain the repository's .pm workstreams, inbox notes, milestones, and tasks. Use when the user asks for PM board status or requests a supported board mutation such as creating, promoting, adding, or completing work.

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

bex-co/bex5742026년 10월 26일 업데이트

bex-co의 스킬 모두 보기

이 스킬의 문제 신고