Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Foundations

Context engineering

Deciding what instructions, documents, tools and history a model sees at each step.

Intermediate
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

Overview

Context engineering widens prompt engineering from a single message to everything that ends up in the model's context window: the system prompt, instruction files such as AGENTS.md, retrieved documents, tool definitions, tool results and the conversation so far. Each token competes for the model's attention, so more is not better.

The skill is choosing what to include, what to leave out and when to load it. Typical techniques are short always-on instructions with details loaded on demand (the idea behind Agent Skills), retrieving only the relevant passages, summarising or clearing old history in long sessions, and handing focused work to subagents with their own clean context.

What you will practise

  • Keep always-on instructions short and move detail into files loaded on demand
  • Retrieve only the passages a step needs
  • Recognise when a long session has degraded and compact or restart it
  • Delegate noisy searches to subagents with a precise brief

Learning paths

  • Agent Skills essentials

    A free Agent Skills course: learn what SKILL.md packages are, write and share your own, port it across agents and review third-party skills before installing.

    Beginner2 h9 steps

  • AI-assisted software engineering

    Learn AI-assisted software engineering on real repositories: set up coding agents, give them good instructions, review their diffs and run several in parallel.

    Intermediate11 h14 steps

  • LLMOps: observability, evals and cost

    Learn LLMOps in practice: trace every request, gate changes with evals in CI, calibrate judges and keep token spend visible and under control in production.

    Intermediate7 h10 steps

  • Prompt and context engineering

    A prompt and context engineering course: go from single prompts to deciding what a model sees at each step, from instructions and examples to files and tools.

    Intermediate3 h8 steps

Tutorials

Workflow recipes

Articles

Tools for this skill

  • Agent Skills specification

    The open specification for SKILL.md skill folders, published at agentskills.io.

    MCP, skills and standardsOpen standard

  • AGENTS.md

    Open format for instruction files that coding agents read in a repository.

    MCP, skills and standardsOpen standard

  • Context7

    Serves current, version-specific library documentation to coding agents over MCP.

    MCP, skills and standardsFreemiumUpstash

  • Deep Agents

    LangChain harness with planning, files and subagents.

    Agent frameworks and SDKsOpen sourceLangChain

  • Letta

    Platform for stateful agents that keep long-term memory across sessions.

    Agent frameworks and SDKsOpen sourceLettaFormerly MemGPT

  • llms.txt

    A proposed Markdown file at a site's root that points models to its key docs.

    MCP, skills and standardsOpen standard

  • Mem0

    Memory layer that extracts facts from conversations and retrieves them later.

    Agent frameworks and SDKsOpen sourceMem0

Key terms

Words you will meet while learning this, defined in the glossary.

Full glossary
  • Agent memory

    Information an agent keeps beyond a single context window, such as user preferences, past decisions or task notes, and retrieves when needed.

  • Compaction

    Summarising earlier parts of a long conversation and replacing them with the summary to free context space for the work still to do.

  • Context engineering

    Deciding what information, tools and history a model sees at each step, and what to leave out, to get the result you want.

  • Context isolation

    Running a subtask in a separate context window so raw tool output and intermediate noise never enter the parent conversation.

  • Context poisoning

    When a wrong fact, hallucination or bad tool result enters an agent's context and keeps steering later steps in the wrong direction.

  • Context rot

    The gradual decline in a model's accuracy and instruction-following as its context fills up with long, stale or irrelevant content.

  • Context window

    The maximum number of tokens a model can consider in one request, covering both the input you send and the output it writes.

  • llms.txt

    A proposed Markdown file at a website's root that summarises the site and links to its key documentation pages for language models.

  • Lost in the middle

    The finding that language models use information at the start and end of a long context better than information buried in the middle.

  • Progressive disclosure

    Loading only skill names and descriptions up front, and the full instructions or bundled files only when a task needs them.