/graphql-guardian:graphql-guardianfrom GraphQL Guardian: Breaking Changes and N+1 Check
Catches breaking GraphQL schema changes, lints schemas for unbounded list fields, and detects N+1 queries in resolvers with DataLoader fixes.
Ships in GraphQL Guardian: Breaking Changes and N+1 Check. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Scripts: ${CLAUDE_SKILL_DIR} is the folder that contains this file. If your agent does not define it, use the folder where this SKILL.md is located.
Catch breaking schema changes before clients see them, and find N+1 queries and unbounded queries in resolvers.
Get the schema before and after the change. For a schema file in git:
git show origin/main:path/to/schema.graphql > /tmp/schema-old.graphql
python3 ${CLAUDE_SKILL_DIR}/scripts/schema_diff.py /tmp/schema-old.graphql path/to/schema.graphql
Both arguments can be folders of .graphql / .graphqls / .gql files. For code-first schemas (Nest, Pothos, TypeGraphQL, Strawberry, graphene, gqlgen), print the SDL with the project's own script or printSchema(schema) for both versions first.
Every change is classified:
The exit code is 1 when anything is breaking. Before removing a field, deprecate it with @deprecated(reason: "Use X") and check usage (GraphOS, Hive or Inigo field usage, or the server's own operation logs) before deleting it.
python3 ${CLAUDE_SKILL_DIR}/scripts/schema_diff.py --lint path/to/schema.graphql
It lists list fields that return object types without a first/limit argument (a single query can fetch everything) and deprecations without a reason.
For each field resolver on a type that appears inside a list (for example User.posts when Query.users returns a list), read the resolver:
prisma.post.findMany({ where: { authorId: parent.id } }), Post.objects.filter(author=parent), fetch(...)) runs once per item in the list: 100 users means 101 queries.dataloader in Node, aiodataloader or Strawberry's DataLoader in Python, graph-gophers/dataloader in Go) that batches keys into one WHERE id IN (...) query, created in the request context, never shared between requests.select_related/prefetch_related in Django, join-monster or look-ahead with info to load relations in the parent resolver.To confirm, turn on query logging in development (Prisma log: ['query'], Django connection.queries, SQLAlchemy echo=True, Sequelize logging), run one representative operation, and count the queries.
Check whether the server limits abuse: max depth (graphql-depth-limit, Apollo validationRules), query complexity or cost (graphql-query-complexity, @cost / @listSize directives), max page size enforced in the resolver, persisted queries or an allow list for public APIs, and introspection disabled in production if the API is private.
All operations go to one /graphql endpoint and errors often return HTTP 200, so endpoint metrics hide problems. Check that the server records per operation name: latency, error count from errors[], and resolver timings (OpenTelemetry instrumentation for GraphQL, Apollo usage reporting, or a plugin that logs operationName, duration and error count). Suggest the option that fits the existing stack; ask before adding packages.
Start with breaking changes and their clients' impact, then N+1 risks with the resolver file:line and the fix, then missing limits.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
graphql-schema, breaking-changes, n-plus-one, schema-lint, dataloader
npx claudepluginhub petrovicistefan/claude-code-plugins --plugin graphql-guardianOther plugins' skills for the same job