✳ClaudeModsClaude Code mod 디렉터리
☰
● 0 명 접속 중 · 조회 0 회
+ 프로젝트 제출
← 프로젝트 목록으로
Reddit 게시물 · 사용량 및 비용 / 메모리 및 컨텍스트 / 도구 및 연동 / 워크플로 및 CI

handoff-compact: 자동 압축 시 자동으로 핸드오프 및 정리 실행

autocompact가 트리거될 때 자동으로 핸드오프 문서를 생성하고 컨텍스트를 교체하는 Claude Code mod로, handoff + /clear 프로세스를 자동화하는 것과 동일합니다.

sspeciallight@speciallight
번역 완료

이 mod 소개

작성자는 많은 장시간 무인 Claude Code 세션을 실행하며, 컨텍스트가 20만을 초과한 후의 턴에 절반의 token이 소비되는 것을 발견했습니다. 이는 비용이 많이 들 뿐만 아니라 컨텍스트 부패로 인해 품질을 저하시킵니다. 수동 방법은 핸드오프를 요청하고, /clear하고, 다시 피드백하는 것이지만, 200k autocompact를 활성화하면 핸드오프 내용을 제어할 수 없습니다. handoff-compact는 autocompact가 트리거될 때 개입하여 세션 브랜치(전체 컨텍스트)가 핸드오프 문서를 작성합니다. 여기에는 목표, 상태 및 증거, 다음 단계, 결정 및 이유, 제외된 옵션, 미해결 질문, 파일 및 커밋, 검증 명령, 최근 10개 prompt 원문이 포함되며, 그 문서로 대화 내용을 교체합니다. 이를 통해 동일 세션 내, 턴 중간, 무인으로 handoff + /clear를 실현합니다. 이 프로젝트는 vibe-coded이며, MIT 라이선스이고, Claude Code 2.1.287+ 및 mods 활성화가 필요합니다. "/compact classic"은 임시로 내장 요약을 사용할 수 있습니다.

설치

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

/plugin marketplace add trytofly94/handoff-compact
/plugin install handoff-compact@handoff-compact
원문 / README

I run a lot of long unattended Claude Code sessions. When I measured them, half of my tokens came from turns where the context was already past 200k. That's expensive, since every step resends the whole context, and quality degrades because of context rot. By hand the fix is the usual routine: ask for a handoff, /clear, feed it back. Enabling autocompact at 200k keeps the context short but leaves little control over what is handed over. I already tried to have Claude Code write handoff documents pre autocompact window with hooks, but with modding the solution gets a LOT better. Handoff-compact answers the autocompact trigger instead of the built-in summarizer. A fork of the session (whole context) writes a handoff-document (goal, state and what proves it, next step, decisions and why, ruled-out approaches, open questions, files and commits, the verify command, the last 10 prompts verbatim), and the conversation is replaced by it. Handoff + /clear, but in the same session, mid-turn, with nobody at the keyboard. Obviously vibe-coded. Take the idea or the mod itself and customize it with your own setup. Modding is awesome. Install: /plugin marketplace add trytofly94/handoff-compact /plugin install handoff-compact@handoff-compact Repo: https://github.com/trytofly94/handoff-compact (MIT). Needs Claude Code 2.1.287+ with mods enabled. "/compact classic" gives you the built-in summary once. submitted by /u/speciallight [link] [comments]

원본 출처 보기 ↗

비슷한 프로젝트