context engineering

AI Community

Skill notes

Overview

Feed agents the right information at the right time. Context is the single biggest lever for agent output quality — too little and the agent hallucinates, too much and it loses focus. Context engineering is the practice of deliberately curating what the agent sees, when it sees it, and how it's structured.

When to Use

Starting a new coding session Agent output quality is declining (wrong patterns, hallucinated APIs, ignoring conventions) Switching between different parts of a codebase Setting up a new project for AI-assisted development The agent is not following project conventions

The Context Hierarchy

Structure context from most persistent to most transient:

Level 1: Rules Files

Create a rules file that persists across sessions. This is the highest-leverage context you can provide. CLAUDE.md (for Claude Code): Equivalent files for other tools: .cursorrules or .cursor/rules/*.md (Cursor) .windsurfrules (Windsurf)

Level 2: Specs and Architecture

Load the relevant spec section when starting a feature. Don't load the entire spec if only one section applies. Effective: "Here's the authentication section of our spec: [auth spec content]" Wasteful: "Here's our entire 5000-word spec: [full spec]" (when only working on auth)

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@addyosmani · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
Node.js
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
  • Env read
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview context-engineering.preview
# Level 4: Error Output

When tests fail or builds break, feed the specific error back to the agent: **Effective:** "The test failed with: `TypeError: Cannot read property 'id' of undefined at UserService.ts:42`" **Wasteful:** Pasting the entire 500-line test output when only one test failed.

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.