AI
Quality Over Quantity: How Smart Context Selection Outperforms Massive AI Prompts
Engineers are learning that carefully curated context beats drowning AI agents in documentation—and skills-based architecture offers a better way.
InfoQ
When Baruch Sadogursky fed an AI coding agent an enormous CLAUDE.md file stuffed with project documentation, code samples, and best practices, he expected success. Instead, the agent hallucinated an error handler that broke tests, returning a 500 error where it should have returned 404. The culprit wasn't stupidity—it was context overload.
This scenario, presented at InfoQ by Sadogursky and Patrick Debois (credited with coining the term DevOps), reveals a fundamental blind spot in how teams approach AI agents today: more context isn't better context. In fact, the opposite is often true.
The Context Window Problem#
Every interaction with an LLM consumes tokens from a finite context window. Users often assume only their current message counts, but in practice, the entire session history—system prompts, previous exchanges, pasted logs, chat conversation—travels back and forth with each request. That continuous data transfer fills the window faster than most realize, eventually forcing the model to "run out of room" and make mistakes.
The problem compounds when teams treat documentation dumps as the solution. Sadogursky's original CLAUDE.md contained over 700 lines of conflicting instructions scattered across four separate sections on error handling alone. No one maintained it. Everyone just kept adding. The result: an expensive pile of noise that pulled the model in contradictory directions.
The Skills-Based Alternative#
Rather than loading everything upfront, Debois and Sadogursky advocate splitting context into skills—modular markdown files that describe when they should activate.
A skill begins with a descriptive trigger field. Instead of "Error Handling," the description might read: "Use when adding try-catch blocks, HTTP error codes, or exception logging to backend endpoints." The agent scans all available skill descriptions, evaluates whether each one applies to the current task, and loads only what's relevant—a lazy-loading approach that keeps the context window lean.
In practice, this works: when they deleted the bloated CLAUDE.md and switched to skills for the same error-handling task, the generated code passed tests on the first try.
The key insight is that developers must write genuine skill descriptions, not copy-paste titles. Poor descriptions waste the opportunity; rich ones let agents make intelligent routing decisions.

