diffscope CLAUDE.md

A set of instructions for developing the diffscope plugin, which explains code changes after a coding agent makes them. It covers the plugin's change-summary workflow, Python explanations, design records, and safety checks for its stop hook.

In plain words
What is it for?
Use it when modifying diffscope, reviewing its design decisions, updating its scripts, or running the required hook smoke test.
Why use it?
It keeps the plugin's behavior and documentation consistent while it is being changed. It also helps prevent a broken hook from silently stopping the change briefing.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/swhee/diffscope/claude-md
Clone the repo
git clone --depth 1 https://github.com/SWHee/diffscope
Per session 1,711 This file is loaded in full into every session.
When invoked 1,711 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01711 $0.01711
Opus 5 $0.00856 $0.00856
Sonnet 5 $0.00342 $0.00342
Haiku 4.5 $0.00171 $0.00171

Measured yesterday against content hash a3677daf5f4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

diffscope CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

diffscope

이 디렉토리는 diffscope Claude Code 플러그인의 소스다. 코딩 에이전트의 변경분을 자동으로 학습 브리핑으로 바꿔주는 하네스가 여기에 담겨 있다.

하네스: 코드 변경 학습 브리핑

목표: 코딩 에이전트가 코드를 바꾼 직후, 그 턴의 변경분만 자동으로 잡아내 변경 지도 · 동작 차이 · Python 문법 해설을 터미널 브리핑 하나로 출력한다. 파일마다 diff를 열어보며 따라가는 시간을 없앤다.

트리거: Stop hook이 [diffscope] 이번 턴에 소스 파일 N개가 변경되었다 메시지와 함께 patch 경로를 넘기면 diffscope 스킬을 사용하라. 사용자가 "방금 뭐 바뀐 거야", "이번 변경 설명해줘", "다시 설명해줘"라고 할 때도 같다. Python 문법만 묻는 단독 질문은 python-syntax-tutor 스킬로 충분하다.

실행 모드: 하이브리드 — Phase 1(패치 로드)·Phase 3(브리핑 조합)은 오케스트레이터 직접, Phase 2(분석)는 규모에 따라 인라인 또는 서브 에이전트 팬아웃.

이 플러그인 자체를 개발할 때

설계 결정의 근거는 docs/DESIGN.ko.md, 외부 리뷰 대응 이력은 docs/REVIEW-LOG.ko.md에 있다. 왜 이렇게 되어 있는지 궁금하면 코드를 고치기 전에 먼저 읽는다.

scripts/를 고쳤으면 반드시 sh tests/hook-smoke.sh를 돌린다. hook이 깨지면 사용자의 작업 흐름 자체가 막히므로, 어떤 실패에도 exit 0으로 빠져나가는 설계를 유지해야 한다.

Stop hook 응답에 continue 필드를 넣지 마라. decision:block과 함께 쓰면 처리가 통째로 중단되어 브리핑이 실행되지 않는다. 증상이 "조용히 아무 일도 안 일어남"이라 발견이 늦다. 스모크 테스트가 이 계약을 검사한다.

변경 이력:

날짜 변경 내용 대상 사유
2026-08-03 초기 구성 전체 -
2026-08-03 change-map / logic-walkthrough 스킬 생성 취소 skills/ 방법론이 에이전트 정의에 이미 담겨 중복
2026-08-03 Stop hook 응답에서 continue:false 제거 scripts/digest.sh Codex 리뷰 — 브리핑이 실행되지 않는 치명 버그
2026-08-03 스모크 테스트를 hook 계약 검증으로 교체 (12→19) tests/ Codex 리뷰 — 기존 테스트가 위 버그를 통과시킴
2026-08-03 파일명 워드 스플리팅·글롭 확장 방지 scripts/digest.sh Codex 리뷰
2026-08-03 상태 키에 세션 추가, 권한 600/700, 7일 정리 scripts/ Codex 리뷰 — 동시 세션 충돌 및 소스 노출
2026-08-03 분석 에이전트에서 Bash 도구 제거 agents/ Codex 리뷰 — 자동 브리핑이 임의 코드 실행
2026-08-03 diff-digestdiffscope 전면 개명 전체 오픈소스 공개 준비
2026-08-03 on/off/status 명령, MIT LICENSE, 영/국문 README commands/, docs/ 오픈소스 공개 준비
2026-08-03 브리핑 출력 언어를 대화 언어로 (한국어 하드코딩 제거) scripts/digest.sh, agents/ 적대적 리뷰 — 영문 README와 모순
2026-08-03 대상 확장자 37개로 확대 + DIFFSCOPE_EXT 오버라이드 scripts/lib.sh 적대적 리뷰 — "any git repository"가 과장이었음
2026-08-03 ds_log 진단 기록 추가, status를 진단 도구로 scripts/ 적대적 리뷰 — 조용한 실패의 이유를 알 수 없었음
2026-08-03 off를 저장소 단위로, --global 옵션 신설 scripts/toggle.sh, commands/ 적대적 리뷰 — 전역 off만으로는 너무 거침
2026-08-03 패치를 턴마다 별도 파일로 보존 (덮어쓰기 중단) scripts/digest.sh 적대적 리뷰 — 다중 턴 재조립 근거가 사라짐
2026-08-03 스모크 테스트 19 → 25 tests/ 신규 동작 검증
2026-08-03 증감 카운트에서 빈 줄이 누락되던 버그 수정 scripts/digest.sh 실사용 테스트 — hook과 브리핑의 숫자가 달랐음
2026-08-03 파일 1개·호출처 없으면 라운드 1 생략, 규모 라벨 제거 skills/diffscope 실사용 테스트 — 라벨과 실행 경로 불일치
2026-08-03 문법 해설 "절대 넣지 않는다" 목록 명시 agents/python-tutor.md 실사용 테스트 — 기본 문법으로 개수를 채움
2026-08-03 ⚠ 에 과금·외부 상태 변경 항목 추가 skills/diffscope/references 실사용 테스트 — 유용한 경고가 규칙에 없었음
2026-08-03 DIFFSCOPE_LANG 출력 언어 고정 옵션 scripts/digest.sh Claude Code에 출력 언어 설정이 없음
2026-08-03 스모크 테스트 25 → 27 tests/ 카운트·언어 옵션 검증
2026-08-03 examples/ 제거 및 .gitignore 등록 .gitignore 테스트용 LangChain 파일이 실수로 커밋됨
2026-08-03 CONTRIBUTING 영/국문 신설 (계약 중심) CONTRIBUTING*.md 적대적 검증 — 5줄 문서로는 위험한 계약을 못 지킴
2026-08-03 SECURITY.md 신설 SECURITY.md 훅이 사용자 세션에서 실행, 패치에 소스 포함
2026-08-03 GitHub Actions CI (dash + shellcheck) .github/workflows 테스트 통과 주장을 검증할 근거가 없었음
2026-08-03 커밋 규약: type: 접두어 영문 + 제목 한국어 CONTRIBUTING 히스토리 실질 독자는 메인테이너 본인
2026-08-03 릴리즈 계열 유지보수 시 release/x.y 브랜치 규칙 CONTRIBUTING 적대적 검증 — main 단일 전략이 핫픽스에서 무너짐
2026-08-03 버전 0.1.1 .claude-plugin/ 다음 패치 릴리즈 준비

Read the full file on GitHub · 66 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 66 lines · 1,711 tokens per session scan A a3677daf5f4c

Subscribe to this mod's changes

diffscope CLAUDE.md is an instructions file published in the GitHub repository SWHee/diffscope (1 stars, last pushed 29d ago), licensed MIT. It adds 1,711 tokens to every session, about $0.0086 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.