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 seaworld008/Commonly-used-high-value-skills --skill graphql-expertgit clone --depth 1 https://github.com/seaworld008/Commonly-used-high-value-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/seaworld008/commonly-used-high-value-skills/graphql-expert)<a href="https://agentmods.dev/skills/seaworld008/commonly-used-high-value-skills/graphql-expert"><img src="https://agentmods.dev/badge/skills/seaworld008/commonly-used-high-value-skills/graphql-expert/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/seaworld008/commonly-used-high-value-skills/graphql-expert"><img src="https://agentmods.dev/badge/skills/seaworld008/commonly-used-high-value-skills/graphql-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00033 | $0.01483 |
| Opus 5.5 | $0.00013 | $0.00593 |
| Sonnet 5.5 | $0.00007 | $0.00297 |
| Haiku 4.5 | $0.00003 | $0.00148 |
Grade A, and why
graphql-expert 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 12d 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GraphQL Expert
触发条件
- 当需要设计现代、高效的 Web/Mobile API,且 REST API 面临“Over-fetching”或“Under-fetching”问题时。
- 在构建具有复杂关联关系的数据模型(如社交网络、电商平台)时。
- 需要在多个微服务之上构建统一的数据聚合层(Federation/Gateway)时。
- 系统对实时通信有需求,需要使用 WebSocket 实现 GraphQL Subscriptions 时。
- 需要在同一个 API 端点支持多个版本的客户端,且不希望频繁变更 API 路径时。
核心能力
1. Schema 设计哲学 (Design Paradigms)
- Schema-first: 优先定义 SDL (Schema Definition Language)。便于前后端并行开发,利于契约化管理。
- Code-first: 根据代码自动生成 Schema。减少定义冗余,提升类型安全(如 TypeScript + GraphQL Nexus)。
- 字段细粒度控制: 遵循“单一职责”原则定义每一个 Query 和 Mutation 字段。
- Scalar 类型扩展: 自定义 Date, Email, BigInt 等自定义标量,增强校验能力。
2. 高级查询与 Resolver 模式
- Resolver 分层: 业务逻辑与数据获取逻辑分离,保持 Resolver 的简洁性。
- N+1 问题详解:
- 传统 Resolver 在循环查询关联对象时会发起大量重复数据库调用。
- 解决方案: 使用 DataLoader。通过对请求进行批处理(Batching)和缓存(Caching),将 $N+1$ 次查询合并为 1-2 次。
- 异步处理: Resolver 全面采用 Promise/Async-await 模式,支持并发数据抓取。
3. 分页与数据导航 (Pagination)
- Offset Pagination: 适用于简单的列表,支持随机访问。缺点是大数据量下数据库
OFFSET性能低下。 - Cursor-based Pagination (Relay Spec): 使用
edges,node,pageInfo结构。推荐用于大数据量和无限滚动场景,具有卓越的数据库查询性能。 - Connection 规范: 统一化所有分页字段的命名习惯,便于前端通用组件复用。
4. 实时性与性能优化 (Performance & Real-time)
- Subscriptions: 基于 WebSockets 的双向长连接,用于向客户端推送增量更新。
- Fragment 复用: 提高查询的可维护性,确保多个组件对同一份数据的获取始终一致。
- Persisted Queries: 客户端发送查询的 Hash 而非完整的字符串。优点:显著降低网络载荷,防止恶意查询注入。
- Query Complexity Analysis: 计算查询的深度和字段权重,在服务器端拦截掉过度复杂的“拒绝服务”查询。
5. 安全性与认证授权 (Security & Auth)
- 认证 (Authentication): 通常在 Context 注入时完成。
- 授权 (Authorization):
- Field-level Auth: 在 Resolver 层对字段访问权限进行精细化控制。
- Directive Auth: 使用
@auth指令在 Schema 层面直接声明访问控制。
- 输入校验: 严格利用 GraphQL 强类型系统 + 合规库对输入 Input 对象进行深度校验。
- 防反爬/防爆破: 实现基于 API 成本或复杂度的 Rate Limiting。
常用命令/模板
Schema 定义模板 (SDL)
type User {
id: ID!
username: String!
posts(first: Int, after: String): PostConnection! @auth(role: "USER")
}
type Query {
me: User
searchPosts(keyword: String!): [Post]
}
type Mutation {
createPost(content: String!): Post
}
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.
- 12d ago Changed 1d3a8428b6cc
- 13d ago Changed · +9 lines eee156d6c7b8
- 2mo ago First seen · 123 lines · 33 tokens per session scan A 16016d2a6375
graphql-expert is a skill published in the GitHub repository seaworld008/Commonly-used-high-value-skills (75 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 1,483 once invoked, about $0.0001 per session on Opus 5.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-03.
graphql-expert compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| graphql-expertseaworld008/Commonly-used-high-value-skills | Skill | 75 | today | MIT | A | 33 | Claude Code, Codex |
| extension-developmentalfredxw/denova | Skill | 1.1k | yesterday | Apache-2.0 | A | 21 | Claude Code, Codex |
| managing-mcp-serversJetBrains/thinkrail | Skill | 8.5k | today | Apache-2.0 | A | 62 | Claude Code, Codex |
| todosJetBrains/thinkrail | Skill | 8.5k | today | Apache-2.0 | A | 58 | Claude Code, Codex |
| writing-workflow-skillsJetBrains/thinkrail | Skill | 8.5k | today | Apache-2.0 | A | 60 | Claude Code, Codex |
| omh-agent-evaluationrlaope/oh-my-hermes | Skill | 6.2k | today | MIT | A | 71 | Claude Code, Codex |
| omh-model-optimizationrlaope/oh-my-hermes | Skill | 6.2k | today | MIT | A | 77 | Claude Code, Codex |