agentleFS
MistralKnown publishermistralai/platform-docs-public/CLAUDE.md

platform-docs-public

CLAUDE.md74 starsChanged 6 months agoApache-2.0View on GitHub

Mistral AI's platform documentation site, built with Next.js 15 (App Router), MDX, Tailwind CSS v4, and TypeScript. Uses pnpm as package manager. Prebuild scripts (run automatically by pnpm build): - pnpm cookbook:build — Compiles cookbook data from notebooks - pnpm rawmdx:export — Exports raw MDX content - pnpm copy-openapi — Copies OpenAPI specs - pnpm search:build — Builds the search index - pnpm copy-assets-file — Copies static assets The sidebar is filesystem-driven — src/lib/content/index.ts (getSidebar) recursively scans the (docs) directory…

  • Installs packages

The file

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

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No marketing fluff — banned words: "Simply", "Just", "Obviously", "Easily", "Powerful", "Seamless"

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Mistral AI's platform documentation site, built with Next.js 15 (App Router), MDX, Tailwind CSS v4, and TypeScript. Uses pnpm as package manager.

Commands

pnpm install              # Install dependencies (also runs git submodule init + API docs build)
pnpm dev                  # Dev server (builds cookbooks + exports raw MDX first, then runs next dev)
pnpm build                # Full production build (prebuild scripts + next build)
pnpm lint                 # ESLint via next lint
pnpm type-check           # TypeScript check (tsc --noEmit)

Prebuild scripts (run automatically by pnpm build):

  • pnpm cookbook:build — Compiles cookbook data from notebooks
  • pnpm rawmdx:export — Exports raw MDX content
  • pnpm copy-openapi — Copies OpenAPI specs
  • pnpm search:build — Builds the search index
  • pnpm copy-assets-file — Copies static assets

Architecture

Route Groups (App Router)

  • src/app/[locale]/(docs)/ — Main documentation pages with sidebar layout. Each page is a folder with page.mdx, page.md, or page.tsx.
  • src/app/[locale]/(api)/ — API reference pages (generated from OpenAPI via @speakeasy-api/docs-md)
  • src/app/[locale]/(no-sidebar-pages)/ — Pages without sidebar (e.g., blog)
  • src/app/api/ — API routes (e.g., OG image generation)

Content & Sidebar System

The sidebar is filesystem-driven — src/lib/content/index.ts (getSidebar) recursively scans the (docs) directory tree:

  • page.mdx / page.md — Page content with YAML frontmatter (title, description, sidebar_position, sidebar_label, etc.)
  • _meta.md / _meta.mdx — Overrides sidebar metadata for a directory without being a page
  • _category_.json — Category metadata (label, position, link) for directory grouping in sidebar
  • Sorting uses sidebar_position (frontmatter) or position (category JSON), then alphabetical
  • Pagination is auto-generated across the flattened sidebar tree

Frontmatter schema: src/schema/content/documentation.ts (DocsMetadata, DocsCategoryMetadata)

Path Alias

@/* maps to src/* (configured in tsconfig.json with baseUrl: "./src")

Key Directories

  • src/components/markdown/ — MDX component overrides (registered in src/mdx-components.tsx)
  • src/components/ui/ — Shared UI primitives (Radix-based)
  • src/components/layout/ — Header, footer, sidebar, breadcrumb, pagination
  • src/components/common/ — Reusable doc-specific components
  • src/schema/ — TypeScript types and data schemas (sidebar, models, cookbooks, etc.)
  • src/lib/content/ — Sidebar builder, frontmatter parser, heading extraction
  • src/lib/frontmatter/ — Remark plugins (directives, admonitions, audio, OG images)
  • src/scripts/ — Build-time scripts (search index, cookbook compilation, MDX export)

MDX Pipeline

Next.js MDX is configured in next.config.ts with custom remark plugins:

  • remarkDirective + admonitionDirective — Admonition callouts (info, warning, etc.)
  • remarkAudioToComponent — Audio elements in MDX
  • remarkOgFromPath — Auto-generates OG image paths
  • remarkMdxFrontmatter — Exposes frontmatter as _fm export
  • remarkDetailsClasses — Adds prose classes to <details> elements

State Management

  • Jotai — Atomic state (used across components)
  • Zustand — Store-based state
  • nuqs — URL query string state

Writing Standards

See src/docs-doctrine.md for the full documentation style guide. Key rules:

  • Active voice, imperative for instructions
  • No marketing fluff — banned words: "Simply", "Just", "Obviously", "Easily", "Powerful", "Seamless"
  • Sentence case for headings
  • Bold for UI labels, monospace for code/file names/CLI commands
  • 1-4 sentences per paragraph max

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.