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.
npx agentmods add skills/jh941213/codex-lattice/compact-guidenpx skills add jh941213/codex-lattice --skill compact-guidegit clone --depth 1 https://github.com/jh941213/codex-latticeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jh941213/codex-lattice/compact-guide)<a href="https://agentmods.dev/skills/jh941213/codex-lattice/compact-guide"><img src="https://agentmods.dev/badge/skills/jh941213/codex-lattice/compact-guide.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00049 | $0.00541 |
| Opus 5 | $0.00024 | $0.00270 |
| Sonnet 5 | $0.00010 | $0.00108 |
| Haiku 4.5 | $0.00005 | $0.00054 |
Grade A, and why
compact-guide 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 5d ago.
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.
What it actually says
컨텍스트 관리 가이드
컨텍스트는 신선한 우유와 같습니다. 시간이 지나면 상합니다.
핵심 규칙
- 토큰 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 부족 위험)
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.
- 5d ago First seen · 71 lines · 49 tokens per session scan A b8da02aa9945
compact-guide is a skill published in the GitHub repository jh941213/codex-lattice (19 stars, last pushed 3mo ago), licensed MIT. It adds 49 tokens to every session and 541 once invoked, about $0.0002 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-30.
Other skills, from other repositories
media-ingest
Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.
mem0-oss-to-platform
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…
Cortex
Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…
agent-memory
../../../engineering/agent-memory/skills/agent-memory/SKILL.md.
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…