agentleFS
VercelKnown publishervercel/vercel/packages/cli/AGENTS.md

vercel / cli

AGENTS.md16k starsChanged 10 months agoApache-2.0View on GitHub

Always-loaded guidance for work inside packages/cli. Keep this file small. The CLI UX design system lives in packages/cli/.agents/skills/cli-ux/ and should be loaded only when the task or code review touches user-facing CLI behavior. Common shared areas:

Trending

Quiet since July.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the vercel/vercel repository that our weekly crawl found: only 2 in all, so this is a hint, not a trend. There is no adoption data for this file yet.
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository8 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

17 rules. About 2 are common, 12 are distinctive, and 3 are very specific to this project.

  • ≈2

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Always-loaded guidance for work inside packages/cli.

    line 3
  2. Distinctive:

    Use lowercase kebab-case for flags.

    line 49
  3. Common:

    Do not record tokens, secrets, env values, file contents, request bodies, or unredacted user content in telemetry.

    line 57
  4. Distinctive:

    Prefer focused tests for changed command behavior before broad test runs.

    line 62
  5. Distinctive:

    Use existing mock client/scenario patterns for API behavior.

    line 63
  6. Distinctive:

    When changing output, update direct expectations and add negative assertions for removed strings.

    line 64
  7. Distinctive:

    When changing JSON, parse stdout and assert shape.

    line 65
  8. Distinctive:

    When changing interactive behavior, test both TTY and non-interactive paths when both exist.

    line 66
  9. Distinctive:

    When changing shared output, prompt, target-resolution, or remote-mutation helpers, inspect and test parallel command paths.

    line 67
  10. Distinctive:

    Run the local CLI against an external project without installing globally:

    line 87
  11. Very specific:

    Always-loaded digest; full CLI UX gates live in packages/cli/.agents/skills/cli-ux/references/verification.md.

    line 96
  12. Distinctive:

    Do not prompt in non-interactive mode.

    line 98
  13. Distinctive:

    Do not put human prose, warnings, ANSI, or spinners on JSON stdout.

    line 99
  14. Common:

    Do not expose secrets in output, JSON, debug logs, telemetry, or suggested commands.

    line 100
  15. Distinctive:

    Do not retry non-idempotent remote mutations in a way that can duplicate resources.

    line 102
  16. Distinctive:

    Do not edit examples, fixtures, generated files, or package-lock artifacts unless they are directly required for the task.

    line 103
  17. Very specific:

    Every PR needs a changeset.

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Vercel CLI Agent Guide

Always-loaded guidance for work inside packages/cli. Keep this file small. The CLI UX design system lives in packages/cli/.agents/skills/cli-ux/ and should be loaded only when the task or code review touches user-facing CLI behavior.

First Steps

  1. Inspect the current source and tests before changing behavior.
  2. Identify whether the task or review changes implementation only, or CLI UX/copy/output/help/errors/prompts/non-interactive behavior.
  3. For CLI UX implementation or review, use packages/cli/.agents/skills/cli-ux/SKILL.md and its references. The cli-ux skill folder is the canonical source for CLI design, copywriting, output layout, prompts, machine-readable output, agent behavior, and command-specific UX contracts.
  4. Reuse local helpers and command-family patterns before adding new abstractions.
  5. Preserve compatibility for command names, flags, exit codes, env vars, config files, JSON fields, parseable stdout, and telemetry semantics unless the change intentionally migrates them with tests.

Task Routing

  • UX/copy/prompt/output/help/error/JSON/agent behavior: use packages/cli/.agents/skills/cli-ux/SKILL.md and load the references it names.
  • Vercel Agent Review and any other code review of those surfaces: load the cli-ux skill before assessing the diff or posting findings, even when the review makes no edits.
  • New or changed command metadata: update src/commands/<name>/command.ts, telemetry, help snapshots, and tests.
  • Command implementation: follow the surrounding command family in src/commands/<name>/ and shared helpers in src/util/.
  • Shared output, prompt, target resolution, or remote-mutation behavior: inspect parallel command paths before editing one path.
  • New durable CLI UX rule or command-specific UX contract: update the cli-ux skill, not this file.

Code Map

src/commands/<name>/
  command.ts      command metadata: description, args, options, examples
  index.ts        routing, parsing, telemetry, errors
  <action>.ts     subcommand/action implementation

src/util/telemetry/commands/<name>/
  index.ts        telemetry client

test/unit/commands/<name>/
  *.test.ts

Common shared areas:

  • src/util/arg-common.ts for shared flags and command-string helpers
  • src/util/agent-output* for non-interactive/agent payloads
  • src/util/output/* and output-manager helpers for terminal output
  • src/util/input/* for prompts and validated interactive input
  • src/util/{projects,teams,target,config} for shared resource and target resolution
  • src/util/{deploy,link,env,domains,alias} for high-impact remote mutation flows

Implementation Rules

  • Define commands in command.ts as const command objects.
  • Use lowercase kebab-case for flags.
  • Reuse shared options from src/util/arg-common.ts.
  • Parse flags with parseArguments(args, getFlagsSpecification(command.options)).
  • Parent commands with subcommands may use permissive parsing to route; subcommands should parse strictly.
  • Resolve subcommands with the src/util/get-subcommand default export and the named getCommandAliases helper.
  • Return 0 for completed success, 1 for operational failure, and preserve existing usage/help exit codes such as 2 unless intentionally normalizing them with tests.
  • Wrap top-level command logic in try/catch, print user-facing errors, and return 1.
  • Track telemetry after parsing and before command execution.
  • Do not record tokens, secrets, env values, file contents, request bodies, or unredacted user content in telemetry.

Testing

  • Unit tests live under packages/cli/test/unit/commands/<name>/.
  • Prefer focused tests for changed command behavior before broad test runs.
  • Use existing mock client/scenario patterns for API behavior.
  • When changing output, update direct expectations and add negative assertions for removed strings.
  • When changing JSON, parse stdout and assert shape; do not snapshot incidental formatting only.
  • When changing interactive behavior, test both TTY and non-interactive paths when both exist.
  • When changing shared output, prompt, target-resolution, or remote-mutation helpers, inspect and test parallel command paths.

Focused examples:

cd packages/cli
pnpm test test/unit/commands/<name>/<file>.test.ts

Repo-level checks when appropriate:

pnpm build
pnpm type-check
pnpm lint
pnpm test-unit

Local CLI

Run the local CLI against an external project without installing globally:

cd packages/cli
pnpm vercel --cwd /path/to/project

Guardrails

Always-loaded digest; full CLI UX gates live in packages/cli/.agents/skills/cli-ux/references/verification.md.

  • Do not prompt in non-interactive mode.
  • Do not put human prose, warnings, ANSI, or spinners on JSON stdout.
  • Do not expose secrets in output, JSON, debug logs, telemetry, or suggested commands.
  • Validate local input before remote mutations.
  • Do not retry non-idempotent remote mutations in a way that can duplicate resources.
  • Do not edit examples, fixtures, generated files, or package-lock artifacts unless they are directly required for the task.
  • Every PR needs a changeset. Use an empty changeset only for guide-only or packages/cli/.agents-only changes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.