← ClaudeAtlas

codex-context-guardlisted

Prevent Codex context-window exhaustion during long-running refactors, repo audits, migrations, debugging sessions, or tasks with large logs, many file reads, or repeated tool output. Use when Codex context is getting high, /compact may be needed, or the user asks for context-efficient workflows.
stark-ai-de/agent-skills · ★ 5 · AI & Automation · score 77
Install: claude install-skill stark-ai-de/agent-skills
# Codex Context Guard ## Goal Keep a long Codex session useful by reducing unnecessary context growth, preserving decisions in a compact handoff, and choosing bounded next steps before the thread becomes hard to continue. ## Trigger conditions - The task has many files, logs, diffs, generated outputs, or repeated tool calls. - The user asks whether to compact, summarize, or continue in a new thread. - The agent is about to inspect broad files without a specific need. ## When to use - Use when context budget, log volume, or file-reading scope is becoming a risk. - Use before compacting a long session or moving work to another thread. ## When not to use - Do not use for short, self-contained tasks that have no context pressure. - Do not use as a substitute for actually validating completed work. ## Inputs to inspect - Current objective, recent user instructions, changed files, validation output, and unresolved blockers. - Use `git status --short` and `git diff --stat` before reading large diffs. ## Rules - Prefer targeted `rg`, `sed`, `git diff --stat`, and small file ranges over whole-file dumps. - Keep one bounded objective active at a time. - Store durable state in a handoff artifact when the work will outlive the current context. - Summarize large outputs instead of pasting them back to the user. - Tell the user when a compaction or handoff would preserve momentum. ## Workflow 1. Identify the current objective, latest decision, and next blocking question. 2. R