Alex Kurilin

Writing a Great AGENTS File

TL;DR (Read This First)

  1. Keep AGENTS.md/CLAUDE.md short and high-signal: use it as an index and rule sheet, not a full handbook.
  2. Put always-needed context in AGENTS.md/CLAUDE.md; use skills and scoped rules for task-specific instructions.
  3. Be concrete and project-specific; cut generic advice that the model can infer from code and tooling.
  4. Treat the file as living documentation: bootstrap, review, and refine it regularly (/init, /insights, /memory).
  5. Skills are best for vertical workflows (migrations, deploys), not for foundational context every session needs.

🔗 Vercel: AGENTS.md outperforms skills in our agent evals

AGENTS vs Skills vs Rules vs Imports

If you only remember one model, use this:

Best-practice split:

Built-in Tools for Bootstrapping

Claude Code includes a practical loop for maintaining this file over time:

Where the Sources Diverge

The big tension is between brevity and comprehensiveness.

Vercel and Anthropic’s docs both push hard toward minimalism — load only what’s needed, compress aggressively, save tokens. The gist takes the opposite approach: it’s a sprawling ~2,000-word document covering workflow orchestration, task management, communication guidelines, error handling, engineering practices, git hygiene, and templates. It’s essentially a complete operating manual for an AI coding agent.

These aren’t necessarily contradictory — they’re answering different questions. Vercel is asking “how do we teach an agent about framework APIs?” and found that a compressed index beats skills. The gist is answering “how do I define the behavioral contract for an AI agent working in my codebase?” which is a broader concern. But if you took the gist literally and put it all in CLAUDE.md, you’d be burning a lot of context window on instructions that may not be relevant to every task.

The practical reconciliation: keep always-needed behavioral contract in CLAUDE.md (lean), keep scoped rules in repo-local rule/memory files, put reference material in separate files with @imports, and use skills for action-specific workflows.

Skills: dead or complementary? Vercel’s data is strong evidence against skills as a primary knowledge-delivery mechanism. But Vercel also notes skills can still work well for vertical workflows like migrations or deployments. Anthropic’s docs position skills as autonomous or explicitly invoked tools (/skill-name). Net: don’t rely on skills for foundational context, but use them for specialized, triggerable workflows.

Example / Reference Material

HumanLayer’s guide:

#ai #devex #workflow #claude-code #codex #agentic-coding