ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 Tatendaz

fold-edits

Edit, Write, NotebookEdit diff를 표시/숨김 버튼이 있는 한 줄로 접고 테마별 색상과 10,000자 초과 diff 분할을 제공하는 Claude Code 패치입니다.

번역 완료

이 mod 소개

fold-edits는 모든 Edit 및 Write 호출 아래에 출력되는 전체 diff를 한 줄 요약과 diff를 여는 show diff 버튼으로 바꾸고, 긴 diff의 위와 아래에 hide 버튼을 표시합니다. Edit, Write, NotebookEdit 결과에 적용되며(실패한 편집은 그대로 둠), scratchpad 편집 같은 편집 전용 그룹에도 적용됩니다. 읽기나 shell 명령이 섞인 그룹은 그대로 둡니다. 10,000자를 넘는 diff는 정확한 줄 번호와 함께 여러 블록으로 나뉩니다. 버튼 텍스트 색상은 테마에서 선택합니다(어두운 테마는 짙은 녹색 #116329, 밝은 테마는 연한 녹색 #aceebb). 기본값은 짙은 녹색입니다. 저장소에는 README 테마 이미지를 생성하는 Python 스크립트와 테스트 명령 `claude plugin test ~/.claude/mods/fold-edits가 포함됩니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add Tatendaz/T-mods
claude plugin install fold-edits
원문 / README

fold-edits

Claude Code prints the full diff under every Edit and Write call. A long session fills the screen with code you did not ask to read.

This mod replaces each diff with one line and a button that opens it:

<picture> <source media="(prefers-color-scheme: dark)" srcset="docs/fold-edits-dark.svg"> <img alt="fold-edits: an edit folded to one line with a green show diff button, then opened with hide buttons above and below the diff" src="docs/fold-edits-light.svg"> </picture>

Click show diff to open the diff. Click hide to fold it again. When the diff is open, a hide button sits at both the top and the bottom, so you do not have to scroll back up on a long diff.

What it changes

  • Edit, Write and NotebookEdit results. A failed edit is left as Claude Code draws it.
  • Groups that hold only edits, such as Claude Code's "Made 1 scratchpad edit" line. A group that mixes edits with reads or shell commands is left alone.

A diff longer than 10,000 characters, the limit for one code block, is split into several blocks. Line numbers stay correct across the split.

Button color

A plugin cannot set a button's text color, so the mod picks the green behind the text from your theme:

  • Dark themes get #116329, with light text on top.
  • Light themes get #aceebb, with dark text on top.

If the mod cannot read the theme setting, it uses the dark green.

Images

docs/make_svgs.py draws the two README images, one per theme. GitHub shows the one that matches the reader's theme. Run it again after a change to how the mod looks.

Tests

claude plugin test ~/.claude/mods/fold-edits

The tests cover the summary line, opening and closing the diff, both button colors, diff splitting, edit-only groups, and leaving other tools alone.

비슷한 프로젝트