graphql-expert · travisjneuman — скилл для Claude Code: что делает и как установить
Скилл graphql-expert для Claude Code помогает проектировать схемы GraphQL, писать резолверы и оптимизировать запросы. Включается при создании API или настройке DataLoader.
MIT 132 установок ★ 114 обновлён 2026-11-10
npx skills add travisjneuman/.claude --skill graphql-expert -a claude-codeЧто делает graphql-expert
Скилл задаёт правила проектирования GraphQL API: структуру скаляров и интерфейсов, правила nullability, мутации через input-типы и оформление корневых типов Query, Mutation и Subscription. Агент обращается к нему при создании схем, реализации резолверов или оптимизации производительности.
Внутрь вынесены справочные файлы по пагинации, пакетным мутациям, контексту резолверов, авторизации и форматированию ошибок. Для устранения проблемы N+1 используется DataLoader. Защита API строится на ограничении глубины и расчёте сложности запросов.
Готовые схемы проверяются по встроенному чек-листу. Он требует PascalCase для типов, выделенные типы полезной нагрузки и обязательную пагинацию списков.
Какие задачи решает
- спроектировать схему GraphQL с корректными типами и nullability
- устранить проблему N+1 в резолверах с помощью DataLoader
- настроить авторизацию на уровне контекста или директив
- ограничить глубину и сложность входящих GraphQL-запросов
Примеры запросов агенту
- Спроектируй схему GraphQL для системы комментариев с пагинацией
- Напиши резолвер с DataLoader, чтобы убрать N+1 при загрузке постов
- Проверь схему по чек-листу graphql-expert и добавь типы ошибок
Как установить graphql-expert
1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a claude-code2Вручную: положить файлы
~/.claude/skills/graphql-expert/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/graphql-expert/
1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a codex2Вручную: положить файлы
.agents/skills/graphql-expert/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a cursor2Вручную: положить файлы
.cursor/skills/graphql-expert/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install travisjneuman/.claude skills/graphql-expert2Вручную: положить файлы
.github/skills/graphql-expert/SKILL.md1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a gemini-cli2Командой платформы
gemini skills install https://github.com/travisjneuman/.claude --path skills/graphql-expertВручную: положить файлы
.devin/skills/graphql-expert/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill graphql-expert -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о graphql-expert
Как установить graphql-expert в Claude Code?
Выполните команду npx skills add travisjneuman/.claude --skill graphql-expert -a claude-code.
Что делает graphql-expert?
Скилл передаёт агенту правила построения схем, реализации резолверов и оптимизации запросов GraphQL.
Какие методы оптимизации производительности входят в скилл?
Справочные материалы описывают применение DataLoader против проблемы N+1, сохраняемые запросы (persisted queries), а также лимиты сложности и глубины выборки.
Исходный текст
SKILL.md · MIT
---
name: graphql-expert
description: GraphQL API design and implementation. Use when building GraphQL APIs, designing schemas, implementing resolvers, or optimizing GraphQL performance.
---
# GraphQL Expert
Comprehensive guide for designing and implementing GraphQL APIs.
## GraphQL Fundamentals
### What is GraphQL?
```
GraphQL is a query language for APIs that:
✓ Lets clients request exactly what they need
✓ Gets multiple resources in one request
✓ Uses a type system to describe data
✓ Provides introspection (self-documenting)
GraphQL vs REST:
┌─────────────────────────────────────────┐
│ REST: Multiple endpoints, fixed shapes │
│ GET /users/1 │
│ GET /users/1/posts │
│ GET /users/1/followers │
├─────────────────────────────────────────┤
│ GraphQL: Single endpoint, flexible │
│ POST /graphql │
│ query { user(id: 1) { │
│ name │
│ posts { title } │
│ followers { name } │
│ }} │
└─────────────────────────────────────────┘
```
---
## Schema Design
### Type System
```graphql
# Scalar Types (built-in)
String, Int, Float, Boolean, ID
# Custom Scalar
scalar DateTime
scalar JSON
# Object Type
type User {
id: ID!
email: String!
name: String
createdAt: DateTime!
posts: [Post!]!
}
# Enum
enum Role {
ADMIN
USER
GUEST
}
# Interface
interface Node {
id: ID!
}
type User implements Node {
id: ID!
# ... other fields
}
# Union
union SearchResult = User | Post | Comment
# Input Type (for mutations)
input CreateUserInput {
email: String!
name: String!
role: Role = USER
}
```
### Nullability
```graphql
# Field modifiers:
String # Nullable string
String! # Non-null string
[String] # Nullable list of nullable strings
[String!] # Nullable list of non-null strings
[String]! # Non-null list of nullable strings
[String!]! # Non-null list of non-null strings
# Best practice:
# - Make fields nullable by default
# - Use ! only when guaranteed non-null
# - Lists should usually be non-null: [Item!]!
```
### Schema Structure
```graphql
# Root Types
type Query {
# Read operations
user(id: ID!): User
users(limit: Int, offset: Int): [User!]!
me: User
}
type Mutation {
# Write operations
createUser(input: CreateUserInput!): User!
updateUser(id: ID!, input: UpdateUserInput!): User!
deleteUser(id: ID!): Boolean!
}
type Subscription {
# Real-time updates
userCreated: User!
messageReceived(roomId: ID!): Message!
}
```
---
## Reference files
Detailed material is in separate files so this overview stays short. Read only the file whose topic matches the task; each one is self-contained. Paths are relative to the folder that holds this `SKILL.md` (in the full toolkit install, `~/.claude/skills/graphql-expert/`).
| Topic | File | Covers |
| --- | --- | --- |
| Query Design | [`references/query-design.md`](references/query-design.md) | Basic Queries; Pagination; Filtering & Sorting |
| Mutations | [`references/mutations.md`](references/mutations.md) | Mutation Design; Batch Mutations |
| Resolvers | [`references/resolvers.md`](references/resolvers.md) | Basic Resolvers; Resolver Context |
| Performance Optimization | [`references/performance-optimization.md`](references/performance-optimization.md) | DataLoader (N+1 Solution); Query Complexity; Query Depth Limiting; Persisted Queries |
| Authentication & Authorization | [`references/authentication-and-authorization.md`](references/authentication-and-authorization.md) | Context-Based Auth; Directive-Based Auth |
| Error Handling | [`references/error-handling.md`](references/error-handling.md) | Error Types; Error Formatting |
| Subscriptions | [`references/subscriptions.md`](references/subscriptions.md) | Setup; With Filtering |
| Client Integration | [`references/client-integration.md`](references/client-integration.md) | Apollo Client Setup; React Hooks |
| Best Practices | [`references/best-practices.md`](references/best-practices.md) | DO:; DON'T: |
## Schema Checklist
- [ ] Types named descriptively (singular, PascalCase)
- [ ] Consistent nullability patterns
- [ ] Input types for all mutations
- [ ] Payload types with error handling
- [ ] Pagination for all lists
- [ ] Authentication/authorization considered
- [ ] Performance optimizations in place
© travisjneuman · MIT · travisjneuman/.claude
Похожие скиллы
Все скиллы по теме «Бэкенд и API» →Сначала — graphql-expert от других авторов.