openapi-workflow

openapi-workflow is a cursor rule for Cursor from jaycewalzer1/SilverKey-Inc.. It costs 0 tokens per session (1,134 once invoked), scanned A, original, MIT.

A set of rules for the continuous-integration workflow that checks and synchronizes OpenAPI files. Continuous integration automatically runs checks when code changes.

In plain words
What is it for?
It guides automated OpenAPI checks and the process for keeping related files synchronized.
Why use it?
It reduces mistakes caused by API descriptions and code getting out of sync.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/generate-pydantic-models.sh.

Good fit It guides automated OpenAPI checks and the process for keeping related files synchronized.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jaycewalzer1/SilverKey-Inc.
agentmods
npx agentmods add rules/jaycewalzer1/silverkey-inc./openapi-workflow

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openapi-workflow

README.md
[![agentmods](https://agentmods.dev/badge/rules/jaycewalzer1/silverkey-inc./openapi-workflow/github.svg)](https://agentmods.dev/rules/jaycewalzer1/silverkey-inc./openapi-workflow)
Your own site
<a href="https://agentmods.dev/rules/jaycewalzer1/silverkey-inc./openapi-workflow"><img src="https://agentmods.dev/badge/rules/jaycewalzer1/silverkey-inc./openapi-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openapi-workflow

Your own site · 80×15
<a href="https://agentmods.dev/rules/jaycewalzer1/silverkey-inc./openapi-workflow"><img src="https://agentmods.dev/badge/rules/jaycewalzer1/silverkey-inc./openapi-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,134 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01134
Opus 5.5 $0.00000 $0.00454
Sonnet 5.5 $0.00000 $0.00227
Haiku 4.5 $0.00000 $0.00113

Measured 1mo ago against content hash 3116e1ca5da9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openapi-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/shared/openapi-workflow.mdc · 207 lines

How it starts

The opening of the file, as written. The whole thing — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenAPI CI Workflow

Overview

The OpenAPI spec is the single source of truth for API contracts. CI enforces that client and server types stay in sync with openapi.yaml.

GitHub Actions Workflow

File: .github/workflows/openapi-sync.yml

Triggers on changes to:

  • openapi.yaml
  • Server/app/schemas/**
  • Client/packages/types/**
  • .github/workflows/openapi-sync.yml

Workflow Jobs

1. Validate OpenAPI Spec

Validates openapi.yaml syntax and structure:

swagger-cli validate openapi.yaml

Fails if:

  • Invalid YAML syntax
  • Invalid OpenAPI 3.1.0 structure
  • Broken $ref references
  • Missing required fields

2. Verify Server Schemas

Regenerates Pydantic models and checks for drift:

cd Server
bash scripts/generate-pydantic-models.sh
git diff --exit-code Server/app/schemas/generated.py

Fails if:

  • Server/app/schemas/generated.py is out of sync
  • Backend models don't match OpenAPI spec

Fix:

cd Server
bash scripts/generate-pydantic-models.sh
git add Server/app/schemas/generated.py
git commit -m "Regenerate server schemas from OpenAPI spec"

3. Verify Client Types

Regenerates TypeScript types and checks for drift:

cd Client
pnpm generate:api-types
git diff --exit-code Client/packages/types/api.generated.ts

Fails if:

  • Client/packages/types/api.generated.ts is out of sync
  • Frontend types don't match OpenAPI spec

Fix:

cd Client
pnpm generate:api-types
git add Client/packages/types/api.generated.ts
git commit -m "Regenerate client types from OpenAPI spec"

Local Development Workflow

Step 1: Edit OpenAPI Spec

# Edit the schema file
vim openapi/components/schemas/user/profile/UserProfile.yaml

# Or edit the main spec
vim openapi/openapi.yaml

Step 2: Validate

# Install swagger-cli if needed
npm install -g @apidevtools/swagger-cli

# Validate spec
swagger-cli validate openapi/openapi.yaml

Step 3: Regenerate Types

Read the full file on GitHub · 207 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 207 lines · 0 tokens per session scan A 3116e1ca5da9

Subscribe to this mod's changes

openapi-workflow is a cursor rule published in the GitHub repository jaycewalzer1/SilverKey-Inc. (2 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,134 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-08.