CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.Project Overview
GoldRush API documentation site built with Mintlify. Content is authored in MDX (Markdown + JSX). The site documents multiple products: Foundational API (REST), Streaming API (GraphQL/WebSockets), CLI, x402 protocol, and MCP Server.Commands
| Task | Command |
|---|---|
| Local dev server | npm run dev (runs mintlify dev on localhost:3000) |
| Run generation pipeline | npm run generate (interactive TUI to select scripts) |
| Populate changelog | npm run script:populate-changelog |
| Check nav consistency | node s/check-nav-consistency.js |
| Install dependencies | yarn install |
Content Architecture
Hand-authored vs Generated content
Hand-authored (safe to edit directly):goldrush-foundational-api/— API overview, quickstart, authenticationgoldrush-streaming-api/— Streaming API guidesgoldrush-cli/— CLI documentationgoldrush-x402/— x402 protocol docsresources/— Feature-specific guidesoverview.mdx,faq.mdx,error-handling.mdx, root-level pagessnippets/— Reusable MDX components (some are generated, see below)
api-reference/foundational-api/**/*.mdx— from OpenAPI + DatoCMS metadataapi-reference/streaming-api/**/*.mdx— from YAML definitionsapi-reference/openapi.json— compiled OpenAPI specchains/*.mdx(exceptchains/overview.mdx) — from DatoCMS chain datachangelog/*.mdx— from DatoCMSsnippets/supported-chains-dexes.mdx— from Streaming API queryllms.txt,llms-full.txt— LLM context filesskills/*/references/*.md— per-product skill reference files for AI agentsdata/*.json— intermediate data files
Navigation
docs.json is the source of truth for site structure. Generation scripts read from and write to it. Keep it in sync with page files.
Data Flow
Generation Pipeline (9 steps, order matters)
./s/build-conjure— compile Conjure YAML schemas./s/get-apiendpoints— fetch endpoint metadata from DatoCMSnode ./s/get-chains.js— fetch chain metadata from DatoCMSnode ./s/convert-openapi.js— generate Foundational API MDX pagesnode ./s/generate-chain-docs.js— generate per-chain MDX pagesnode ./s/fetch-streaming-chains-dexes.js— fetch supported chains/DEXesnode ./s/convert-streaming.js— generate Streaming API MDX pagesnode ./s/generate-llm-txt.js— generate LLM context files and skills reference filesnode ./s/populate-changelog.js— generate changelog (optional)
npm run generate for the interactive runner.
MDX Conventions
Frontmatter format:<Card>, <CardGroup>, <CodeGroup>, <Accordion>, <AccordionGroup>, <Tip>, <Info>, <Warning>, <Note>, <Steps>, <Columns>.
Agent Skills (skills/)
Per-product reference files for AI agent consumption, generated by step 8 of the pipeline. Each product has a hand-authored SKILL.md routing index and auto-generated references/*.md files.
node s/generate-llm-txt.js.
Key conventions for skills content:
- SKILL.md must have YAML frontmatter with
nameanddescriptionfields (per agent skills spec) descriptionis the primary trigger mechanism — include what the skill does, trigger contexts, and cross-routing to sibling skills- SKILL.md body should stay generic (no hardcoded endpoint counts/chain lists); delegate specifics to auto-generated reference files
- Reference file tables use “When to read” column to guide the model
- Reference files must be self-contained: no links to repo MDX pages, only external URLs and
#sectionanchors - MDX imports and
[Read more]links are stripped during generation; local links[text](/path)→**text**(bold) - Foundational API reference files include structured parameter and response field tables extracted from the OpenAPI spec (
api-reference/openapi.json) - Content headings from source MDX files are bumped down one level in
formatEndpointSection()to nest correctly under the endpoint H2
Key Files
docs.json— Mintlify site config and navigation trees/run.js— TUI orchestrator for generation pipelines/generate-llm-txt.js— generatesllms.txt,llms-full.txt, andskills/*/references/*.mds/sdk-methods-mapping.json— maps TypeScript SDK methods to OpenAPI operationsapi-defn/src/— Conjure YAML schema definitions (base, balances, nft, transactions, queries, subscriptions)data/— intermediate JSON data files consumed by generation scripts