subgraphs-skills
Expert knowledge for developing, testing, and optimizing subgraphs with The Graph protocol
Open source Repository Open in the app JSON README (API)
About
Expert knowledge for developing, testing, and optimizing subgraphs with The Graph protocol
Details
- Kind
- Plugins
- Topic
- Developer tools
- Publisher
- paulieb14
- Origin
- marketplace
- Category
- ferramentas
- Forks
- 1
- Last push
- 2026-04-09T21:02:06Z
- Repository state
- ativo
- Language
- JavaScript
- License
- MIT
- Added
- 2026-08-30 01:48:58
- Updated
- 2026-08-30 01:48:58
- Origin id
paulieb14/subgraphs-skills/subgraphs-skills
README
# Subgraphs Skills [](https://claude.ai/claude-code) [](https://github.com/openclaw/openclaw) [](https://thegraph.com/) [](LICENSE) A collection of AI agent skills providing expert knowledge for developing, testing, and deploying subgraphs with [The Graph](https://thegraph.com/) 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-dev 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 ```bash # Add as a Claude Code plugin claude plugins add PaulieB14/subgraphs-skills ``` ### OpenClaw / Clawdbot ```bash # Copy skills to OpenClaw directory cp -r openclaw/subgraph-* ~/.openclaw/skills/ # Or via ClawHub (when published) clawdbot skill install subgraph-dev clawdbot skill install subgraph-optimization clawdbot skill install subgraph-testing ``` ### Manual Clone this repository and reference it in your agent's configuration. ## Repository Structure ``` subgraphs-skills/ โโโ .claude-plugin/ โ โโโ manifest.json # Claude Code plugin metadata โโโ skills/ # Claude Code format โ โโโ subgraph-dev/ โ โ โโโ SKILL.md โ โ โโโ references/ โ โ โโโ schema-types.md โ โ โโโ assemblyscript-api.md โ โ โโโ subgraph-composition.md โ โ โโโ subgraph-uncrashable.md โ โ โโโ patterns.md โ โโโ subgraph-optimization/ โ โ โโโ SKILL.md โ โ โโโ references/ โ โ โโโ performance-benchmarks.md โ โโโ subgraph-testing/ โ โโโ SKILL.md โ โโโ references/ โ โโโ matchstick-api.md โ โโโ subgraph-linter.md โ โโโ common-errors.md โโโ openclaw/ # OpenClaw format (YAML frontmatter) โ โโโ README.md โ โโโ subgraph-dev/ โ โ โโโ SKILL.md โ โโโ subgraph-optimization/ โ โ โโโ SKILL.md โ โโโ subgraph-testing/ โ โโโ SKILL.md โโโ examples/ # Working code examples โ โโโ README.md โ โโโ erc20-token/ โโโ scripts/ โโโ package.json โโโ README.md ``` ## Usage 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 - [The Graph Documentation](https://thegraph.com/docs/) - [Subgraph Best Practices](https://thegraph.com/docs/en/subgraphs/best-practices/pruning/) - [Subgraph Composition](https://thegraph.com/docs/en/subgraphs/guides/subgraph-composition/) - Combine multiple subgraphs - [Subgraph Linter](https://thegraph.com/docs/en/subgraphs/developing/subgraph-linter/) - Static analysis tool - [Subgraph Uncrashable](https://thegraph.com/docs/en/subgraphs/developing/subgraph-uncrashable/) - Safe code generation - [Matchstick Testing Framework](https://thegraph.com/docs/en/subgraphs/developing/creating/unit-testing-framework/) - [AssemblyScript API](https://thegraph.com/docs/en/subgraphs/developing/creating/assemblyscript-api/) ## Platforms This skill pack works with: | Platform | Description | Link | |----------|-------------|------| | **Claude Code** | Anthropic's official CLI for Claude | [claude.ai/claude-code](https://claude.ai/claude-code) | | **OpenClaw** | Open-source AI agent framework | [github.com/openclaw/openclaw](https://github.com/openclaw/openclaw) | ## Contributing Contributions are welcome! Please feel free to submit issues and pull requests. ## Acknowledgments - Built with [Claude](https://claude.ai) (Anthropic's AI assistant) - Subgraph expertise from [The Graph Documentation](https://thegraph.com/docs/) - Inspired by [AGENTS.md](https://github.com/agentsmd/agents.md) format - OpenClaw format based on [substreams-skills](https://github.com/streamingfast/substreams-skills) ## License MIT