# Kb Compact

> Use when context-pack.md is stale, oversized, or missing recent AgentKB work.

- Skill: `cyz26/kb-compact` (Agent Skill)
- Install (CLI): `npx skillmds@latest add cyz26/kb-compact`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cyz26/kb-compact/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: cYz26 (https://skillmd.com/u/cyz26)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/cyz26/kb-compact

---


# KB Compact

Use when `context-pack.md` is too long, stale, misses recent work, or repeatedly forces an agent to read extra notes.

AgentKB keeps Markdown as the canonical storage format. Load the smallest sufficient context first, and make every write reviewable with Git diff.

## Inputs

Read only:

1. Existing `context-pack.md`
2. `overview.md`
3. `current-state.md`
4. `decisions.md`
5. `open-questions.md`
6. Recent project logs
7. `_system/indexes/knowledge-index.md` if navigation has changed

Do not read `personal/` or `archive/` unless the user explicitly authorizes it.

## Procedure

1. Remove duplicate history and stale details.
2. Preserve current goal, state, constraints, key decisions, validation commands, and open questions.
3. Keep raw history in logs, not the context pack.
4. Write a concise replacement or a proposed change if uncertain.
5. Review the Git diff.

## Output

A short, current `context-pack.md` that is sufficient for task startup.

