Get your free personalized podcast brief

We scan new podcasts and send you the top 5 insights daily.

Modern AI models infer context from the codebase, making detailed `agent.md` files redundant. These files waste tokens on every interaction and are only necessary for highly specific, proprietary information that must always be present in the context.

Related Insights

To prevent an AI agent from repeating mistakes across coding sessions, create 'agents.md' files in your codebase. These act as a persistent memory, providing context and instructions specific to a folder or the entire repo. The agent reads these files before working, allowing it to learn from past iterations and improve over time.

Counterintuitively, the goal of Claude's `.clodmd` files is not to load maximum data, but to create lean indexes. This guides the AI agent to load only the most relevant context for a query, preserving its limited "thinking room" and preventing overload.

Structure AI context into three layers: a short global file for universal preferences, project-specific files for domain rules, and an indexed library of modular context files (e.g., business details) that the AI only loads when relevant, preventing context window bloat.

Instead of a single, monolithic "About Me" file, structure personal context into modular files (e.g., roles, projects, team). This design allows you to provide an AI agent with only the specific information it needs for a given task, which enhances efficiency, relevance, and privacy.

Instead of one large context file, create a library of small, specific files (e.g., for different products or writing styles). An index file then guides the LLM to load only the relevant documents for a given task, improving accuracy, reducing noise, and allowing for 'lazy' prompting.

With AI agents, the key to great results is not about crafting complex prompts. Instead, it's about 'context engineering'—loading your agent with rich information via files like 'agents.md'. This allows simple commands like 'write a cold email' to yield highly customized and effective outputs.

To keep your AI agent efficient, differentiate between global and project-level skills and context files. General-purpose tools, like a text truncation skill, should be global. Specific processes, like a referral template, should be kept at the project level to avoid cluttering every interaction.

The 'agents.md' file is an open format that functions like a README, but specifically for AI agents. It provides a dedicated, predictable place to store context and instructions, ensuring the AI consistently follows rules for commits, tests, and project setup across all your repositories.

Instead of loading large context files on every turn, use "skills." The agent only sees a skill's name and description initially, loading the full instructions only when needed. This method, called progressive disclosure, drastically saves tokens and improves performance.

Instead of explicitly telling an AI agent how to organize its knowledge, simply provide the necessary context. A well-designed agent can figure out what information is important and create its own knowledge files, such as a 'user.md' for personal details or an 'identity.md' for its own persona.

Most AI Agent Context Files (`agent.md`) Are Unnecessary and Wasteful | RiffOn