agentsclimarketplace

Graphql contract

Skill angpysha/api2skill/.agents/skills/graphql-contract

Convert OpenAPI/Swagger into Agent Skills–compatible packages (SKILL.md + scripts + reference) for Claude, Cursor, and other skill hosts — .NET NuGet CLI with auth-aware dispatcher.

Install
npx -y skills add angpysha/api2skill --skill graphql-contract

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Universal GraphQL contract skill. Write GraphQL schemas from approved requirements. Architect or Team Lead authors the schema in Phase 5/6; Developer implements resolvers exactly to fields and types. Use when REQ includes GraphQL API behavior.

SKILL.md

2.6 KB, 638 tokens by cl100k_base, as published. Nobody here has run it

graphql-contract

Contract-first GraphQL for any backend (Hot Chocolate, Apollo, gqlgen, etc.). The .graphql schema is the source of truth for types, queries, mutations, and field-level behavior. Resolvers must match — not the other way around.

Sibling skills: openapi-contract (REST), grpc-contract (protobuf/gRPC).

Pipeline placement

PhaseAgentResponsibility
4ba-analystFR/AC for queries, mutations, types, auth, errors — not GraphQL syntax
5architectPrimary authorGQL-{id}-{slug}.graphql from REQ + SDD § GraphQL
6team-leadContract lock — map tasks → fields; brief sign-off
7developerResolvers match schema; code plan lists fields/types touched
8testerContract tests against schema + AC

Artifact paths

ArtifactDefault path
GraphQL schemadocs/sdlc/api/GQL-{id}-{slug}.graphql
Contract briefdocs/sdlc/api/GQL-{id}-{slug}-brief.md

Commands

$GQL = '.cursor/skills/graphql-contract/scripts'

pwsh $GQL/scaffold-graphql.ps1 -ReqId 0006
# architect/TL completes schema — remove placeholders, add @req / @ac directives

pwsh $GQL/validate-graphql.ps1 docs/sdlc/api/GQL-0006-my-feature.graphql -ReqId 0006

Authoring rules

Every exposed field must have

  • Clear type (non-null where business requires)
  • Description citing FR/AC
  • @req(id: "REQ-NNNN") on object types or @ac(ids: ["AC-N"]) on fields

Example

type Query {
  """
  FR-2, AC-3: fetch package by name
  """
  package(name: String!): Package @ac(ids: ["AC-3", "AC-4"])
}

type Package @req(id: "REQ-0006") {
  name: String!
  version: String!
}

Team Lead (Phase 6)

Map tasks → GraphQL fields in plan + GQL-*-brief.md.

Developer (Phase 7)

  • Code plan lists field names and types implemented.
  • Resolver signatures and return shapes match schema exactly.
  • Contract change → escalate (architect/TL updates schema first).

Validation

validate-design.ps1 runs when SDD § GraphQL API is present.

Constraints

  • Schema-first; no resolver-driven schema changes without contract update.
  • Cite schema path in chat — do not paste full .graphql files.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.