context-discipline

Manage Claude Code token budgets with MCP-first navigation and lazy loading.

1|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill context-discipline-trossitec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-discipline
Source: https://github.com/Trossitec/dotnet-claude-kit/tree/main/skills/context-discipline
Command: npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill context-discipline-trossitec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents Claude Code from becoming ineffective during long or large-codebase sessions by teaching you to manage token usage like a real budget instead of dumping too many files into context.

Core Features & Use Cases

  • MCP-first navigation: Locates symbols, APIs, and references with minimal token spend before resorting to full file reads.
  • Lazy loading and selective reading: Reads only what you will modify or what you must satisfy (interfaces/contracts), and avoids “just in case” exploration.
  • Subagent context isolation: Offloads verbose exploration and analysis to subagents, then keeps only summarized results in the main context.
  • Context pruning and recovery: Provides warning signs and a recovery plan when the session starts to get sluggish or forgetting occurs.
  • Large codebase strategy: Uses project graph discovery and scoped reads to find relevant areas without browsing entire directories.

Quick Start

Load the context-discipline skill when Claude Code starts forgetting earlier details, slows down, or you’re about to explore a large repository so it follows MCP-first navigation and summarizes while keeping your token budget under control.

Frequently Asked Questions about context-discipline

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

FAQPage Schema
How do I manage Claude Code context window limits when exploring a large codebase?

When Claude Code becomes ineffective during long or large-codebase sessions, it is caused by token overconsumption from dumping too many files. Context pruning and periodic summarization enforce a planned token budget to prevent forgetting and sluggishness.

What is the best way to prevent token overconsumption during long coding sessions?

Context pruning and recovery involve recognizing warning signs like sluggish responses or forgetting earlier details. You recover by summarizing current progress, clearing unnecessary file reads, and enforcing lazy loading to restore a planned token budget for remaining tasks.

How do subagents help with codebase navigation and context isolation?

When Claude Code starts forgetting earlier details or slowing down, load the context-discipline skill. It applies MCP-first navigation, scoped reads, and periodic summarization to control token usage and recover from context window exhaustion.

Does MCP navigation reduce token spend compared to reading full files?

Yes, context discipline applies to codebase understanding, planning, and iterative implementation. It uses project graph discovery and scoped reads to find relevant areas without browsing entire directories, keeping large repository exploration within token limits.