jh941213/codex-lattice · Archived

compact-guide

컨?

First seen Aug 25, 2026

Installation

$ npx skills add jh941213/codex-lattice --skill compact-guide

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from jh941213/codex-lattice · top by installs.

npx skills add jh941213/codex-lattice

Browse all from jh941213/codex-lattice

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 19
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents codex

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,851 B
  • docs SUMMARY.md 179 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

컨텍스트 관리 가이드

컨텍스트는 신선한 우유와 같습니다. 시간이 지나면 상합니다.

핵심 규칙

  • 토큰 80-100k 넘기 전에 리셋
  • 3-5개 작업마다 컨텍스트 정리
  • /compact 3번 후 /clear

명령어

/compact

  • 대화 내용을 요약해서 압축
  • 중요한 정보는 유지, 토큰만 줄임
  • 작업 흐름이 끊기지 않음

/clear

  • 완전히 초기화
  • HANDOFF.md 없으면 위험!
  • 깨끗하게 시작하고 싶을 때

권장 패턴

작업 시작
    ↓
3-5개 작업 완료
    ↓
/compact (토큰 압축)
    ↓
3-5개 작업 완료
    ↓
/compact
    ↓
3-5개 작업 완료
    ↓
/compact
    ↓
/handoff (HANDOFF.md 생성)
    ↓
/clear (초기화)
    ↓
새 세션에서 HANDOFF.md 읽기

주의

200k 토큰까지 쓸 수 있지만, 80-100k 넘으면 품질 저하!

캐시 관점의 컨텍스트 관리

/compact가 유리한 이유

  • 시스템 프롬프트 + 도구 정의의 prefix 캐시가 유지됨
  • 대화 메시지만 요약되므로 매 턴 캐시 히트 가능
  • /clear보다 비용이 크게 낮음

/clear의 숨겨진 비용

  • 전체 prefix 캐시 무효화 (시스템 프롬프트 + 도구 + AGENTS.md + rules/ 재계산)
  • HANDOFF.md 로드 시 추가 토큰 발생
  • 다음 API 호출부터 캐시 워밍업 필요

Compaction 타이밍 가이드

  • 50-70k 토큰: 첫 /compact (여유 있을 때 미리)
  • 80-100k 토큰: 두 번째 /compact 또는 /handoff 준비
  • /compact 후에도 80k 이상이면: /handoff → /clear → 새 세션
  • 150k 이상에서 compact하지 않기 (buffer 부족 위험)