graphql-introspection-trimmer
Installation
SKILL.md
GraphQL Schema & Introspection Trimming Protocol
Overview
When integrating with or debugging a GraphQL API, agents often run full schema introspection queries (__schema { types { name fields { name type } } }) or ingest full 10,000-line schema.graphql SDL files.
Full schema introspection results in massive Context Overflow: a production enterprise GraphQL schema (Shopify, GitHub, Stripe) is 500KB to 3MB of raw JSON (consuming 80,000+ tokens), even if the agent only needs to query 2 fields on the User object.
The GraphQL Schema Trimming Protocol parses the schema AST and extracts strictly the targeted operation and its transitively referenced types, discarding unreferenced queries, mutations, and deprecated fields.