---
title: "Writing a Good AGENTS.md"
url: https://daily.dev/posts/writing-a-good-agents-md-jzlmwgfoi
source_url: https://www.philschmid.de/writing-good-agents
type: article
source: "Philipp Schmid"
published: 2026-05-31T07:41:14.772Z
updated: 2026-05-31T08:31:09.239Z
tags: ["devtools", "llm", "ai-agents", "prompt-engineering"]
reading_time: 3
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Writing a Good AGENTS.md

**[Philipp Schmid](https://daily.dev/sources/philschmid)** · 3 min read · 0 upvotes · 0 comments

## Summary

AGENTS.md (or GEMINI.md) files are injected into every coding agent session, making them high-leverage but also high-risk. Research from ETH Zurich shows auto-generated AGENTS.md files reduce task success rates by ~3% while increasing inference costs by 20%+. Human-written files only marginally improve performance (~4%) and still raise costs. Key findings: codebase overviews don't help agents navigate faster, tools mentioned in AGENTS.md get used 160x more often, and agents can follow ~150–200 instructions but the harness already consumes ~50. Best practices: keep it under 300 lines (ideally under 60), include tech stack, project purpose, and non-obvious build/test tooling. Avoid directory listings, code style rules, task-specific instructions, and auto-generated content. Use progressive disclosure by pointing to separate task-specific docs rather than embedding everything.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.philschmid.de/writing-good-agents>

## Similar posts on daily.dev

- [Stop Using /init for AGENTS.md](https://daily.dev/posts/stop-using-init-for-agents-md-nm6yotsrj) · Addy Osmani · 75 upvotes · 5 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#llm](https://daily.dev/tags/llm), [#ai-agents](https://daily.dev/tags/ai-agents), [#prompt-engineering](https://daily.dev/tags/prompt-engineering)

[View this post on daily.dev](https://daily.dev/posts/writing-a-good-agents-md-jzlmwgfoi)
