Context Discipline Skill — Development skill for Claude Code
Claude Code skill that keeps the main agent's context small and project state on disk across compactions and sessions: project-brain hook, subagent hand-back contract, agent brief templates, context a.
How to install Context Discipline Skill
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open adityakumar68/context-discipline-skill and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Context Discipline Skill does
Claude Code skill that keeps the main agent's context small and project state on disk across compactions and sessions: project-brain hook, subagent hand-back contract, agent brief templates, context audit.
Alternatives in Development
- Agent.System.Main.Communication — Communication 19k ★
- Discipline — Toggle discipline mode — auto-invoke verification, brainstorming-before-coding, and review checks 2.8k ★
- 01 Main System Prompt — Main System Prompt 2.3k ★
README
context-discipline
A [Claude Code](https://docs.anthropic.com/en/docs/claude-code) skill for long work: projects that run over many sessions, research surveys, design → spec → plan, and anything that dispatches subagents. It keeps the main agent's context small, and it keeps the project's state on disk where a compaction or a new session cannot lose it.
The problem
Everything the main agent reads, prints, writes or receives stays in its context and is paid for again on every later turn. When the context fills up, Claude Code compacts it into a summary, and detail is lost: the decision made an hour ago, the file that holds the plan, what was running.
One measured long session (about 1.39M tokens through the main thread, 5 compactions) broke down like this:
| What filled the context | Share |
|---|---|
| Bash output | 19% |
| Subagent hand-backs | 15% |
| Bash input (long heredocs; one login boilerplate retyped about 800 times) | 14% |
| Write input (specs and plans the main agent wrote itself) | 13% |
| Read output (whole files, images) | 11% |
| Agent prompts | 7% |
| Skill texts re-injected after compaction | 6% |
Most of it was work a subagent could have done, or reading and printing more than was needed.
What you get
- The skill (
context-discipline/SKILL.md): where each kind of information lives, the delegation contract, design → spec → plan with subagents, cheap reviews, main-agent hygiene, and what to do after a compaction. - A SessionStart hook (
scripts/brain-hook.sh): on startup, resume,/clearand compaction it prints the project's STATUS file, so Claude Code puts the current state back into context automatically. - A project brain (
scripts/init-brain.sh): sets upSTATUS.md(current state),00-Project-Overview.md(big picture and dated decision log) and the.claude/brainpointer the hook follows. - Agent brief templates (
references/agent-briefs.md): copy-ready briefs for research, context gathering, spe
Related Skills
Claude Codex Bridge
Dual-agent orchestration: Claude (main brain) + OpenAI Codex (worker hand) glued by Notion + inbox notificatio
Claude Memory Loop
Claude forgets everything between sessions. This skill installs the fix: a memory loop for Claude Code — one s
Auto Continue
You are the auto-continue gate for Omux's Main Agent. The Main Agent has just finished a turn and is about to
PM Claude Brief
CLAUDE.md templates and brief-writing discipline for product managers. Hypothesis-first, evidence-required, sh
Agent Ready By Sero
Makes your codebase agent-friendly and keeps it that way. Small files so agents don't waste tokens. CLAUDE.md
Claude Referee
Evidence over eloquence. Unofficial Claude Code plugin that checks "done" claims and small judgement calls wit
Related Agents
Brain Librarian
Sole writer of a repo's brain/ vault. Files decisions, findings and accomplishments, dedupes, links, supersede
Task Runner
Owns the whole agent loop for ONE task. Main spawns it with a task and gets a single schema back; the runner r
Iddy
Iddy, Mellonhead's instructional-designer agent. Builds structured-workshop deliverables (facilitation guide,