context-engineering

Curates rules files, specs, and source files to structure agent context per task.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/Avistian/nba --skill context-engineering-avistian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-engineering
Source: https://github.com/Avistian/nba/tree/main/.cursor/skills/context-engineering
Command: npx skills add https://github.com/Avistian/nba --skill context-engineering-avistian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding agents produce inconsistent or hallucinated output when they receive too little context (inventing APIs, ignoring conventions) or too much (losing focus). This Skill provides a systematic method for deciding what information an agent sees, when it sees it, and how it is structured. ## Core Features & Use Cases - Five-Level Context Hierarchy: Organizes context 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, specs, and examples per task. - Confusion Management: Defines explicit patterns for surfacing spec conflicts, missing requirements, and ambiguity instead of silently guessing, plus an inline planning pattern for multi-step tasks. - Use Case: When starting a new feature in a large codebase, use this Skill to write a rules file covering tech stack, commands, and conventions, then load only the relevant spec section and one example pattern before each task. ## Quick Start Ask the agent to set up a context engineering structure for your project, including a rules file with tech stack, commands, conventions, and boundaries.

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 an AI coding agent?▼

Create a CLAUDE.md file (or .cursorrules, AGENTS.md depending on your tool) covering tech stack, build and test commands, code conventions, and boundaries. Include one short example of a well-written component in your style so the agent follows existing patterns.

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 you will modify, related tests, one example of the pattern to follow, and relevant type definitions. Loading more than roughly 5,000 lines of non-task-specific context degrades output quality.

Why does my AI agent invent APIs that do not exist?▼

Hallucinated APIs indicate context starvation: the agent lacks your project's rules file and relevant source files. Write down conventions in a persistent rules file and load actual source files before each task so the agent references real code.

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/*.md for Cursor, AGENTS.md for OpenAI Codex, and .github/copilot-instructions.md for GitHub Copilot. Content structure is the same across all of them.

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

Start fresh when switching between major features or when output quality degrades over a long conversation. Stale accumulated context causes the agent to reference outdated patterns; summarize progress before compacting or resetting.