context-engineering

Structure hierarchical context and enforce persistent rules files for AI agents.

84.9k|9.1k|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/addyosmani/agent-skills --skill context-engineering-addyosmani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/addyosmani/agent-skills/tree/main/skills/context-engineering
Command: npx skills add https://github.com/addyosmani/agent-skills --skill context-engineering-addyosmani

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical challenge of providing AI agents with the right information at the right time, directly impacting the quality and relevance of their output.

Core Features & Use Cases

  • Context Management: Guides users on structuring and delivering context to AI agents, from rules files to conversation history.
  • Quality Improvement: Helps agents avoid hallucinations, adhere to conventions, and maintain focus by managing information overload.
  • Use Case: When an AI agent starts producing incorrect code or ignoring project guidelines, this Skill provides a framework to re-establish proper context, ensuring it follows established patterns and constraints.

Quick Start

Use the context-engineering skill to set up project-specific rules files for your AI agent.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I stop my AI agent from ignoring project guidelines and generating incorrect code?

To stop AI agents from ignoring project guidelines, you must optimize AI context by curating information and defining persistent rules files. This enforces project-specific boundaries, preventing the agent from generating incorrect code.

What is context engineering for AI agents and when do I need it?

Context engineering is the process of hierarchically structuring and curating information provided to AI agents. You need it to address context starvation, flooding, and staleness, ensuring high output quality and relevance.

How do I structure AI context to prevent hallucinations and manage information overload?

Structure AI context through hierarchical organization and explicit communication patterns. This manages information overload, helps agents avoid hallucinations, and maintains focus by delivering the right information at the right time.

Can I set up persistent rules files to enforce coding conventions for my AI agent?

Yes, you can set up persistent rules files to enforce coding conventions. By defining and loading these project-specific rules, you establish strict boundaries and explicit patterns that the AI agent must follow during code generation.

What's the best way to re-establish proper context when an AI agent loses focus?

The best way to re-establish proper context is to use a framework that curates conversation history and project rules. This addresses context confusion by explicitly guiding the agent back to established constraints and conventions.