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
Who's talking about vercel/vercel
- remix-run/react-router-templates“use vercel preset”GitHub · Feb 6, 2025 · 11 reactions
- @samclemente.me“I meannnnnnnnnnnnn it's under the Apache license.... github.com/vercel/vercel”Bluesky · Jul 22, 2026 · 1 likes
The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.
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.
- AGENTS.mdAGENTS.md
- examples/nextjs/AGENTS.mdAGENTS.md
- python/AGENTS.mdAGENTS.md
- examples/nextjs/CLAUDE.mdCLAUDE.md
- packages/cli/CLAUDE.mdCLAUDE.md
- python/CLAUDE.mdCLAUDE.md
- cli-uxSkill
- vercel-cliSkill
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
- Very specific: line 3
Always-loaded guidance for work inside packages/cli.
- Distinctive: line 49
Use lowercase kebab-case for flags.
- Common: line 57
Do not record tokens, secrets, env values, file contents, request bodies, or unredacted user content in telemetry.
- Distinctive: line 62
Prefer focused tests for changed command behavior before broad test runs.
- Distinctive: line 63
Use existing mock client/scenario patterns for API behavior.
- Distinctive: line 64
When changing output, update direct expectations and add negative assertions for removed strings.
- Distinctive: line 65
When changing JSON, parse stdout and assert shape.
- Distinctive: line 66
When changing interactive behavior, test both TTY and non-interactive paths when both exist.
- Distinctive: line 67
When changing shared output, prompt, target-resolution, or remote-mutation helpers, inspect and test parallel command paths.
- Distinctive: line 87
Run the local CLI against an external project without installing globally:
- Very specific: line 96
Always-loaded digest; full CLI UX gates live in packages/cli/.agents/skills/cli-ux/references/verification.md.
- Distinctive: line 98
Do not prompt in non-interactive mode.
- Distinctive: line 99
Do not put human prose, warnings, ANSI, or spinners on JSON stdout.
- Common: line 100
Do not expose secrets in output, JSON, debug logs, telemetry, or suggested commands.
- Distinctive: line 102
Do not retry non-idempotent remote mutations in a way that can duplicate resources.
- Distinctive: line 103
Do not edit examples, fixtures, generated files, or package-lock artifacts unless they are directly required for the task.
- Very specific: line 104
Every PR needs a changeset.
≈ “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.
Files
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
- Inspect the current source and tests before changing behavior.
- Identify whether the task or review changes implementation only, or CLI UX/copy/output/help/errors/prompts/non-interactive behavior.
- For CLI UX implementation or review, use
packages/cli/.agents/skills/cli-ux/SKILL.mdand its references. Thecli-uxskill folder is the canonical source for CLI design, copywriting, output layout, prompts, machine-readable output, agent behavior, and command-specific UX contracts. - Reuse local helpers and command-family patterns before adding new abstractions.
- 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.mdand load the references it names. - Vercel Agent Review and any other code review of those surfaces: load the
cli-uxskill 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 insrc/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-uxskill, 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.tsCommon shared areas:
src/util/arg-common.tsfor shared flags and command-string helperssrc/util/agent-output*for non-interactive/agent payloadssrc/util/output/*and output-manager helpers for terminal outputsrc/util/input/*for prompts and validated interactive inputsrc/util/{projects,teams,target,config}for shared resource and target resolutionsrc/util/{deploy,link,env,domains,alias}for high-impact remote mutation flows
Implementation Rules
- Define commands in
command.tsas 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-subcommanddefault export and the namedgetCommandAliaseshelper. - Return
0for completed success,1for operational failure, and preserve existing usage/help exit codes such as2unless intentionally normalizing them with tests. - Wrap top-level command logic in
try/catch, print user-facing errors, and return1. - 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.tsRepo-level checks when appropriate:
pnpm build
pnpm type-check
pnpm lint
pnpm test-unitLocal CLI
Run the local CLI against an external project without installing globally:
cd packages/cli
pnpm vercel --cwd /path/to/projectGuardrails
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.
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
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.

