Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add alivirgo/Major-AI-Skills --skill graphql-introspection-trimmergit clone --depth 1 https://github.com/alivirgo/Major-AI-SkillsWrote 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.
[](https://agentmods.dev/skills/alivirgo/major-ai-skills/graphql-introspection-trimmer)<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/graphql-introspection-trimmer"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/graphql-introspection-trimmer/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.
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/graphql-introspection-trimmer"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/graphql-introspection-trimmer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00025 | $0.01226 |
| Opus 5 | $0.00013 | $0.00613 |
| Sonnet 5 | $0.00005 | $0.00245 |
| Haiku 4.5 | $0.00003 | $0.00123 |
Grade A, and why
graphql-introspection-trimmer 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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.
Full Introspection Dump vs. Targeted Subgraph SDL
┌─────────────────────────────────────────────────────────────┐
│ GraphQL Schema Context Impact │
│ │
│ Full Introspection JSON Dump (65,000 Tokens): │
│ • 420 Object Types (Billing, Inventory, Webhooks, Admin) │
│ • 180 Mutations & Subscriptions │
│ • 1,200 Field descriptions and deprecation reasons │
│ ↳ 65,000 tokens billed, blows context limit │
│ │
│ Targeted Subgraph SDL (240 Tokens - 99.6% Reduction!): │
│ type Query { getUser(id: ID!): User } │
│ type User { id: ID!, email: String!, role: Role! } │
│ enum Role { ADMIN, MEMBER, VIEWER } │
│ ↳ 240 clean tokens, exact type contracts preserved │
└─────────────────────────────────────────────────────────────┘
The 3-Step Schema Pruning Algorithm
┌───────────────────────────────────────────────────────────────────────────┐
│ 1. IDENTIFY ROOT OPERATION: Target query (e.g. `Query.searchProducts`) │
│ 2. RECURSIVE TYPE RESOLUTION: Follow field return types & input arguments │
│ 3. STRIP METADATA: Drop description strings, `@deprecated`, & uncalled SDL│
└───────────────────────────────────────────────────────────────────────────┘
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.
- yesterday Changed · -13 tokens per session 6b819db0c191
- 7d ago First seen · 126 lines · 38 tokens per session scan A 55edc18827b0
graphql-introspection-trimmer is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 1,226 once invoked, about $0.0001 per session on Opus 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-05.
Other skills, from other repositories
api-design-principles-v2
API Design Principles workflow skill. Use this skill when the user needs Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers and stand the test of time and the operator should preserve the upstream workflow, copied support files, and provenance…
api-patterns
API Patterns workflow skill. Use this skill when the user needs API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
api-design-principles
API Design Principles workflow skill. Use this skill when the user needs Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers and stand the test of time and the operator should preserve the upstream workflow, copied support files, and provenance…
pipefy-introspection
Use this skill when you need to discover GraphQL type shapes, mutation signatures, enum values, or execute arbitrary GraphQL as a fallback. This is the first fallback tier (Tier 2) when dedicated MCP tools fail or don't exist for an operation. 7 MCP tools.
azure-communication-services
Expert knowledge for Azure Communication Services development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when building ACS calling/chat apps, SMS/email senders, Teams interop…
algolia-search-v2
Algolia Search Integration workflow skill. Use this skill when the user needs Expert patterns for Algolia search implementation, indexing and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.