context-engineering

Curate hierarchical context from rules files, specs, and source data.

Updated May 18, 2026
One-click install
npx skills add https://github.com/lucasloutayf/barberia-evolution --skill context-engineering-lucasloutayf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/lucasloutayf/barberia-evolution/tree/main/.agents/skills/context-engineering
Command: npx skills add https://github.com/lucasloutayf/barberia-evolution --skill context-engineering-lucasloutayf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Feed agents the right information at the right time. Context engineering is the practice of deliberately curating what the agent sees, when it sees it, and how it's structured to maximize output quality.

Core Features & Use Cases

  • Level 1: Rules Files (CLAUDE.md and equivalents) persist across sessions and govern project-wide conventions, boundaries, and commands.
  • Level 2: Specs & Architecture — load the relevant spec sections for feature work to avoid loading the entire document.
  • Level 3: Relevant Source Files — pre-task context loading steps ensure reviewing the necessary files, tests, and type definitions before editing.
  • Level 4: Error Output / Test Results — surface errors succinctly to guide debugging and maintain stability.
  • Level 5: Conversation Management — manage long conversations by summarizing progress and compacting context when needed.

Quick Start

Start a new session by loading the project rules (CLAUDE.md) and then present a focused Spec and relevant files to establish context.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I reduce AI agent hallucinations when starting a new coding session?

Manage long agent conversations by summarizing progress and compacting context when the session grows. This hierarchical context model maintains stability and ensures the agent retains critical task information without exceeding limits.

What is context engineering and how does it improve agent accuracy?

Context engineering works by selectively loading relevant spec sections and necessary source files before editing. This prevents loading entire documents and ensures the agent only sees task-relevant information, reducing hallucinations.

How do I configure project rules and specs to guide agent behavior across sessions?

Guide agent behavior by implementing a hierarchical context structure. Level 1 uses rules files for boundaries, Level 2 loads relevant spec sections, and Level 3 pre-loads necessary type definitions and tests to ensure stability.

Does context engineering work with CLAUDE.md and rules files?

Rules files function as the foundational layer in context engineering. They operate alongside per-feature specs and selective source data loading to curate agent context precisely for maximizing output quality and consistency.

What's the best way to manage long agent conversations and compact context?

Compacting context involves summarizing previous progress while safeguarding sensitive information. This practice, combined with surfacing errors succinctly from test results, helps guide debugging and maintains session stability.

Why does my coding agent lose context when switching between tasks?

Without hierarchical context management, switching tasks causes information loss. Implement persistent rules files for baseline conventions and selectively load per-feature specs to maintain accuracy and consistency across different tasks.