본문으로 건너뛰기
cccskills
무료GitHub에 공개한국어 소개

duplicate-and-dead-code

같은 역할을 수행하는 기존 코드와 사용되지 않을 가능성이 있는 선언 및 이미지 자산을 찾습니다. 변경 계획 전에 기존 담당 코드를 확인하고, 리뷰에서 중복 후보를 살펴 삭제 판단을 돕습니다.

원문원문 설명 보기

Find semantic copies and dead code before a plan or a review.

JetBrains/intellij-community스타 20,684(GitHub 20,684 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • 구현 전에 기존 담당 코드 확인
  • 변경 파일의 의미상 중복 후보 검토
  • 사용되지 않을 수 있는 코드나 이미지 확인

한국어 소개

할 수 있는 일

변경을 계획하기 전에 추가하려는 작업을 이미 수행하는 코드가 있는지 찾습니다. 동작과 작업 내용을 바탕으로 기존 담당 코드를 검색하고, 호출 관계와 참조를 따라가며 담당 위치를 확인합니다. 리뷰에서는 복사 검사 도구를 실행해 구문이나 의미가 비슷한 함수를 찾고, 변경한 파일과 관련된 후보를 추립니다. 사용되지 않을 가능성이 있는 선언과 이미지 목록도 만들며, 삭제 전에 확인할 절차를 안내합니다.

이럴 때 유용합니다

같은 역할을 다른 위치에 다시 구현하지 않도록 확인하거나, 변경 사항을 리뷰하며 중복 후보를 찾거나, 사용되지 않을 가능성이 있는 코드와 이미지를 조사할 때 유용합니다. 결과는 확정이 아니라 후보이므로, 결정하기 전에 관련 코드를 읽어야 합니다.

사용 예시

  • “추가하려는 동작을 이미 처리하는 코드가 있는지 확인해 주세요.”
  • “변경한 디렉터리에서 의미상 중복 후보를 확인해 주세요.”
  • “이 범위에서 사용되지 않을 가능성이 있는 코드를 찾아 주세요.”

주의 사항

accio와 jscpd를 사용합니다. accio가 PATH에 없으면 ./community/tools/accio.cmd를 사용하고, jscpd는 지정된 래퍼를 통해 실행합니다. 최초 의미 분석에는 548 MB 모델이 필요합니다.

이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.

문서 점검

AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.

안전성전송·삭제·명령 실행 등을 명시하고 있는가
A양호후보를 읽고 삭제 전에 범위를 지정하지 않은 검색으로 확인하도록 명시합니다.
도입의 용이성필요한 도구나 API 키가 적고 적혀 있는가
B일부 부족`accio`, `jscpd`, 래퍼와 548 MB 모델을 명시하지만 설치 절차는 없습니다.

점수에는 넣지 않았습니다. 2026년 10월 29일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.

평가가 다르다고 생각되면 재검토를 요청하기

어느 항목이 왜 다르다고 생각하는지 적어 주세요. 로그인은 필요 없습니다. SKILL.md와 대조해 평가를 다시 만들고 이곳에 반영합니다.

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

포함된 파일(1)

  • SKILL.md6.0 KB

SKILL.md(원문)

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

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/duplicate-and-dead-code/SKILL.md -->

Duplicate and dead code

The exact copy-paste gate finds a copied text only. This skill finds one responsibility in two pieces of different code, and dead code. Each tool gives candidates, not a proof. Read each candidate before you act on it.

The tools

ToolWhat it findsUse
jscpd exact, --exit-code 1a copied text (Type-1)the gate of an area
jscpd --ignore-identifiers --kind renameda copy with renamed names (Type-2)burn-down
jscpd --similarity 0.9 --kind asttwo functions with one syntax tree (Type-3)the copy lint
jscpd --semantic --kind semantictwo functions that do one thing (Type-4)the copy lint
jscpd --compare <a>/ <b>/the functions of <a> with no counterpart in <b>a port or two implementations
accio locate '<question>' --mode semantic, accio context '<task>'the code of a behaviour or a taskthe owner check
accio trace <Name> --direction callers, accio references <Name>the callers and every use of a namethe owner check, dead code
accio unused --scope <dir>/declarations, bundle keys and image variants used nowheredead code

Without accio on the PATH, run ./community/tools/accio.cmd. Run jscpd only through ./community/tools/jscpd.cmd -c <config>. <config> is the .jscpd.json of the area, for example plugins/air/.jscpd.json. An area without a .jscpd.json runs the commands without -c and has no exact gate. Write each JSON report to a temporary directory of your session. The jscpd_test target of the area runs the gate too, for example //plugins/air:air-duplicate-code_test.

Before a plan: the owner check

Do this for each responsibility that the plan adds: a mapping, a policy, a parser, a cache, a lifecycle step.

  1. accio locate '<a full question about the behaviour>' --mode semantic --scope <area>/. On a miss, ask again in other words.
  2. accio context '<the task in words>' --scope <area>/. Name the task by the nouns of the domain, not by a role word such as "mapper".
  3. accio references <ResultType> --scope <area>/ --no-tests --files. A private function that builds the type is an owner too.
  4. For a V1 or V2 change, find the other version: accio files '<Prefix>V1*', accio files '<Prefix>V2*'.
  5. accio trace <Name> --direction callers for each candidate, then read it. A call site marked ? (:57?) fits more than one overload: read it.

The plan then has an Existing owners line. It names each owner and the decision: extend it, move it, or write new code with the reason why the owner does not fit. When the check finds nothing, the line names the queries.

Before a review: the copy lint

The copy lint is a report, not a gate. Run it after the exact gate of the area passes, when the area has one. Give the touched directories and the directories of their owners: the scan compares only the files under the paths it gets.

./community/tools/jscpd.cmd -c <config> --similarity 0.9 --kind ast --absolute \
  --reporters json --output <temp-dir>/ast <touched-dir>...
./community/tools/jscpd.cmd -c <config> --semantic --semantic-scope same --kind semantic \
  --semantic-same-threshold 0.9 --ignore '**/testSrc/**,**/test/**,**/tests/**,**/testFramework/**' \
  --absolute --reporters json --output <temp-dir>/semantic <touched-dir>...

Then keep the pairs that touch a file of the change. Run this from the repository root:

{ git diff --name-only <base>; git ls-files --others --exclude-standard; } | sed "s|^|$PWD/|" \
  | jq -R . | jq -s . > <temp-dir>/changed.json
jq -r --slurpfile c <temp-dir>/changed.json '.duplicates[]
  | select(.firstFile.name as $a | .secondFile.name as $b | $c[0] | index($a) or index($b))
  | "\(.similarity) \(.firstFile.name):\(.firstFile.start)-\(.firstFile.end) ~ \(.secondFile.name):\(.secondFile.start)-\(.secondFile.end)"' \
  <temp-dir>/ast/jscpd-report.json <temp-dir>/semantic/jscpd-report.json

Filter the report by file, not by kind. An --kind ast pair has "kind": "similar".

  • Do not use --changed or --baseline-from-ref. Each makes a git worktree of the base revision with 1.4 million files.
  • The first --semantic run on a machine needs --semantic-download (a model of 548 MB). The first run on a directory takes minutes. A later run takes below 1 s.
  • Read each pair at 0.90 or more. Below 0.80, most pairs are two functions of one shape.
  • A pair in one file whose two parts are one line apart is a table, not a copy.
  • A pair that the change did not touch is a lead. Report it and do not fix it.
  • A pair that you keep needs a reason in the review: two sides that no shared module can hold, or a wire DTO and its model.

Dead code

accio unused --scope <dir>/ --limit 1000 gives the candidates. Each candidate is a lead. The note of the answer explains each mark, and accio unused --help says what the scan leaves out and cannot see.

  • A (generated) icon field: delete its SVG and generate the icon class again with the icon-resources skill. First search the SVG file name over the whole repository. A SKILL.md can name it as an icon, and then the fix is an icon-robots.txt skip.
  • A (published) candidate is a published API. Keep it unless its owner decides otherwise.
  • An area can keep a guide of the candidates that stay, for example plugins/air/docs/guides/dead-code-guide.md. Read it before the triage, and add each candidate that you keep.

To delete a candidate, prove it with accio locate '<name>' without --scope. Then delete it, the tests that test only it, the imports that only it needed, and the KDoc links to it. Delete a dead key from the English bundle only. The translations under localization/ belong to the localization team. Run the tests of the area, and run accio unused again.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

actions

무료요약 있음

IntelliJ `AnAction` 클래스를 구현하거나 수정하고 `plugin.xml`에 등록하도록 안내합니다. 표시 이름과 설명은 메시지 번들에 두고, 필요하면 아이콘을 설정하며, 이벤트 코루틴 범위에서 중단 함수를 실행해 동기식 처리로 IDE가 멈추는 일을 방지합니다.

  • IDE 메뉴에 새 동작 추가
  • 동작 등록이나 아이콘 변경
  • 동작 이름과 설명 정리
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

bazel-test-migration

무료요약 있음

IntelliJ JPS 테스트 모듈을 Bazel로 옮기고 Bazel에서만 발생하는 실패를 조사하는 안내서입니다. 의존성, 플러그인, 테스트 데이터와 runfiles 문제를 확인하고 생성된 대상과 이전된 테스트를 검증합니다.

  • 기존 JPS 테스트 모듈을 Bazel로 이전할 때
  • Bazel에서만 실패하는 테스트를 조사할 때
  • 테스트 의존성과 데이터 설정을 확인할 때
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

code-style

무료요약 있음

IntelliJ 프로젝트 규칙에 맞춰 Kotlin과 Java 코드를 작성하거나 검토합니다. 언어 선택, 서식, 봉인 타입, 스레드 주석, 제어 흐름 예외 처리를 확인합니다.

  • IntelliJ 규칙에 맞는 Kotlin 작성
  • Java 코드 검토
  • 예외 처리와 봉인 타입 분기 확인
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

commits

무료요약 있음

이 가이드는 IntelliJ 프로젝트의 변경 사항을 목적별로 나누고 프로젝트 형식에 맞는 커밋 메시지를 작성하도록 돕습니다. 티켓이 있으면 번호와 변경 설명을, 없으면 레이블과 하위 시스템명을 사용하며 필요에 따라 이유와 판단을 본문에 담습니다.

  • 티켓이 있는 변경의 프로젝트 형식 메시지 작성
  • 테스트나 문서 커밋에 적절한 레이블 적용
  • 기존 커밋 메시지를 규칙에 맞게 수정
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

compare-python-typecheckers

무료요약 있음

여러 Python 타입 검사기로 코드 조각이나 파일의 타입 추론과 오류 판정을 비교합니다. 도구별 결과, 실행 시간, 진단 내용을 Markdown 보고서로 모아 저장할 수 있습니다.

  • 검사기별 타입 추론 비교
  • 코드가 타입 오류로 판정되는지 확인
  • 여러 도구의 진단 결과 비교
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

compose-ui-architecture

무료요약 있음

Compose Desktop 화면을 구성할 때 컴포저블은 렌더링을 맡고 프레젠터나 코디네이터는 앱 결정을 맡도록 구조를 정리합니다. 상태 소유권, Effect, 재사용 컴포넌트 API, 지연 목록 키, 애니메이션과 성능을 개별 UI 변경에 맞춰 살펴봅니다.

  • 화면 렌더링과 프레젠터 판단 분리
  • UI 상태를 둘 위치 정리
  • Effect 키와 코루틴 사용 검토
JetBrains/intellij-community2.1만2026년 10월 29일 업데이트

JetBrains의 스킬 모두 보기

이 스킬의 문제 신고