用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill graphql命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | graphql |
| description | Use when the project uses GraphQL for API queries and mutations |
| metadata | {"author":"calcosmic"} |
Design your schema around the client's needs, not your database tables. Use descriptive type names and field names. Every field should have a clear purpose -- do not expose internal implementation details.
Use ID type for identifiers, String for text, Int/Float for numbers, Boolean for flags. Define custom scalars (DateTime, URL, Email) for domain-specific values that need validation.
Make fields non-nullable by default (String!). Only use nullable fields when null carries meaning (e.g., "no value set"). Lists should be non-nullable with non-nullable items: [User!]!.
Separate reads (queries) from writes (mutations). Mutations should return the affected object so clients can update their cache without a refetch. Name mutations as verbs: createUser, updatePost, deleteComment.
Use input types for mutation arguments: input CreateUserInput { name: String!, email: String! }. This keeps the schema clean and makes validation straightforward.
Use Relay-style cursor pagination for all list fields: Connection type with edges, node, pageInfo, and cursor. This handles infinite scroll, bidirectional loading, and real-time updates cleanly. Avoid offset-based pagination -- it breaks when data changes between pages.
GraphQL's nested resolution model naturally creates N+1 queries. Use DataLoader to batch and cache database lookups within a single request. Every resolver that touches the database should go through a DataLoader.
Without DataLoader, a query fetching 50 users with their posts makes 51 database calls (1 for users + 50 for each user's posts). With DataLoader, it makes 2.
Return errors in the errors array, not in the data. Use error extensions for machine-readable codes: { "extensions": { "code": "UNAUTHORIZED" } }. Partial failures are valid in GraphQL -- a query can return data for some fields and errors for others.
Limit query depth (typically 7-10 levels) to prevent deeply nested queries that overwhelm the server. Limit query complexity by assigning cost values to fields and rejecting queries that exceed a budget.
Disable introspection in production unless your API is intentionally public. Introspection exposes your entire schema to attackers.
Persisted queries reduce bandwidth and prevent arbitrary query execution. Clients send a hash instead of the full query string. Cache responses at the field level, not the query level, since GraphQL queries are highly variable.
Source: calcosmic/Aether — distributed by TomeVault.