Dev.to AI ๐Ÿค– Ai ๐Ÿ‘ 0 ๐Ÿ“– 1 min read

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 repor

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

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? ๐Ÿ‘‡

๐Ÿ“ฐ Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.