context-discipline

Manage context window usage during large codebase exploration with token budgeting.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill context-discipline-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-discipline
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/context-discipline
Command: npx skills add https://github.com/Resgrid/Core --skill context-discipline-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps prevent context overload and declining performance by teaching you how to manage limited model tokens during long coding and codebase exploration sessions.

Core Features & Use Cases

  • MCP-first navigation: Prefer tool-based symbol lookup and API inspection over expensive file reads to minimize token consumption.
  • Lazy loading: Read only what you need, when you need it, instead of preloading large swaths of the repository.
  • Subagent isolation: Offload verbose exploration and analysis into subagents so summaries—not raw content—return to your main context.
  • Summarize and discard: Convert explored information into compact summaries to keep your working context lean.
  • Token budgeting: Plan read/analysis phases around an explicit token budget to avoid running out of context.

Quick Start

Load the context-discipline skill before starting a large codebase task, then use MCP tools to locate the relevant types and only read the specific files and methods you must change.

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 usage during large codebase exploration?

Prevent context window overload during long coding sessions by applying MCP-first navigation, lazy loading, subagent-based context isolation, summarize-and-discard behavior, and explicit token budgeting to keep sessions effective.

What's the best way to stop repeated file reads from wasting tokens?

Avoid wasting tokens on repeated file reads by using MCP-first navigation for symbol lookup and API inspection, applying lazy loading to read only necessary files and methods, and offloading verbose exploration into subagents.

How does subagent context isolation work for codebase analysis?

Subagent context isolation works by offloading verbose codebase exploration and analysis into subagents, returning only compact summaries to your main context instead of raw content to keep your working context lean.

When do I need explicit token budgeting for coding and debugging tasks?

You need explicit token budgeting during coding, debugging, and implementation planning scenarios involving large codebases where naive directory browsing and repeated file reads risk exhausting your limited context window.

Does lazy loading help with implementation planning in large repositories?

Lazy loading helps with implementation planning by reading only necessary files and methods when needed, instead of preloading large swaths of the repository, keeping your working context lean and effective for longer sessions.