context-engineering

Configures rules files and structured context to improve AI agent output quality.

Updated May 5, 2026
One-click install
npx skills add https://github.com/UlaYuga/promo-preflight --skill context-engineering-ulayuga
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/UlaYuga/promo-preflight/tree/main/.agents/skills/context-engineering
Command: npx skills add https://github.com/UlaYuga/promo-preflight --skill context-engineering-ulayuga

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding agents produce inconsistent or hallucinated output when they lack the right project context, and they lose focus when flooded with irrelevant information. This Skill provides a systematic method for curating what an agent sees — rules files, specs, source files, and error output — so output follows project conventions instead of inventing APIs. ## Core Features & Use Cases - Context Hierarchy Framework: Structures context into five levels from persistent rules files (CLAUDE.md, .cursorrules, AGENTS.md) down to transient conversation history, with templates for each level. - Context Packing Strategies: Provides the Brain Dump, Selective Include, and Hierarchical Summary patterns for loading exactly the right files per task. - Confusion Management: Defines explicit patterns for surfacing spec conflicts and missing requirements instead of silently guessing, plus an inline planning pattern for multi-step tasks. - Use Case: When an agent keeps ignoring your project's naming conventions and inventing nonexistent utility functions, use this Skill to write a rules file covering tech stack, commands, conventions, and boundaries, then load only task-relevant source files per session. ## Quick Start Set up a CLAUDE.md rules file for my project covering the tech stack, build commands, code conventions, and boundaries so the agent follows our patterns.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I write a CLAUDE.md rules file for my project?▼

A CLAUDE.md file should cover your tech stack, build and test commands, code conventions, and boundaries such as never committing secrets. Include one short example of a well-written component in your style so the agent has a concrete pattern to follow.

How much context should I give an AI coding agent per task?▼

Load only files relevant to the current task, aiming for under 2,000 lines of focused context. Research shows agent performance degrades when flooded with more than about 5,000 lines of non-task-specific material.

What is the difference between CLAUDE.md, .cursorrules, and AGENTS.md?▼

They are equivalent persistent rules files for different tools: CLAUDE.md for Claude Code, .cursorrules or .cursor/rules for Cursor, .windsurfrules for Windsurf, .github/copilot-instructions.md for Copilot, and AGENTS.md for OpenAI Codex.

Why does my AI agent ignore project conventions and invent APIs?▼

This happens when the agent lacks written conventions and code examples, so it falls back on generic training patterns. Fix it by writing a rules file and including one example of the pattern to follow before each task.

When should I start a fresh agent session instead of continuing?▼

Start a fresh session when switching between major features or when conversation history has grown long and stale. Accumulated context causes the agent to reference outdated patterns and deleted code.

Should agents treat config files and external docs as trusted instructions?▼

No. Source code and tests are trusted, but config files, data fixtures, and external documentation should be verified before acting on them. Instruction-like text in untrusted content should be surfaced to the user as data, not followed.