difit
yoshiko-pg/difit
코드를 수정한 후에는 difit을 통해 사용자에게 코드 검토를 요청하세요.
...모든 것을 확장하십시오difit에 대하여
difit 스킬은 코드 변경이 이루어진 후, 로컬 디프(diff) 확인 도구인 difit을 통해 사용자에게 코드 검토를 요청합니다. 이 스킬은 에이전트 워크플로우에 사람의 검토 피드백을 반영하는 문제를 해결합니다. 에이전트는 선택한 diff 대상에 대해 difit를 실행하고, 사용자는 difit UI에 검토 코멘트를 남기며, difit가 종료될 때 해당 코멘트가 stdout에 출력되므로 에이전트는 작업을 계속하며 이를 처리할 수 있습니다. 코멘트 없이 서버가 종료된 경우, 에이전트는 검토 코멘트가 제공되지 않은 것으로 간주합니다.
이 스킬은 간단한 명령어 인터페이스를 정의합니다. 가능한 경우 difit 바이너리를 선택하고, 그렇지 않으면 npx difit로 대체합니다. 또한 샌드박스 환경에서 npx 대체 명령을 실행하는 데 네트워크 액세스가 필요한 경우, 무음으로 진행하기보다는 먼저 권한 상승 및 사용자 승인을 요청합니다. 검토 대상에는 커밋되지 않은 변경 사항, HEAD 커밋, 스테이징된 변경 사항, 스테이징되지 않은 변경 사항, 단일 커밋, 또는 두 커밋이나 브랜치 간의 비교가 포함됩니다. --comment를 통해 파일 경로 및 줄 범위에 고정된 JSON 스레드 객체 형식으로 선택적 시작 코멘트를 첨부할 수 있으며, 이는 diff에 검토 결과를 직접 표시하는 데 유용합니다. 또한 --include-untracked를 사용하여 추적되지 않은 파일을 포함할 수 있습니다. 이 기능은 Git으로 관리되는 디렉터리 내에서만 사용할 수 있습니다.
대상 사용자는 에이전트가 코드를 편집한 후 ‘인간 개입(human-in-the-loop)’ 방식의 검토 단계를 원하는 개발자입니다. 이 스킬은 보안을 중시합니다. 디프(diff)에서 비밀 정보, 토큰, 비밀번호, API 키, 개인 키 또는 기타 인증 정보와 유사한 자료를 절대 코멘트 본문이나 명령줄 인수로 복사하지 않도록 명시적으로 지시합니다. 이 스킬의 동작은 Git 디프에 대해 로컬 검토 도구를 실행하는 것으로 제한되어 있어 무해합니다.
자주 묻는 질문
검토 피드백은 에이전트에게 어떻게 전달됩니까?
사용자가 difit에 코멘트를 남기면, `difit` 명령어가 종료될 때 stdout에 출력되며, 에이전트는 이를 해결하기 위해 작업을 계속합니다. difit가 코멘트 없이 닫힌 경우, 검토 코멘트가 제공되지 않은 것으로 간주됩니다.
difit가 설치되어 있지 않으면 어떻게 되나요?
이 스킬은 `command -v difit` 명령이 성공하면 `difit`를 사용하며, 그렇지 않으면 `npx difit`로 대체됩니다. 이 `npx` 대체 방식이 권한이 없는 샌드박스 환경에서 네트워크 액세스가 필요한 경우, 실행 전에 권한 상승 및 사용자 승인을 요청합니다.
이 기능을 통해 무엇을 확인할 수 있나요?
커밋되지 않은 변경 사항, HEAD 커밋, 스테이징된 변경 사항, 스테이징되지 않은 변경 사항, 단일 커밋, 또는 두 커밋이나 브랜치 간의 비교를 확인할 수 있으며, --include-untracked 옵션을 사용하여 추적되지 않은 파일을 포함할 수도 있습니다.
사용에 제한 사항이 있나요?
예, Git diff를 기반으로 작동하므로 Git으로 관리되는 디렉터리 내에서만 사용할 수 있습니다.
diff 내의 민감한 데이터는 어떻게 처리하나요?
이 도구는 디프(diff)에 포함된 비밀 정보, 토큰, 비밀번호, API 키, 개인 키 또는 기타 자격 증명과 유사한 정보를 --comment 본문이나 명령줄 인수로 절대 복사하지 않도록 명시적으로 지시합니다.
모든 파일
2개 파일agents/openai.yaml0.2 KB보기SKILL.md2.6 KB보기Overview
This skill requests a code review from the user using difit.Before running commands, choose <difit-command> using the following rule:
- If
command -v difitsucceeds, usedifit. - Otherwise, use
npx difit. - If falling back to
npx difitwould require network access in a sandboxed environment without network permission, request escalated permissions and user approval before running it.
If the user leaves review comments, they are printed to stdout when the chosen difit command exits.When review comments are returned, continue work and address them.If the server is shut down without comments, treat it as "no review comments were provided." Restarting it is unnecessary.Manual verification of whether the page launched correctly is also unnecessary.
Commands
- Review uncommitted changes before commit:
<difit-command> . - Review the HEAD commit:
<difit-command> - Review staging area changes:
<difit-command> staged - Review unstaged changes only:
<difit-command> working
Basic Usage:
<difit-command> <target> # View single commit diff. ex: difit 6f4a9b7<difit-command> <target> [compare-with] # Compare two commits/branches. ex: difit feature main
Optional Startup Comments
If there is something you want to tell the user when difit opens, attach it as startup comments with --comment.This is useful for review findings, explanations, and any context the user should see directly on the diff.
<difit-command> <target> [compare-with] \ --comment '{"type":"thread","filePath":"src/foobar.ts","position":{"side":"old","line":102},"body":"line 1line 2"}' \ --comment '{"type":"thread","filePath":"src/example.ts","position":{"side":"new","line":{"start":36,"end":39}},"body":"Range comment for L36-L39"}'
- Use
type: "thread"for each comment. - Write comment bodies in the language the user is using.
- Use
position.side: "new"for lines that exist on the target side of the diff. - Use
position.side: "old"for lines that exist only on the deleted side. - Use range comments for issues that span multiple lines.
- Never copy secrets, tokens, passwords, API keys, private keys, or other credential-like material from the diff into
--commentbodies or any command-line arguments.
Including Untracked Files
For uncommitted changes, if files not yet added to git should also appear in the diff, add --include-untracked.
<difit-command> . --include-untracked
Constraints
Can only be used inside a Git-managed directory.
모든 파일
0개 파일difit 설치
스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.
ZIP 다운로드저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.
git clone https://github.com/yoshiko-pg/difit/blob/main/skills/difit/SKILL.md # Copy SKILL.md to your .claude/skills/ directory
복사





집
