context-engineering

Engineer AI context management with Write/Select/Compress/Isolate and Role/Objective/Latitude frameworks.

13|3|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/phrazzld/agent-skills --skill context-engineering-phrazzld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/phrazzld/agent-skills/tree/main/core/context-engineering
Command: npx skills add https://github.com/phrazzld/agent-skills --skill context-engineering-phrazzld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design and manage the information an AI agent uses, ensuring it has the right context to perform tasks effectively and efficiently, especially within token budget constraints.

Core Features & Use Cases

  • Context Lifecycle Management: Understand and apply the Write, Select, Compress, Isolate framework for optimal context.
  • Instruction Design: Craft clear, effective prompts and instructions using the Role + Objective + Latitude pattern.
  • Use Case: Debugging why an AI agent is producing irrelevant output by analyzing its context window and refining its instructions for better focus.

Quick Start

Use the context-engineering skill to review the current prompt for the 'code-review' agent.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I optimize AI context to improve agent performance?

Optimize AI context by engineering prompt design and context lifecycle management. Use frameworks like Write/Select/Compress/Isolate to manage information flow and Role/Objective/Latitude patterns to ensure instruction clarity within token budgets.

Why does my LLM produce irrelevant output and how can I fix context distraction?

LLM irrelevant output stems from context distraction or context rot. Fix this by analyzing the context window, applying structured instruction design, and isolating unnecessary information to refine agent focus.

What is the best way to design LLM instructions for complex tasks?

The best way to design LLM instructions is using the Role + Objective + Latitude pattern. This structured approach ensures instruction clarity, defines agent boundaries, and optimizes overall token budgets for complex tasks.

How can I manage token budgets when providing reference material to an AI agent?

Manage token budgets by applying the Compress and Isolate phases of context lifecycle management. This optimizes reference material utilization, ensuring the agent processes only essential information without exceeding token limits.

How do I prevent context poisoning when building AI workflows?

Prevent context poisoning by implementing structured context engineering frameworks. Filtering and isolating reference materials ensures the LLM operates on clean, relevant data, avoiding corrupted or distracting inputs.

Can I use context engineering frameworks for debugging a code review agent?

Yes, you can use context engineering to debug a code review agent. Analyze its context window, identify instruction confusion, and apply the Write/Select/Compress/Isolate framework to refine focus and output relevance.