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 agentmods add skills/g1joshi/agent-skills/graphqlnpx skills add G1Joshi/Agent-Skills --skill graphqlgit clone --depth 1 https://github.com/G1Joshi/Agent-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/g1joshi/agent-skills/graphql)<a href="https://agentmods.dev/skills/g1joshi/agent-skills/graphql"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/graphql.svg" alt="Measured on agentmods" 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.00015 | $0.00577 |
| Opus 5 | $0.00008 | $0.00289 |
| Sonnet 5 | $0.00003 | $0.00115 |
| Haiku 4.5 | $0.00002 | $0.00058 |
Grade A, and why
graphql 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 6d ago.
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 — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GraphQL
GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. It gives clients the power to ask for exactly what they need and nothing more.
When to Use
- Mobile Apps: Minimize bandwidth by fetching only needed fields.
- Complex Systems: Fetching related data (User + Orders + Products) in a single request.
- Rapid Iteration: Frontend can change data requirements without Backend changes.
Quick Start
# The Schema
type User {
id: ID!
name: String!
orders: [Order]
}
type Query {
user(id: ID!): User
}
// The Query (Client)
query {
user(id: "123") {
name
orders {
total
status
}
}
}
Core Concepts
Schema First
The schema (.graphql) is the contract. Teams agree on the schema before writing code.
Resolvers
Functions that fetch the data for a specific field in the schema.
Strong Typing
Every field has a specific type (Int, String, Object). Validation happens automatically.
Common Patterns
n+1 Problem
Fetching a list of users and then firing a separate DB query for each user's address.
- Solution: DataLoader. Batches requests into a single query (
WHERE id IN (...)).
Federation
Splitting a single GraphQL graph across multiple services (Microservices). Apollo Federation is the standard.
Best Practices
Do:
- Use Fragments on the client to reuse query logic.
- Limit Query Depth to prevent DoS attacks (e.g.,
user { friends { friends { friends ... } } }). - Use Cursor-based Pagination for infinite scrolling lists.
Don't:
- Don't simply wrap a REST API 1:1. Redesign for the Graph.
- Don't utilize it for simple binary file uploads (use Signed URLs + REST/S3 for that).
Troubleshooting
| Error | Cause | Solution |
|---|---|---|
Cannot query field |
Typo or field restricted. | Check Schema and Introspection. |
N+1 Performance |
Slow response on lists. | Implement DataLoader. |
Caching |
Hard to cache via HTTP. | Use Normalized Caching in Client (Apollo Client/Urql). |
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.
- 6d ago First seen · 95 lines · 15 tokens per session scan A 5e3886d5f561
graphql is a skill published in the GitHub repository G1Joshi/Agent-Skills (12 stars, last pushed 6mo ago), licensed MIT. It adds 15 tokens to every session and 577 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-08-30.
Other skills, from other repositories
api-and-interface-design
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
component-identification-sizing
Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use…
evolutionary-modular-architecture
Guides design and implementation of evolutionary modular-monolith platforms with DDD (strategic + tactical), flat-by-aggregate organization, an Anti-Corruption Layer for vendor independence, a transactional outbox for events, smart resilience (backoff with jitter, circuit breakers, idempotency), and a polished…
nestjs-modular-monolith
Specialist in designing and implementing scalable modular monolith architectures using NestJS with DDD, Clean Architecture, and CQRS patterns. Use when building modular monolith backends, designing bounded contexts, creating domain modules, implementing event-driven module communication, or when user mentions "modular…
rails-dev
Opinionated Rails conventions: rich models, concerns, CRUD-everything, state-as-records, minimal dependencies, Minitest with fixtures. Load this skill BEFORE any code-level thinking, not only before editing a file. It is required the moment a task touches Rails code in ANY way: designing or even just discussing a data…
modular-decomposition
Runs a sequenced monolith-to-modular pipeline that sizes and inventories components, finds shared domain duplication, addresses flattening and hierarchy issues, analyzes coupling, then groups components into candidate domain-aligned units, with optional embedded DDD strategic analysis for bounded contexts. Use when…