context-discipline

Manage token budgets in Claude Code sessions using MCP-first navigation and subagent offloading.

640|145|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill context-discipline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-discipline
Source: https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/context-discipline
Command: npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill context-discipline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long interactive Claude Code sessions and large codebases quickly consume the token window, causing sluggish responses, forgotten context, and costly file reads; this Skill teaches patterns to treat the token window as a budget and preserve meaningful context for ongoing work.

Core Features & Use Cases

  • MCP-first navigation: Prefer Roslyn/MCP queries for structure and references instead of full file reads to save tokens.
  • Lazy loading & prioritized reads: Read only files you will modify and prefer API surface queries for reference.
  • Subagent offloading and summarization: Delegate verbose exploration to subagents and keep only concise summaries in the main context.
  • Use Case: When refactoring a service in a 50-project .NET solution, use get_project_graph and find_symbol first, spawn a subagent to explore related modules, and read only the files you will change.

Quick Start

Ask Claude to switch to MCP-first navigation, estimate a token budget for the task, offload broad exploration to a subagent, and return a two-line summary of findings.

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 budgets in Claude Code for large .NET codebases?

Manage token budgets in Claude Code by using MCP-first navigation, lazy loading, subagent offloading, and targeted file reads to restrict token usage while preserving necessary detail. Prefer Roslyn MCP queries for structure instead of full file reads.

Why does Claude lose context during long interactive sessions and how do I prevent it?

Claude loses context during long interactive sessions because verbose diagnostics and multi-step exploration exhaust the token window. Prevent this by delegating broad exploration to subagents and keeping only concise summaries in the main context.

What is the best way to reduce token consumption when navigating large codebases?

The best way to reduce token consumption is MCP-first navigation. Use get_project_graph and find_symbol queries to explore structure and references, read only files you will modify, and spawn subagents to summarize related modules.

Does subagent offloading help save tokens during codebase exploration?

Subagent offloading helps save tokens by delegating verbose exploration tasks to subagents. The subagents perform the heavy file reads and return concise two-line summaries, restricting token usage in the main interactive session.

Can I use MCP-first navigation for refactoring a 50-project .NET solution?

MCP-first navigation is effective for refactoring large .NET solutions. Use Roslyn MCP queries to map project graphs and find symbols first, spawn subagents to explore modules, and limit targeted reads to only the files you will change.

When should I not use full file reads in Claude Code sessions?

Avoid full file reads when exploring reference material or navigating large codebases. Instead, use lazy loading and prioritized reads for files you will modify, preferring API surface queries to preserve the token window and maintain responsiveness.