DEV Community

Cover image for The commands section is the highest-ROI part of your AGENTS.md
PromptMaster
PromptMaster

Posted on

The commands section is the highest-ROI part of your AGENTS.md

Why commands matter most

Most agent tasks end in a build or a test. List the exact commands and the agent runs them, reads the output, and fixes its own errors before finishing. Leave them out and it guesses — or reports success on code that never passed.

Be literal

"Run the tests" can't be executed. pnpm test can.

## Commands
Install:    pnpm install --frozen-lockfile
Dev:        pnpm dev
Build:      pnpm build
Test (all): pnpm test
Test (one): pnpm test -- path/to/file.test.ts
Typecheck:  pnpm typecheck
Lint + fix: pnpm lint --fix
Enter fullscreen mode Exit fullscreen mode

Don't skip the single-test command

Test (one) lets the agent iterate in seconds on a focused change instead of running the whole suite (or skipping verification entirely).

Name the gate

Say what must pass before a change is "done" — types, lint, tests. The agent treats that as the bar to clear. Bonus: make it match your CI so the work it considers done is work that actually merges.

Monorepo?

Put workspace-wide commands at the root and package-specific ones in each package's AGENTS.md — the nearest file wins.


Free cheat sheet: the format, an annotated example, and the one-line test — AGENTS.md Cheat Sheet.

Go deeper: the full reference — cross-tool setup, the monorepo hierarchy, and a 30-day plan — AGENTS.md: The Complete Guide to the Cross-Tool Agent Standard.

What's in your commands section that's saved you the most rework? 👇

Top comments (0)