context-fundamentals

Structure system prompts, tool definitions, documents, and message history for agent context.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/salmanparacha/speckitplus-calculator --skill context-fundamentals-salmanparacha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-fundamentals
Source: https://github.com/salmanparacha/speckitplus-calculator/tree/main/.claude/skills-nocontext/context-fundamentals
Command: npx skills add https://github.com/salmanparacha/speckitplus-calculator --skill context-fundamentals-salmanparacha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Context engineering frameworks address the challenges of structuring and managing the complete state available to a language model, enabling predictable and efficient agent behavior.

Core Features & Use Cases

  • Context decomposition: distinguish system prompts, tool definitions, retrieved documents, and message history to optimize loading and execution.
  • Progressive disclosure: load lightweight summaries first and fetch details on demand to conserve tokens.
  • Validation & budgeting: provide structure and checks to maintain a lean context under token limits and guard against context leakage.
  • Use Case: design robust agent architectures, debug context-related failures, and optimize context usage in long-running tasks.

Quick Start

Issue a high-signal prompt describing the task, then progressively load required context components as the task activates.

Frequently Asked Questions about context-fundamentals

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

FAQPage Schema
How do I manage context for reliable agent behavior in multi-step tasks?

Context management for reliable agent behavior involves structuring system prompts, tool definitions, and message history. Apply progressive disclosure and token budgeting to maintain a lean context, preventing failures during long-running tasks.

What is progressive disclosure in context engineering?

Progressive disclosure in context engineering is loading lightweight summaries first and fetching detailed documents on demand. This technique conserves token budgets and maintains lean context for language models during agent execution.

How do I debug context-related failures in agent systems?

Debugging context-related failures in agent systems requires decomposing the context into system prompts, tools, and retrieved documents. Use validation checks to identify context leakage and ensure the token budget is maintained across multi-step tasks.

How do I structure system prompts and tool definitions for agent architectures?

Structuring system prompts and tool definitions for agent architectures requires distinguishing between core context components. Decompose these elements to optimize loading execution and apply validation to guard against context leakage.

What is the best way to optimize token budget usage for retrieved documents?

Optimizing token budget usage for retrieved documents involves applying progressive disclosure. Load lightweight summaries initially, fetch full details only when task demands activate, and use validation checks to enforce token limits.

When should I use context decomposition for agent systems?

Use context decomposition for agent systems when designing robust architectures or optimizing long-running tasks. It distinguishes system prompts, tool definitions, and message history to prevent context leakage and maintain reliable reasoning.