context-fundamentals

Explains context components, attention mechanics, and progressive disclosure for LLM agent design.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TECH-HY/SKILLS --skill context-fundamentals-tech-hy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-fundamentals
Source: https://github.com/TECH-HY/SKILLS/tree/main/skills/context-fundamentals
Command: npx skills add https://github.com/TECH-HY/SKILLS --skill context-fundamentals-tech-hy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Designing and debugging LLM agent systems requires understanding how context windows, attention budgets, and token costs affect model behavior, yet these fundamentals are often scattered or misunderstood. This Skill provides a structured foundation covering context anatomy, attention mechanics, and context budgeting so engineers can make informed architecture decisions. ## Core Features & Use Cases - Context Anatomy Reference: Breaks down system prompts, tool definitions, retrieved documents, message history, and tool outputs with guidance on each component's role and cost. - Attention & Budgeting Guidance: Explains the n-squared attention constraint, position encoding degradation, and why smaller high-signal context outperforms large low-signal context. - Progressive Disclosure Patterns: Shows how to defer loading of skills, documents, and tool results until needed, including filesystem-based and hybrid pre-loading strategies. - Use Case: When an agent's responses degrade on long tasks, use this Skill to diagnose whether tool outputs are dominating the context window and apply compaction triggers at 70-80% utilization. ## Quick Start Ask the agent to explain how context windows and attention budgets affect your agent design and recommend a context budgeting strategy.

Frequently Asked Questions about context-fundamentals

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

FAQPage Schema
What is context engineering for LLM agents?

Context engineering is the discipline of curating the smallest high-signal token set that produces desired model outputs. It covers system prompts, tool definitions, retrieved documents, message history, and tool outputs, treating context as a finite resource with diminishing returns.

How does progressive disclosure reduce context usage?

Progressive disclosure loads information only when needed rather than upfront. Agents load lightweight identifiers like file paths or skill descriptions first, then fetch full content on demand, keeping the active context small while retaining access to large knowledge bases.

Why do LLMs degrade on long context windows?

Attention mechanisms create n-squared token relationships, stretching the model's attention budget as context grows. Models are trained predominantly on shorter sequences, so position encoding interpolation for longer contexts reduces precision in retrieval and long-range reasoning.

When should I compact or truncate agent message history?

Implement compaction triggers at roughly 70-80% of the effective context limit. Tool outputs often dominate context usage, sometimes exceeding 80% of tokens, so observation masking and selective retention keep long-horizon tasks within budget.

Does a bigger context window solve agent memory problems?

No. Larger windows increase cost disproportionately and model performance still degrades at long lengths. The effective approach is informativity over exhaustiveness: include only decision-relevant tokens and design systems that retrieve additional information on demand.