Skip to main content
HS
HiSETSuccess
LeetCode Prep

Agent Engineering

From autocomplete user to superstar developer — coding agents, context, skills, MCP, hooks, spec-driven and parallel workflows, and building your own agents.

Chapter 2 · 6 lessons

Context Engineering

AGENTS.md, CLAUDE.md, Cursor rules, and Copilot instructions — what belongs in always-on memory, what belongs in a skill, and how to spend the token budget.

Cursor · Claude Code · OpenAI Codex · GitHub Copilot

Show all 6 lessons

Lesson 1 of 6

Context Is a Budget, Not a Bucket

Everything the agent sees competes for the same window: system prompt, repo memory files, skill descriptions, MCP tool schemas, open files, conversation history, and tool outputs. More context is not better context — irrelevant tokens dilute attention and push useful history out.

What fills the window
always loaded   ▓▓▓▓ system + harness
                ▓▓▓  repo memory (AGENTS.md, rules)
                ▓▓   skill names + descriptions
                ▓▓▓▓ MCP tool schemas (every connected server!)
on demand       ░░░░ files read, search results
                ░░░  activated skill bodies
growing         ████████ conversation + tool outputs
  • Always-on content should be short, stable, and true for almost every task
  • Task-specific procedures belong in skills (loaded on activation)
  • Large references belong in files the agent reads only when needed
  • Long sessions degrade — start fresh threads for new tasks and summarize handoffs

Refresher

Token budgeting and prompt stacks are covered in depth in the AI & FDE track's LLM Foundations chapter.