Skip to content
Agentmart
Submit a tool

CLAUDE.md · subquery/subql

CLAUDE.md from subquery/subql: 113 lines covering Plan and Reivew, Development Commands, Project Architecture.

Template by subquery

IndexedGPL-3.0★ 18,725
Write a review

Chalk Labs

Need help deploying CLAUDE.md · subquery/subql?

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 Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/subquery/subql/main/CLAUDE.md -o CLAUDE.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 CLAUDE.md file that subquery/subql (18,725 stars) keeps for coding agents. It has 113 lines in 3 sections: Plan and Reivew; Development Commands; Project Architecture. Use it as a model for your own project's instructions.

Use cases: code-generation

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

A CLAUDE.md file: project memory Claude Code loads at the start of every session.

For
Claude Code
Length
113 lines
File
CLAUDE.md

Sections

  1. Plan and Reivew
  2. Development Commands
  3. Project Architecture

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

# CLAUDE.md

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


## Plan and Reivew

### Before Starting work
- Always in planning mode, to make a plan
- After the plan is made, make sure to write the plan to ./.claude/tasks/TASK_NAME.md
- The plan should be a detailed implementation and the reasoning behind them as well as the tasks broken down
- If the task requires external knowledge or certain dependencies, also research to get the latest knowledge. (Use the Task tool for research)
- Don't over plan it, always design an MVP
- Once you make the plan, firstly ask me to review it . Do not continue until I approve the plan

### While implementing
- The plan should be updated as you work
- After completing tasks in the plan you should append a detailed description of the channges you made, so the following tasks can be handed over to other engineers

## Development Commands

### Building
- `yarn build` - Build all packages in the workspace using TypeScript
- Individual package builds use `tsc -b` and copy necessary files (e.g., CLI templates)

### Testing
- `yarn test` - Run Jest tests with coverage in UTC timezone
- `yarn test:ci` - Run tests in CI mode with specific patterns
- `yarn test:docker` - Run tests in Docker containers

### Linting and Code Quality
- `yarn lint` - Run ESLint across all TypeScript files in packages
- Uses ESLint with TypeScript support, Prettier, and various plugins
- Configured with husky pre-commit hooks and lint-staged

### CLI-Specific Commands (packages/cli)
- `yarn build` - Builds CLI and copies templates to lib/
- `yarn format` - Format code using Prettier
- `yarn codegen` - Generate GraphQL and API client code
- `yarn codegen:graphql` - Generate GraphQL types
- `yarn codegen:chs` - Generate consumer host service API client

## Project Architecture

### Monorepo Structure
This is a Yarn workspace monorepo containing multiple packages:

- **`@subql/cli`** - Command-line interface for SubQuery projects (OCLIF-based)
- **`@subql/node`** - Substrate-specific SubQuery indexer implementation
- **`@subql/node-core`** - Core chain-agnostic indexing functionality
- **`@subql/query`** - GraphQL query service
- **`@subql/common`** - Shared utilities and types
- **`@subql/common-substrate`** - Substrate-specific common utilities
- **`@subql/types-core`** - Core type definitions
- **`@subql/utils`** - General utility functions

### CLI Commands Architecture
The CLI uses OCLIF framework with commands organized by functionality:

- **Core project lifecycle**: `init`, `build`, `publish`
- **Code generation**: `codegen` (GraphQL types, ABI imports)
- **Multi-chain support**: `multi-chain add`
- **Network operations**: Commands for SubQuery Network (deployments, projects, API keys, boosts)
- **OnFinality hosting**: Project and deployment management
- **Migration tools**: Project upgrade utilities
- **MCP integration**: Model Context Protocol support for AI tools

### Key Technologies
- **TypeScript** throughout with strict configuration
- **OCLIF** for CLI framework
- **Jest** for testing with custom module mapping for workspace packages
- **ESBuild** and **Webpack** for bundling
- **GraphQL** code generation
- **Zod** for schema validation
- **Ethers.js** for Ethereum integration
- **WalletConnect** for wallet interactions

### Development Patterns

#### Package Dependencies
Uses Yarn workspace protocol (`workspace:~`) for internal package dependencies to ensure proper linking during development.

#### Testing Setup
- Custom Jest configuration with module name mapping for workspace packages
- UTC timezone enforcement for consistent test behavior
- Coverage collection across multiple packages
- Special handling for Polkadot packages in transform ignore patterns

#### CLI Command Structure
Commands follow a consistent pattern:
- Input validation using Zod schemas
- Adapter functions for shared logic between CLI and MCP modes
- Structured logging and error handling
- Progress indication using ora spinner

#### MCP Integration
The CLI supports Model Context Protocol for AI tool integration, allowing commands to be executed through AI interfaces like Cursor.

### Build System
- TypeScript compilation with project references
- Template copying for CLI (EJS templates in src/template → lib/template)
- OCLIF manifest generation for command discovery
- Automatic README generation from command help

### Network Support
SubQuery supports multiple blockchain networks:
- Polkadot/Substrate (primary)
- Ethereum and EVM-compatible chains
- Cosmos/CosmWasm
- Algorand, NEAR, Stellar, Solana, Starknet, Concordium

Each network has its own implementation repository, with this repo containing the core Substrate implementation and shared components.

Signals

Stars
18,725
Forks
398
Open issues
61
Last commit (this folder)
Sep 11, 2025 (1 year ago)
Last release
Apr 1, 2026 (7 months 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 CLAUDE.md · subquery/subql 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 CLAUDE.md · subquery/subql?

CallGet help
Cite this page

CLAUDE.md · subquery/subql. Agent Mart. https://agentmart.dev/templates/subquery-subql-claude-md (last updated 2026-10-24)