context-engineering

Enforce a five-level context hierarchy and load relevant specs and source files.

15|3|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/LazyIsEfficient/agentic-os --skill context-engineering-lazyisefficient
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/LazyIsEfficient/agentic-os/tree/main/.claude/skills/context-engineering
Command: npx skills add https://github.com/LazyIsEfficient/agentic-os --skill context-engineering-lazyisefficient

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Optimizes agent context quality to prevent hallucinations, misapplied patterns, and protocol deviations, including guiding CLAUDE.md rules for a project.

Core Features & Use Cases

  • Enforces a five-level context hierarchy (rules files, spec/architecture docs, relevant source files, error output/test results, and conversation history) and loads only the parts needed for the current task.
  • Mandates a CLAUDE.md rules file to codify tech stack, conventions, and boundaries before task work.
  • Integrates with MCP servers to fetch live documentation and surface ground-truth information to the agent.
  • Supports explicit confusion-management patterns to surface ambiguity and emit inline plans before executing multi-step tasks.

Quick Start

Create a CLAUDE.md rules file and load only the relevant spec and source files for your current task.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I prevent agent context drift and hallucinations during coding tasks?▼

Preventing agent context drift requires enforcing a five-level context hierarchy that loads only relevant spec and source files, alongside a mandated CLAUDE.md rules file to codify tech stack conventions before task execution.

Why does my agent ignore CLAUDE.md rules and misapply patterns?▼

Your agent ignores CLAUDE.md rules when context lacks proper hierarchy. Curating agent context by loading only relevant specs and source files enforces those rules and prevents misapplied patterns and protocol deviations.

How do I structure context hierarchy to keep agent output focused?▼

Structure context hierarchy across five levels: rules files, spec and architecture docs, relevant source files, error output or test results, and conversation history. Loading only the needed levels keeps agent output focused and reliable.

Can I use MCP server integrations to fetch live documentation for agent context?▼

Yes, you can integrate MCP servers to fetch live documentation and surface ground-truth information directly to the agent. This provides accurate, up-to-date context that helps prevent hallucinations and protocol deviations.

What's the best way to manage agent confusion before executing multi-step tasks?▼

The best way to manage agent confusion is to apply explicit confusion-management patterns that surface ambiguity and emit inline plans before executing multi-step tasks. This ensures alignment with task goals and prevents pattern drift.

Do I need a CLAUDE.md rules file to stabilize agent context?▼

Yes, a CLAUDE.md rules file is mandated to codify your tech stack, conventions, and boundaries before task work. It serves as the foundational level of the context hierarchy to stabilize agent output and prevent drift.