AGENTS.md · vercel/vercel
AGENTS.md from vercel/vercel: 177 lines covering Repository Structure, Essential Commands, Changesets, Code Style and more.
Template by vercel
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/vercel/vercel/main/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 177 lines
- File
AGENTS.md
Sections
- Repository Structure
- Essential Commands
- Changesets
- Code Style
- Testing Patterns
- Package Development
- Runtime Packages
- CLI Development
- Common Pitfalls
First lines (shown under the repo's Apache-2.0 license)
# AGENTS.md
Guidelines for AI agents working on the Vercel monorepo.
## Repository Structure
This is a pnpm monorepo containing 44+ packages for the Vercel CLI and runtimes:
- `/packages/*` - Public npm packages (@vercel scope)
- `/internals/*` - Internal shared packages (@vercel-internals scope)
- `/crates` - Rust workspace
- `/examples` - Framework examples for testing
- `/utils` - Build and test utilities
## Essential Commands
```bash
pnpm install # Install dependencies
pnpm build # Build all packages
pnpm type-check # TypeScript validation
pnpm lint # ESLint check
pnpm test-unit # Run unit tests
pnpm test-e2e # Run e2e tests
```
Run tests for a specific package:
```bash
cd packages/<name>
pnpm test-unit
```
## Changesets
**Always create a changeset for all PRs.**
```bash
pnpm changeset
```
A changeset is a markdown file in `.changeset/` with YAML frontmatter listing affected packages and their bump type (patch/minor/major).
### Changeset Rules
1. Every PR must include a changeset (use empty frontmatter for non-package changes).
2. If your change modifies a package in `/packages/*`, include it in the changeset frontmatter
3. If your change modifies a package in `/internals/*`, include that `@vercel-internals/...` package. `pnpm ci:version` adds the public packages that bundle it (`vercel`, `@vercel/go`, `@vercel/rust`) so you do not list those by hand.
4. If your change only affects non-package files (docs, config, examples, `/api`), create a changeset with **empty frontmatter** - just the description
5. Packages in `/api` and `/examples` are ignored by changesets (see `.changeset/config.json`)
Example changeset for a package change:
```md
---
'@vercel/node': patch
---
Fixed edge case in serverless function bundling.
```
Example changeset for an internal package (the public packages that bundle it are added at version time):
```md
---
'@vercel-internals/runtimes': patch
---
Shared runtime helper used by builder detection.
```
Example changeset for non-package changes:
```md
---
---
Updated CI workflow configuration.
```
## Code Style
- **Formatting**: Prettier with single quotes, trailing commas (es5), no parens for single arrow params
- **Linting**: ESLint with TypeScript rules
- **No unused variables**: `@typescript-eslint/no-unused-vars` is enforced
- **No focused/disabled tests**: `jest/no-focused-tests` and `jest/no-disabled-tests` are errors
- **Use `slice()` over `substr()`**: substr is deprecated
Run before committing:
```bash
pnpm prettier --write .
pnpm lint
```
## Testing Patterns
- **Unit tests**: Jest or Vitest, located in `packages/<name>/test/unit/`
- **E2E tests**: Fixture-based, test real deployments
- **Affected testing**: CI only runs tests for changed packages and dependents
When adding tests:
```typescript
// Vitest style
import { describe, test, expect } from 'vitest';
describe('feature', () => {
test('should work', () => {
expect(true).toBe(true);
});
});
```
## Package Development
Each package follows this structure:
```
packages/<name>/
├── src/
│ └── index.ts # Main entry
├── test/
├── package.json
├── tsconfig.json # Extends ../../tsconfig.base.json
└── build.mjs # esbuild config (if applicable)
```
Workspace dependencies use `workspace:*`:
```json
{
"dependencies": {
"@vercel/build-utils": "workspace:*"
}
}
```
Internal packages (`@vercel-internals/*`) are private, versioned by changesets, and never published to npm. Public packages must list them as **`devDependencies` only** and bundle them at build time (mark `package.json` `dependencies` as esbuild externals, the same pattern as the CLI and builders). Do not add `@vercel-internals/*` to `dependencies` or `peerDependencies` of a public package.
Changesets will not bump a package that only has a `devDependency` on the changed workspace package. `utils/expand-internal-changesets.mjs` runs before `changeset version` and adds the public packages that bundle the released internals.
### New Package Setup
When creating a new package, configure it for public npm access:
```json
{
"name": "@vercel/new-package",
"publishConfig": {
"access": "public"
}
}
```
## Runtime Packages
Runtime packages (node, python, go, ruby, rust) implement the Builder API:
```typescript
export const version = 3;Signals
- Stars
- 16,435
- Forks
- 3,870
- Open issues
- 380
- Last commit (this folder)
- Feb 12, 2026 (8 months ago)
- Last release
- Jul 30, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/vercel/vercel
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from vercel
- 0.636score
add-harness-package
vercelOfficial
Guide for adding new AI SDK harness packages.
SkillAFreshness: A★ 27.5KClaude Code +9 - 0.636score
adr-skill
vercelOfficial
Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows.
SkillAFreshness: A★ 27.5KClaude Code +9 - 0.636score
list-npm-package-content
vercelOfficial
List the contents of an npm package tarball before publishing.
SkillAFreshness: A★ 27.5KClaude Code +9 - 0.632score
develop-ai-functions-example
vercelOfficial
Develop examples for AI SDK functions.
SkillAFreshness: A★ 27.5KClaude Code +9 - 0.632score
major-version-mode
vercelOfficial
Context for working on the next AI SDK major release.
SkillAFreshness: A★ 27.5KClaude Code +9 - 0.632score
migrate-ai-sdk-v6-to-v7
vercelOfficial
Migrate applications from AI SDK 6.x to AI SDK 7.0.
SkillAFreshness: A★ 27.5KClaude Code +9
Cite this page
AGENTS.md · vercel/vercel. Agent Mart. https://agentmart.dev/templates/vercel-vercel-agents-md (last updated 2026-10-24)