{
  "markdown": "# Subgraphs Skills\n\n[![Claude Code](https://img.shields.io/badge/Claude%20Code-Plugin-blueviolet)](https://claude.ai/claude-code)\n[![OpenClaw](https://img.shields.io/badge/OpenClaw-Skills-orange)](https://github.com/openclaw/openclaw)\n[![The Graph](https://img.shields.io/badge/The%20Graph-Subgraphs-blue)](https://thegraph.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\nA collection of AI agent skills providing expert knowledge for developing, testing, and deploying subgraphs with [The Graph](https://thegraph.com/) protocol.\n\n## Overview\n\nThis repository provides subgraph development expertise for AI coding assistants in **two formats**:\n\n| Format | Location | Use With |\n|--------|----------|----------|\n| **Claude Code Plugin** | `skills/` | Claude Code CLI |\n| **OpenClaw Skills** | `openclaw/` | OpenClaw / Clawdbot |\n\nSame knowledge, different agent platforms.\n\n## Skills\n\n### 🛠️ subgraph-dev\nCore development knowledge including:\n- Schema design and GraphQL types\n- Manifest configuration (subgraph.yaml)\n- AssemblyScript mapping handlers\n- Data source templates\n- Contract bindings and calls\n- **Subgraph Composition** - Combine multiple subgraphs\n- **Common Patterns** - ERC20, DEX, NFT, Lending, Staking, Governance\n- Subgraph Uncrashable (safe code generation)\n- Deployment workflows\n\n### ⚡ subgraph-optimization\nPerformance best practices from The Graph docs:\n- Pruning with indexerHints\n- Arrays with @derivedFrom\n- Immutable entities and Bytes as IDs\n- Avoiding eth_calls\n- Timeseries and aggregations\n- Grafting for hotfixes\n\n### 🧪 subgraph-testing\nQuality assurance with Matchstick and Subgraph Linter:\n- **Subgraph Linter** - Static analysis to catch bugs before runtime\n- **Common Errors** - Troubleshooting guide for indexing issues\n- Unit testing setup and patterns with Matchstick\n- Mock events and contract calls\n- Entity assertions\n- Data source mocking\n- CI/CD integration\n\n## Installation\n\n### Claude Code\n\n```bash\n# Add as a Claude Code plugin\nclaude plugins add PaulieB14/subgraphs-skills\n```\n\n### OpenClaw / Clawdbot\n\n```bash\n# Copy skills to OpenClaw directory\ncp -r openclaw/subgraph-* ~/.openclaw/skills/\n\n# Or via ClawHub (when published)\nclawdbot skill install subgraph-dev\nclawdbot skill install subgraph-optimization\nclawdbot skill install subgraph-testing\n```\n\n### Manual\n\nClone this repository and reference it in your agent's configuration.\n\n## Repository Structure\n\n```\nsubgraphs-skills/\n├── .claude-plugin/\n│   └── manifest.json           # Claude Code plugin metadata\n├── skills/                     # Claude Code format\n│   ├── subgraph-dev/\n│   │   ├── SKILL.md\n│   │   └── references/\n│   │       ├── schema-types.md\n│   │       ├── assemblyscript-api.md\n│   │       ├── subgraph-composition.md\n│   │       ├── subgraph-uncrashable.md\n│   │       └── patterns.md\n│   ├── subgraph-optimization/\n│   │   ├── SKILL.md\n│   │   └── references/\n│   │       └── performance-benchmarks.md\n│   └── subgraph-testing/\n│       ├── SKILL.md\n│       └── references/\n│           ├── matchstick-api.md\n│           ├── subgraph-linter.md\n│           └── common-errors.md\n├── openclaw/                   # OpenClaw format (YAML frontmatter)\n│   ├── README.md\n│   ├── subgraph-dev/\n│   │   └── SKILL.md\n│   ├── subgraph-optimization/\n│   │   └── SKILL.md\n│   └── subgraph-testing/\n│       └── SKILL.md\n├── examples/                   # Working code examples\n│   ├── README.md\n│   └── erc20-token/\n├── scripts/\n├── package.json\n└── README.md\n```\n\n## Usage Examples\n\nOnce installed, the AI assistant will have access to subgraph development expertise:\n\n**Schema Design:**\n> \"Create a schema for tracking DEX swaps with proper relationships\"\n\n**Optimization:**\n> \"How do I optimize my subgraph for faster indexing?\"\n\n**Testing:**\n> \"Write unit tests for my Transfer event handler\"\n\n## Resources\n\n- [The Graph Documentation](https://thegraph.com/docs/)\n- [Subgraph Best Practices](https://thegraph.com/docs/en/subgraphs/best-practices/pruning/)\n- [Subgraph Composition](https://thegraph.com/docs/en/subgraphs/guides/subgraph-composition/) - Combine multiple subgraphs\n- [Subgraph Linter](https://thegraph.com/docs/en/subgraphs/developing/subgraph-linter/) - Static analysis tool\n- [Subgraph Uncrashable](https://thegraph.com/docs/en/subgraphs/developing/subgraph-uncrashable/) - Safe code generation\n- [Matchstick Testing Framework](https://thegraph.com/docs/en/subgraphs/developing/creating/unit-testing-framework/)\n- [AssemblyScript API](https://thegraph.com/docs/en/subgraphs/developing/creating/assemblyscript-api/)\n\n## Platforms\n\nThis skill pack works with:\n\n| Platform | Description | Link |\n|----------|-------------|------|\n| **Claude Code** | Anthropic's official CLI for Claude | [claude.ai/claude-code](https://claude.ai/claude-code) |\n| **OpenClaw** | Open-source AI agent framework | [github.com/openclaw/openclaw](https://github.com/openclaw/openclaw) |\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues and pull requests.\n\n## Acknowledgments\n\n- Built with [Claude](https://claude.ai) (Anthropic's AI assistant)\n- Subgraph expertise from [The Graph Documentation](https://thegraph.com/docs/)\n- Inspired by [AGENTS.md](https://github.com/agentsmd/agents.md) format\n- OpenClaw format based on [substreams-skills](https://github.com/streamingfast/substreams-skills)\n\n## License\n\nMIT\n",
  "bytes": 5390,
  "sha": "df559698411161cc7c70680b46c450d196e12f66136bb0d812b8c3a8dc27df63",
  "repo_slug": "paulieb14/subgraphs-skills",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_paulieb14_subgraphs_skills_subgraphs_ski_35fbf779/readme"
}