context-engineering

Curates rules files, specs, and source context for AI coding agent sessions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding agents hallucinate APIs, ignore project conventions, and degrade in quality during long sessions because they receive too little, too much, or stale context. This Skill provides a structured methodology for feeding agents the right information at the right time. ## Core Features & Use Cases - Five-Level Context Hierarchy: Structures context from persistent rules files (CLAUDE.md, AGENTS.md, .cursorrules) down to transient conversation history, with templates for each level. - Context Budget Management: Defines a 75% capacity trimming threshold, cut-first/protect-until-end priorities, and compression-before-deletion strategies to prevent abrupt quality drops in long sessions. - Confusion Management: Provides explicit patterns for surfacing spec conflicts, missing requirements, and inline planning instead of silently guessing. - Use Case: When starting a new feature, you load only the relevant spec section, the files to modify, one existing pattern example, and a constraints block — keeping focused context under 2,000 lines instead of flooding the agent with the entire codebase. ## Quick Start Ask the agent to set up a CLAUDE.md rules file for this project covering the tech stack, commands, conventions, and boundaries before starting the next task.

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 CLAUDE.md rules file for my project?▼

Create a CLAUDE.md at the project root covering tech stack, build and test commands, code conventions, boundaries, and one short pattern example. Equivalent files exist for other tools: .cursorrules for Cursor, AGENTS.md for Codex, and .github/copilot-instructions.md for Copilot.

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

Aim for under 2,000 lines of focused context per task. Include only the files being modified, related tests, one existing pattern example, and relevant constraints. Loading more than 5,000 lines of non-task-specific context causes the agent to lose focus.

Why does AI agent output quality degrade during long sessions?▼

Long sessions accumulate stale context: failed attempts, replaced code drafts, and verbose tool output fragment the model's attention. Start trimming at 75% context capacity, compress concluded exploration into one-sentence summaries, and protect the active task definition and current error.

When should I start a fresh AI coding session?▼

Start fresh at completed task boundaries, not arbitrary token counts. Before leaving, persist accepted decisions, current task status, changed files, verification outcomes, and unresolved questions so the new session can resume from durable artifacts and git status.

What should an AI 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 presents the discrepancy, lists viable approaches such as following the spec or following existing patterns, and asks the user to decide.

Which MCP servers improve AI agent context?▼

Useful MCP servers include Context7 for library documentation, Chrome DevTools for live browser state, PostgreSQL for schema and query results, Filesystem for project file access, and GitHub for issue and PR context.