API Design
majiayu000/spellbook
REST/GraphQL/gRPC API design best practices. An agent skill from majiayu000/spellbook.
Finds OpenAPI, GraphQL, Protobuf and JSON Schema files in a codebase and extracts behavioral claims from them as part of a reverse-engineering workflow.
$ npx skills add prime-radiant-inc/greenfield --skill contract-detection -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install prime-radiant-inc/greenfield contract-detection --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/contract-detection .claude/skills/contract-detection && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "contract-detection" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/contract-detection into .claude/skills/contract-detection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-detection", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/prime-radiant-inc/greenfield/tree/main/skills/contract-detectionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add prime-radiant-inc/greenfield --skill contract-detection -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install prime-radiant-inc/greenfield contract-detection --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/contract-detection .agents/skills/contract-detection && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "contract-detection" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/contract-detection into .agents/skills/contract-detection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-detection", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add prime-radiant-inc/greenfield --skill contract-detection -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install prime-radiant-inc/greenfield contract-detection --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/contract-detection .cursor/skills/contract-detection && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "contract-detection" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/contract-detection into .cursor/skills/contract-detection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-detection", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/prime-radiant-inc/greenfield.git --path skills/contract-detection--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add prime-radiant-inc/greenfield --skill contract-detection -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install prime-radiant-inc/greenfield contract-detection --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/contract-detection .gemini/skills/contract-detection && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "contract-detection" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/contract-detection into .gemini/skills/contract-detection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-detection", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install prime-radiant-inc/greenfield contract-detectionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add prime-radiant-inc/greenfield --skill contract-detection -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/contract-detection .github/skills/contract-detection && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "contract-detection" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/contract-detection into .github/skills/contract-detection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-detection", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add prime-radiant-inc/greenfield --skill contract-detection -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install prime-radiant-inc/greenfield contract-detection --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/contract-detection .opencode/skills/contract-detection && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "contract-detection" agent skill from https://github.com/prime-radiant-inc/greenfield/tree/main/skills/contract-detection into .opencode/skills/contract-detection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "contract-detection", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
contract-detectionFinds OpenAPI, GraphQL, Protobuf and JSON Schema files in a codebase and extracts behavioral claims from them as part of a reverse-engineering workflow.
This skill is one stage of a larger reverse-engineering workflow: it locates machine-readable API contracts in a repository or documentation set and pulls behavioral facts out of them. It covers OpenAPI and Swagger files, GraphQL schemas, Protobuf and gRPC definitions and JSON Schema, and it turns what it finds into behavioral claims. Contracts are treated as the most reliable evidence because they are formal, published, machine-verifiable and versioned.
Detection starts with file searches for names such as openapi.* and swagger.*. For each OpenAPI document it extracts endpoints, HTTP methods, operation IDs, summaries and tags, then parameters with their types, required flags and enum, minimum and maximum limits, which act as behavioral constraints. All output is marked public and written to `workspace/public/contracts/`. The mode runs independently of other evidence sources and is meant to be loaded by an analyzer agent in the first layer of the plugin's pipeline.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 6e6d4b4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
API Contract Detection loads about 4.2k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 1,149 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from prime-radiant-inc/greenfield at commit 6e6d4b4, republished under its Apache-2.0 licence (© prime-radiant-inc). 1,149 words, ~4,183 tokens.
.claude/skills/contract-detection/SKILL.md (or your agent's skills folder).Extract behavioral intelligence from machine-readable API contracts. These are formal, published definitions of system interfaces -- the strongest possible specification source. A contract file is an explicit promise about what the system accepts and returns.
Contract detection activates when:
This mode runs independently of all other intelligence sources. All output is PUBLIC -- machine-readable contracts are published definitions intended for external consumption. Output goes to workspace/public/contracts/.
Machine-readable contracts are unique among intelligence sources because they are:
A single OpenAPI specification can contain more behavioral intelligence than the entire official documentation site, because every endpoint, parameter, response schema, and error code is defined with machine precision.
# Find OpenAPI/Swagger files
find . -maxdepth 5 -type f \( \
-name "openapi.*" -o -name "swagger.*" -o \
-name "api-spec.*" -o -name "api-docs.*" \
\) \( -name "*.json" -o -name "*.yaml" -o -name "*.yml" \) 2>/dev/null
# Check for OpenAPI version markers in YAML/JSON files
grep -rl '"openapi":\|openapi:' --include="*.json" --include="*.yaml" --include="*.yml" . 2>/dev/null | head -20
grep -rl '"swagger":\|swagger:' --include="*.json" --include="*.yaml" --include="*.yml" . 2>/dev/null | head -20
# Check for hosted spec endpoints (common locations)
# /api-docs, /swagger.json, /openapi.json, /v2/api-docs, /v3/api-docsFor each OpenAPI/Swagger specification, extract:
| Field | What It Tells You |
|---|---|
paths | Every endpoint the API exposes |
| HTTP method | The operation type (GET=read, POST=create, PUT=replace, PATCH=update, DELETE=remove) |
operationId | The canonical name for the operation |
summary / description | Behavioral description of what the endpoint does |
tags | Logical grouping of endpoints |
| Field | What It Tells You |
|---|---|
parameters (path, query, header, cookie) | Required inputs and their types |
required | Whether the parameter is mandatory |
schema with enum | Allowed values (behavioral constraint) |
schema with minimum / maximum | Value range (behavioral constraint) |
schema with pattern | Validation regex (behavioral constraint) |
schema with default | Default value when omitted |
| Field | What It Tells You |
|---|---|
requestBody | What the endpoint accepts (content type, schema) |
responses | Every possible response code and its schema |
responses.4xx | Client error conditions and their structure |
responses.5xx | Server error conditions |
components/schemas | Shared data models with field types, constraints, and relationships |
| Field | What It Tells You |
|---|---|
securityDefinitions / components/securitySchemes | Auth methods (API key, OAuth2, Bearer, Basic) |
security (global or per-operation) | Which endpoints require which auth |
Write to workspace/public/contracts/openapi-summary.md:
## API: {title} v{version}
### Endpoints
| Method | Path | Operation | Auth Required | Description |
|--------|------|-----------|---------------|-------------|
| GET | /users | listUsers | Bearer | List all users with pagination |
| POST | /users | createUser | Bearer | Create a new user |
### Data Models
#### User
| Field | Type | Required | Constraints | Description |
|-------|------|----------|-------------|-------------|
| id | string (uuid) | yes | read-only | Unique identifier |
| email | string | yes | format: email | User's email address |
### Error Responses
| Code | Meaning | Schema |
|------|---------|--------|
| 400 | Validation error | { message: string, errors: [{field, code}] } |
| 401 | Unauthorized | { message: string } |
| 404 | Not found | { message: string } |# Find GraphQL schema files
find . -maxdepth 5 -type f \( \
-name "schema.graphql" -o -name "*.graphqls" -o -name "schema.gql" -o \
-name "*.graphql" \
\) 2>/dev/null
# Find GraphQL codegen config (indicates GraphQL usage)
find . -maxdepth 3 -type f \( \
-name "codegen.*" -o -name ".graphqlrc*" -o -name "apollo.config.*" \
\) 2>/dev/null
# Check for GraphQL in dependencies
grep -l "graphql\|apollo\|@graphql" package.json requirements.txt Gemfile go.mod 2>/dev/null
# Check for introspection endpoint (if running instance available)
# POST /graphql with { "query": "{ __schema { types { name } } }" }For each GraphQL schema, extract:
| Element | What It Tells You |
|---|---|
| Query type fields | Every read operation the API exposes |
| Arguments | Required and optional parameters with types |
| Return types | Shape of the response data |
Directives (@deprecated, @auth) | Behavioral modifiers |
| Element | What It Tells You |
|---|---|
| Mutation type fields | Every write operation the API exposes |
| Input types | Shape of the data the operation accepts |
| Return types | What the operation returns after modification |
| Error handling patterns | Union types for success/error returns |
| Element | What It Tells You |
|---|---|
| Subscription type fields | Events the client can subscribe to |
| Arguments | Subscription filters |
| Payload types | Shape of the real-time data |
| Element | What It Tells You |
|---|---|
| Object types | Data entities and their fields |
| Enum types | Allowed values for categorical fields |
| Interface types | Shared behavioral contracts across types |
| Union types | Polymorphic response shapes |
| Input types | Structured input shapes for mutations |
| Custom scalars | Domain-specific value types (DateTime, JSON, URL) |
Write to workspace/public/contracts/graphql-summary.md:
## GraphQL Schema
### Queries
| Query | Arguments | Returns | Description |
|-------|-----------|---------|-------------|
| users | filter: UserFilter, page: Int | [User!]! | List users with filtering |
| user | id: ID! | User | Get user by ID |
### Mutations
| Mutation | Input | Returns | Description |
|----------|-------|---------|-------------|
| createUser | input: CreateUserInput! | User! | Create a new user |
| deleteUser | id: ID! | Boolean! | Delete user by ID |
### Subscriptions
| Subscription | Arguments | Payload | Description |
|-------------|-----------|---------|-------------|
| userCreated | — | User! | Fires when a new user is created |
### Types
#### User
| Field | Type | Nullable | Description |
|-------|------|----------|-------------|
| id | ID | no | Unique identifier |
| email | String | no | Email address |
| role | UserRole | no | Enum: ADMIN, USER, VIEWER |# Find .proto files
find . -maxdepth 5 -type f -name "*.proto" 2>/dev/null
# Check for gRPC in dependencies
grep -l "grpc\|protobuf" package.json requirements.txt Gemfile go.mod Cargo.toml 2>/dev/null
# Find generated gRPC code
find . -maxdepth 5 -type f \( -name "*_grpc.pb.go" -o -name "*_pb2_grpc.py" -o -name "*_grpc.rb" \) 2>/dev/nullFor each .proto file, extract:
| Element | What It Tells You |
|---|---|
service definitions | Logical groupings of RPC methods |
rpc methods | Every callable operation |
| Request/response types | Input and output shapes |
| Streaming modifiers | stream on request, response, or both |
| Element | What It Tells You |
|---|---|
message definitions | Data structures used in requests and responses |
| Field types and numbers | Schema with wire-format compatibility rules |
repeated fields | Array/list fields |
oneof fields | Union types (exactly one field set) |
optional / required | Field presence requirements |
map fields | Key-value pair fields |
| Element | What It Tells You |
|---|---|
enum definitions | Allowed categorical values |
option allow_alias | Whether multiple names map to the same value |
| Element | What It Tells You |
|---|---|
option java_package | Target language packaging |
option go_package | Go module path |
| Custom options | Domain-specific metadata |
Write to workspace/public/contracts/protobuf-summary.md:
## Protobuf/gRPC Services
### Service: UserService
| RPC | Request | Response | Streaming | Description |
|-----|---------|----------|-----------|-------------|
| GetUser | GetUserRequest | User | none | Get user by ID |
| ListUsers | ListUsersRequest | ListUsersResponse | none | List users with pagination |
| WatchUsers | WatchUsersRequest | User | server-stream | Stream user updates |
### Messages
#### User
| Field | Number | Type | Label | Description |
|-------|--------|------|-------|-------------|
| id | 1 | string | — | Unique identifier |
| email | 2 | string | — | Email address |
| role | 3 | UserRole | — | User role |
### Enums
#### UserRole
| Name | Number |
|------|--------|
| USER_ROLE_UNSPECIFIED | 0 |
| USER_ROLE_ADMIN | 1 |
| USER_ROLE_USER | 2 |# Find JSON Schema files
find . -maxdepth 5 -type f -name "*.schema.json" 2>/dev/null
find . -maxdepth 5 -type f -name "*.json" -exec grep -l '"$schema"' {} \; 2>/dev/null | head -20
# Check for JSON Schema in config files
grep -rl '"$schema":\|"\$ref"' --include="*.json" . 2>/dev/null | head -20
# Find JSON Schema in OpenAPI components (already covered above, but note cross-reference)For each JSON Schema, extract:
| Element | What It Tells You |
|---|---|
type | The data type (object, array, string, number, boolean, null) |
properties | Named fields with their own schemas |
required | Fields that must be present |
additionalProperties | Whether unknown fields are allowed |
| Element | What It Tells You |
|---|---|
minLength / maxLength | String length constraints |
minimum / maximum | Numeric range constraints |
pattern | Regex validation for strings |
format | Semantic format (email, uri, date-time, uuid) |
enum | Allowed values |
const | Fixed required value |
minItems / maxItems | Array length constraints |
uniqueItems | Whether array elements must be unique |
| Element | What It Tells You |
|---|---|
$ref | References to shared schema definitions |
allOf | Schema intersection (all must match) |
anyOf | Schema union (at least one must match) |
oneOf | Schema exclusive union (exactly one must match) |
not | Schema negation |
if / then / else | Conditional validation |
| Element | What It Tells You |
|---|---|
default | Default value when field is omitted |
examples | Example values (behavioral documentation) |
description | Human-readable behavioral description |
Write to workspace/public/contracts/json-schema-summary.md:
## JSON Schema: {title}
### Type: CreateUserRequest
| Property | Type | Required | Constraints | Default | Description |
|----------|------|----------|-------------|---------|-------------|
| email | string | yes | format: email | — | User email address |
| name | string | yes | minLength: 1, maxLength: 100 | — | Display name |
| role | string | no | enum: [admin, user, viewer] | "user" | User role |
| tags | array of string | no | maxItems: 10, uniqueItems: true | [] | User tags |
### Validation Rules
- `email` must match email format (RFC 5322)
- `name` must be 1-100 characters
- `role` defaults to "user" when omitted
- `tags` must contain unique strings, maximum 10When multiple contract types are present (e.g., both OpenAPI and GraphQL, or OpenAPI with JSON Schema references), correlate them:
Document correlations and discrepancies in workspace/public/contracts/cross-contract-notes.md.
All claims from contract detection use source=machine-readable-contract:
- The /users endpoint accepts a `role` query parameter with values: admin, user, viewer
<!-- cite: source=machine-readable-contract, ref=openapi.yaml:/paths/~1users/get/parameters/0, confidence=confirmed, agent=contract-detector -->Every behavioral claim gets an inline citation immediately after the claim. The ref field should be <file-path>:<json-path-or-line>.
workspace/public/contracts/
openapi-summary.md # OpenAPI/Swagger extraction
graphql-summary.md # GraphQL schema extraction
protobuf-summary.md # Protobuf/gRPC extraction
json-schema-summary.md # JSON Schema extraction
cross-contract-notes.md # Correlations and discrepancies across contract types
raw/ # Copies of discovered contract files for reference
openapi.yaml
schema.graphql
service.proto
config.schema.jsonNote: Output goes to workspace/public/contracts/ -- not workspace/raw/. Machine-readable contracts are published definitions intended for external consumption. They contain no proprietary implementation details.
workspace/public/, not workspace/raw/.workspace/public/contracts/raw/ for downstream reference.<!-- cite: --> comment immediately after the claim. Never defer citation to a later step.© prime-radiant-inc, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/contract-detection of prime-radiant-inc/greenfield.
Open the folder on GitHubat commit 6e6d4b4
API Contract Detection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| API Contract Detection this skillprime-radiant-inc/greenfield | 292 | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| API Designmajiayu000/spellbook | 287 | — | ~2.1k | Automated safety check: Pass | MIT | |
| API ForgeEliasOulkadi/shokunin | 114 | — | ~2.9k | Automated safety check: Pass | MIT | |
| API Architectcuriositech/some_claude_skills | 244 | — | ~1.4k | Automated safety check: Pass | MIT | |
| System Design CommunicationHoangNguyen0403/agent-skills-standard | 572 | — | ~894 | Automated safety check: Pass | MIT | |
| SpikardGoldziher/spikard | 124 | — | ~799 | Automated safety check: Pass | MIT |
majiayu000/spellbook
REST/GraphQL/gRPC API design best practices. An agent skill from majiayu000/spellbook.
EliasOulkadi/shokunin
Design REST/GraphQL APIs with OpenAPI 3.1, error handling, pagination, rate limiting, webhooks, and idempotency.
curiositech/some_claude_skills
Expert API designer for REST, GraphQL, gRPC architectures. An agent skill from curiositech/some_claude_skills.
HoangNguyen0403/agent-skills-standard
Select how services talk: REST, gRPC, GraphQL, WebSocket, SSE, or webhook per hop, sync versus async per flow, service discovery mode, and DNS/edge routing.
Goldziher/spikard
Scaffold Spikard projects and generate code from OpenAPI, AsyncAPI, OpenRPC, GraphQL, and Protobuf schemas using the Spikard CLI or its MCP server.
yonatangross/orchestkit
API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs.
prime-radiant-inc/greenfield
Master methodology for reverse-engineering a codebase into behavioral specs with cited evidence, reading every line across source, binaries, docs, runtime and git history.
prime-radiant-inc/greenfield
Mines tutorials, forums, reviews, issues and changelogs for observed product behavior, using six search channels and consensus analysis.
prime-radiant-inc/greenfield
Runs untrusted analysis targets inside Docker or Podman containers with memory, CPU and process limits, covering image builds, lifecycle, command execution and cleanup.
prime-radiant-inc/greenfield
Method for extracting behavioral specifications from a product's public documentation: tiered search order, claim extraction rules, output structure, stop criteria and gap analysis.
prime-radiant-inc/greenfield
Layer 1 skill for SDK and ecosystem analysis. An agent skill from prime-radiant-inc/greenfield.
prime-radiant-inc/greenfield
Cross-validates sanitized output specs against raw source specs to detect lost behavioral detail, dropped constants, missing features, or diluted precision.
Categories
Finds OpenAPI, GraphQL, Protobuf and JSON Schema files in a codebase and extracts behavioral claims from them as part of a reverse-engineering workflow. This skill is one stage of a larger reverse-engineering workflow: it locates machine-readable API contracts in a repository or documentation set and pulls behavioral facts out of them. It covers OpenAPI and Swagger files, GraphQL schemas, Protobuf and gRPC definitions and JSON Schema, and it turns what it finds into behavioral claims.
API Contract Detection fits situations like: mining a repository's OpenAPI or Swagger files for what endpoints accept and return; extracting behavioral claims from GraphQL, Protobuf or JSON Schema definitions; building a spec of an existing API from its published contracts before a reimplementation.
Run `npx skills add prime-radiant-inc/greenfield --skill contract-detection -a claude-code`. Or copy the skill folder (skills/contract-detection in prime-radiant-inc/greenfield) into .claude/skills/contract-detection in your project. Claude Code loads it when a task matches its description.
Run `npx skills add prime-radiant-inc/greenfield --skill contract-detection -a codex`. Or copy the skill folder (skills/contract-detection in prime-radiant-inc/greenfield) into .agents/skills/contract-detection in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add prime-radiant-inc/greenfield --skill contract-detection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/contract-detection, .gemini/skills/contract-detection, .github/skills/contract-detection and .opencode/skills/contract-detection in your project.
SKILL.md names no scripts, command-line tools or credentials: API Contract Detection is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
API Contract Detection is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with API Contract Detection: API Design (majiayu000/spellbook, 287 stars), API Forge (EliasOulkadi/shokunin, 114 stars), API Architect (curiositech/some_claude_skills, 244 stars) and System Design Communication (HoangNguyen0403/agent-skills-standard, 572 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
prime-radiant-inc (a GitHub organization) maintains it in prime-radiant-inc/greenfield, which has 292 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on August 6, 2026.
Source: prime-radiant-inc/greenfield on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.