context-discipline

Manage token budgets and context retention in Claude Code sessions.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/shahdanish/vibepos --skill context-discipline-shahdanish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-discipline
Source: https://github.com/shahdanish/vibepos/tree/main/skills/context-discipline
Command: npx skills add https://github.com/shahdanish/vibepos --skill context-discipline-shahdanish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents Claude Code sessions from slowing down and forgetting earlier context by teaching how to control token usage through MCP-first exploration, on-demand loading, isolation via subagents, and aggressive summarization.

Core Features & Use Cases

  • MCP-first navigation: Use symbol lookup, public API inspection, and reference tracing to understand code cheaply before reading files.
  • Lazy loading: Read only what you will modify or must verify, and avoid directory-wide or “just in case” exploration.
  • Subagent context isolation: Offload verbose exploration and analysis to subagents so the main context stays clean.
  • Summarize and discard: Convert explored details into compact summaries and keep those summaries instead of raw file contents.
  • Token budget planning: Estimate costs per phase (understand, plan, implement, verify) to avoid running out of the 200k window mid-task.

Quick Start

Load the context-discipline Skill when your session starts feeling sluggish or you notice you are re-reading files because earlier details no longer seem to persist.

Frequently Asked Questions about context-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage token budget and prevent context loss during long Claude Code sessions?

Manage token budget by adopting MCP-first navigation, lazy loading files, offloading verbose research to subagents, and aggressively summarizing explored details to maintain effective operational context.

Why does Claude Code slow down and forget earlier context when exploring large codebases?

Claude Code slows down when the 200k token window fills with raw file contents from directory-wide exploration. Prevent this degradation by using MCP symbol lookup and on-demand loading instead of reading entire files.

What is the best way to reduce expensive file reads when navigating a large codebase?

The best way to reduce expensive file reads is using MCP-first navigation for symbol lookup, public API inspection, and reference tracing to understand code cheaply before reading only what you must modify or verify.

How do I keep main context clean when doing verbose codebase exploration and analysis?

Keep main context clean by offloading verbose codebase exploration and analysis to subagents for context isolation, then converting explored details into compact summaries and discarding the raw file contents.

Can I estimate token budget costs per phase for planning and iterative implementation?

Yes, you can estimate token budget costs per phase by planning costs across understand, plan, implement, and verify stages to avoid running out of the 200k window mid-task during iterative implementation.

When should I apply summarize-and-discard practices for context retention?

Apply summarize-and-discard practices when your session feels sluggish or you notice you are re-reading files because earlier details no longer persist, converting explored details into compact summaries to keep instead of raw file contents.