Skip to content
Agentmart
Submit a tool

AGENTS.md · GitbookIO/gitbook

AGENTS.md from GitbookIO/gitbook: 83 lines covering Commands, Development, Architecture, Testing and more.

Template by GitbookIO

IndexedGPL-3.0★ 29,070
Write a review

Chalk Labs

Need help deploying AGENTS.md · GitbookIO/gitbook?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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/GitbookIO/gitbook/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.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that GitbookIO/gitbook (29,070 stars) keeps for coding agents. It has 83 lines in 7 sections: Commands; Development; Architecture; Testing; Changesets; Formatting; Comments. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No 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
83 lines
File
AGENTS.md

Sections

  1. Commands
  2. Development
  3. Architecture
  4. Testing
  5. Changesets
  6. Formatting
  7. Comments

First lines (shown under the repo's GPL-3.0 license)

# AGENTS Instructions

## Commands

```bash
bun install          # Install dependencies
bun dev              # Start dev server (all packages)
bun run build        # Build all packages
bun run lint         # Lint with Oxlint
bun run format       # Format with Oxfmt (run after every change)
bun run typecheck    # Type-check all packages
bun run unit         # Run unit tests
```

## Development

The dev server proxies published GitBook sites locally. After `bun dev`, access any published site at:

```
http://localhost:3000/url/<published-gitbook-url>
```

Examples:
- `http://localhost:3000/url/gitbook.com/docs`
- `http://localhost:3000/url/open-source.gitbook.io/midjourney`

## Architecture

```
packages/
  gitbook/          # Main Next.js app
    src/
      app/          # Next.js App Router (sites/)
      components/   # React components
      lib/          # Server utilities, data fetching
      intl/         # Internationalization (translations/)
  openapi-parser/   # OpenAPI 3.0/3.1/Swagger parser
  react-openapi/    # OpenAPI rendering components
  react-contentkit/ # ContentKit component rendering
  embed/            # Embeddable GitBook components
  shared/           # Shared utilities
  icons/            # Icon assets
  fonts/            # Font assets
  colors/           # Color tokens
  expr/             # GitBook expression evaluator
  cache-do/         # Cloudflare DO cache
  cache-tags/       # Cache tag utilities
```

## Testing

```bash
bun run unit         # Unit tests via bun test (not vitest)
bun run e2e          # Playwright e2e tests (requires built app)
```

Run a specific test file:
```bash
cd packages/gitbook && bun test src/lib/cache.test.ts
```

## Changesets

After committing code changes, create a changeset for the affected package:

```md
---
"gitbook": patch
---

Provide a short description of the change.
```

Save as `.changeset/<name>.md`, then commit it separately with message: `changeset`

## Formatting

Linting uses Oxlint and formatting uses Oxfmt. Always run `bun run format` before committing.

## Comments

Comment to explain *why*, not *what* — the code already shows what it does. Keep comments short, ideally a single line. Avoid multi-line block comments that narrate mechanics a reader can follow from the code; they add noise and go stale. Reserve longer comments for genuinely non-obvious rationale: a subtle invariant, or a workaround and the reason it exists.

Signals

Stars
29,070
Forks
4,038
Open issues
52
Last commit (this folder)
Aug 13, 2026 (2 months ago)
Last release
Oct 15, 2025 (1 year ago)

From GitHub (fetched Oct 24, 2026).

Details

License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get AGENTS.md · GitbookIO/gitbook running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying AGENTS.md · GitbookIO/gitbook?

CallGet help
Cite this page

AGENTS.md · GitbookIO/gitbook. Agent Mart. https://agentmart.dev/templates/gitbookio-gitbook-agents-md (last updated 2026-10-24)