subgraph-development-guide

subgraph-development-guide is a skill for Claude Code, Codex from nirholas/three.ws. It costs 59 tokens per session (2,139 once invoked), scanned A, original, Apache-2.0.

A guide to The Graph, a system that turns blockchain events into searchable GraphQL APIs. It explains subgraph structure, data schemas, event handlers, deployment, and queries.

In plain words
What is it for?
Use it to build indexes for decentralized-exchange data, token transfers, and DeFi protocol events, then expose that data through GraphQL.
Why use it?
Reading blockchain data directly can require slow, sequential requests and makes totals or relationships difficult to calculate. A subgraph processes and stores the data in a structured form for easier querying.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is file: ./abis/ERC20.json.

Good fit Use it to build indexes for decentralized-exchange data, token transfers, and DeFi protocol events, then expose that data through GraphQL.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/nirholas/three.ws
agentmods
npx agentmods add skills/nirholas/three.ws/subgraph-development-guide

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for subgraph-development-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/three.ws/subgraph-development-guide/github.svg)](https://agentmods.dev/skills/nirholas/three.ws/subgraph-development-guide)
Your own site
<a href="https://agentmods.dev/skills/nirholas/three.ws/subgraph-development-guide"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/subgraph-development-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for subgraph-development-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/nirholas/three.ws/subgraph-development-guide"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/subgraph-development-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,139 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.02139
Opus 5.5 $0.00024 $0.00856
Sonnet 5.5 $0.00012 $0.00428
Haiku 4.5 $0.00006 $0.00214

Measured 2mo ago against content hash 44083c971082, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

subgraph-development-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

data/skills/development/subgraph-development-guide/SKILL.md · 298 lines

How it starts

The opening of the file, as written. The whole thing — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Subgraph Development Guide

The Graph is the indexing protocol for blockchain data. Subgraphs turn raw blockchain events into queryable GraphQL APIs. This guide covers how they work and how to build them.

Why Subgraphs?

The Problem

Reading blockchain data directly is painful:

  • RPC calls are slow and sequential
  • No aggregation (can't query "total volume last 7 days")
  • No relationships (can't join swaps with token metadata)
  • Rate limits on public RPCs

The Solution

Subgraphs listen to blockchain events, process them, and store structured data:

Blockchain Events → Subgraph Indexer → GraphQL API
(Swap, Transfer,    (Processes,        (Fast queries,
 Mint, Burn)         aggregates)        relationships)

Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│  1. Schema       │    │  2. Mappings     │    │  3. Manifest     │
│  (GraphQL types) │    │  (Event handlers)│    │  (subgraph.yaml) │
│                  │    │                  │    │                  │
│  type Token {    │    │  handleSwap(e) { │    │  dataSources:    │
│    id: ID!       │    │    // process    │    │    - name: Pool  │
│    symbol: String│    │    // and save   │    │      source:     │
│    volume: BigInt│    │  }              │    │        abi: Pool  │
│  }              │    │                  │    │        address:   │
└─────────────────┘    └─────────────────┘    └─────────────────┘

Three Core Files

File Purpose
schema.graphql Define your data model (entities)
src/mapping.ts Event handler functions (AssemblyScript)
subgraph.yaml Manifest — which contracts, events, and chains to index

Building a Token Transfer Tracker

Step 1: Schema (schema.graphql)

type Token @entity {
  id: ID!                       # Contract address
  symbol: String!
  name: String!
  decimals: Int!
  totalSupply: BigInt!
  transferCount: BigInt!
  holderCount: BigInt!
}

type Transfer @entity {
  id: ID!                       # tx hash + log index
  token: Token!
  from: Bytes!
  to: Bytes!
  value: BigDecimal!
  timestamp: BigInt!
  blockNumber: BigInt!
}

type Account @entity {
  id: ID!                       # Wallet address
  balances: [AccountBalance!]! @derivedFrom(field: "account")
}

type AccountBalance @entity {
  id: ID!                       # account-token
  account: Account!
  token: Token!
  balance: BigDecimal!
}

Read the full file on GitHub · 298 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 298 lines · 59 tokens per session scan A 44083c971082

Subscribe to this mod's changes

subgraph-development-guide is a skill published in the GitHub repository nirholas/three.ws (287 stars, last pushed yesterday), licensed Apache-2.0. It adds 59 tokens to every session and 2,139 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

subgraph-development-guide compared with skills from other repositories

subgraph-development-guide next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
subgraph-development-guidenirholas/three.wsSkill287yesterdayApache-2.0A59Claude Code, Codex
solana-devsolana-foundation/solana-dev-skillSkill59726d agoMITA258Claude Code, Codex
integrating-jupiterinternet-court/internet-court-skillSkill7.2k6d agononeA59Claude Code
vybe-api-explorervybenetwork/solana-mcp-vybeSkill3.2k4d agononeA35Claude Code, Codex
slv-rpc-gatewayValidatorsDAO/slvSkill9511d agoApache-2.0B67Claude Code, Codex
heliushelius-labs/core-aiSkill332d agoMITA0Claude Code, Codex
debridgesendaifun/skillsSkill1284mo agoApache-2.0A48Claude Code, Codex