Skip to content
Dashboard

AGENTS.md outperforms skills in our agent evals

Software Engineer, Next.js

Link to headingThe problem we were trying to solve

Link to headingTwo approaches for teaching agents framework knowledge

Link to headingWe started by betting on skills

Link to headingSkills weren't being triggered reliably

Link to headingExplicit instructions helped, but wording was fragile

Before writing code, first explore the project structure,
then invoke the nextjs-doc skill for documentation.

Example instruction added to AGENTS.md to trigger skill usage.

Link to headingBuilding evals we could trust

Link to headingThe hunch that paid off

IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning
for any Next.js tasks.

Key instruction embedded in the docs index

Link to headingThe results surprised us

Eval results across all four configurations. AGENTS.md (third column) achieved 100% across Build, Lint, and Test
Eval results across all four configurations. AGENTS.md (third column) achieved 100% across Build, Lint, and Test

Link to headingAddressing the context bloat concern

[Next.js Docs Index]|root: ./.next-docs
|IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning
|01-app/01-getting-started:{01-installation.mdx,02-project-structure.mdx,...}
|01-app/02-building-your-application/01-routing:{01-defining-routes.mdx,...}

Minified docs in AGENTS.md

The full compressed docs index. Each line maps a directory path to the doc files it contains
The full compressed docs index. Each line maps a directory path to the doc files it contains

Link to headingTry it yourself

Link to headingWhat this means for framework authors