AI Suite
2 minutes
Agent Skills for Subgraphs
A collection of AI agent skills providing expert knowledge for developing, testing, and deploying subgraphs with The Graph protocol.
Overview
This repository provides subgraph development expertise for AI coding assistants in two formats:
| Format | Location | Use With |
|---|---|---|
| Claude Code Plugin | skills/ | Claude Code CLI |
| OpenClaw Skills | openclaw/ | OpenClaw / Clawdbot |
Same knowledge, different agent platforms.
Skills
Subgraph Development
Core development knowledge including:
- Schema design and GraphQL types
- Manifest configuration (subgraph.yaml)
- AssemblyScript mapping handlers
- Data source templates
- Contract bindings and calls
- Subgraph Composition - Combine multiple subgraphs
- Common Patterns - ERC20, DEX, NFT, Lending, Staking, Governance
- Subgraph Uncrashable (safe code generation)
- Deployment workflows
Subgraph Optimization
Performance best practices from The Graph docs:
- Pruning with indexerHints
- Arrays with
@derivedFrom - Immutable entities and Bytes as IDs
- Avoiding
eth_calls - Timeseries and aggregations
- Grafting for hotfixes
Subgraph Testing
Quality assurance with Matchstick and Subgraph Linter:
- Subgraph Linter - Static analysis to catch bugs before runtime
- Common Errors - Troubleshooting guide for indexing issues
- Unit testing setup and patterns with Matchstick
- Mock events and contract calls
- Entity assertions
- Data source mocking
- CI/CD integration
Installation
Claude Code
1# Add as a Claude Code plugin2claude plugins add PaulieB14/subgraphs-skillsOpenClaw / Clawdbot
1# Copy skills to OpenClaw directory2cp -r openclaw/subgraph-* ~/.openclaw/skills/34# Or via ClawHub (when published)5clawdbot skill install subgraph-dev6clawdbot skill install subgraph-optimization7clawdbot skill install subgraph-testingUsage Examples
Once installed, the AI assistant will have access to subgraph development expertise:
Schema Design:
“Create a schema for tracking DEX swaps with proper relationships”
Optimization:
“How do I optimize my subgraph for faster indexing?”
Testing:
“Write unit tests for my Transfer event handler”
Resources
- Subgraph Best Practices
- Subgraph Composition - Combine multiple subgraphs
- Subgraph Linter - Static analysis tool
- Subgraph Uncrashable - Safe code generation
- Matchstick Testing Framework
- AssemblyScript API
Platforms
This skill pack works with:
| Platform | Description | Link |
|---|---|---|
| Claude Code | Anthropic’s official CLI for Claude | claude.ai/claude-code |
| OpenClaw | Open-source AI agent framework | github.com/openclaw/openclaw |
Acknowledgments
- Built with Claude (Anthropic’s AI assistant)
- Subgraph expertise from The Graph Documentation
- Inspired by AGENTS.md format
- OpenClaw format based on substreams-skills