context-engineering

Configures rules files and curates context layers for AI coding agents.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/alissonpef/copilot_agent_skills --skill context-engineering-alissonpef
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/alissonpef/copilot_agent_skills/tree/main/.github/skills/context-engineering
Command: npx skills add https://github.com/alissonpef/copilot_agent_skills --skill context-engineering-alissonpef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding agents produce inconsistent output when they lack the right context: they hallucinate APIs, ignore project conventions, and degrade in quality over long sessions. This Skill provides a structured methodology for feeding agents the right information at the right time. ## Core Features & Use Cases - Context Hierarchy Framework: Organizes context into five levels, from persistent rules files (AGENTS.md, .cursorrules, copilot-instructions.md) down to conversation history management. - Context Packing Strategies: Provides templates like the Brain Dump, Selective Include, and Hierarchical Summary for structuring task-specific context. - Confusion Management: Defines explicit patterns for surfacing spec conflicts and missing requirements instead of letting the agent guess. - Use Case: When starting a new project for AI-assisted development, use this Skill to create a rules file covering tech stack, commands, conventions, and boundaries so every agent session follows project standards. ## Quick Start Ask the agent to set up context engineering for this project by creating a rules file with the tech stack, commands, and code conventions.

Frequently Asked Questions about context-engineering

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

FAQPage Schema
How do I set up a rules file for AI coding agents?▼

Create a rules file such as .github/AGENTS.md or .github/copilot-instructions.md containing your tech stack, build and test commands, code conventions, and boundaries. This file persists across sessions and is the highest-leverage context you can provide.

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

Include only files relevant to the current task, aiming for under 2,000 lines of focused context. Loading more than 5,000 lines of non-task-specific content causes the agent to lose focus and degrades output quality.

Which rules file works with GitHub Copilot, Cursor, and Windsurf?▼

GitHub Copilot uses .github/copilot-instructions.md, Cursor uses .cursorrules or .cursor/rules/*.md, and Windsurf uses .windsurfrules. A root-level AGENTS.md or .github/AGENTS.md serves as a general repository rules file.

Why does agent output quality degrade in long conversations?▼

Long conversations accumulate stale context, causing the agent to reference outdated patterns or deleted code. Start fresh sessions when switching major features, summarize progress periodically, and compact context before critical work.

What should an agent do when the spec conflicts with existing code?▼

The agent should surface the conflict explicitly with options rather than silently picking one interpretation. It should present the discrepancy, list possible approaches, and ask the user which direction to take.