plugins/smedjen/skills/openapi-typescript/SKILL.md
OpenAPI code generation, type-safe API clients, schema validation, and contract-first development. Covers openapi-typescript, openapi-fetch, zod-openapi, breaking change detection, and CI integration.
npx skillsauth add hjemmesidekongen/ai openapi-typescriptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The spec is the contract. Generate types from it — never write them by hand. If the spec and the types drift, every downstream assumption silently breaks.
Write (or own) the OpenAPI spec before writing any implementation. The spec defines the surface area: request shapes, response shapes, error variants, auth requirements. Code should conform to the spec, not the other way around.
Spec-first wins: schema is the source of truth, clients and servers share one contract, breaking changes are detectable before they ship, mock servers are derivable from the spec alone.
Pipeline: openapi.yaml → openapi-typescript → schema.d.ts → openapi-fetch client → typed call sites.
Run generation as a script, not manually. Check the diff in CI — if generated output changes unexpectedly, the build fails. This catches spec drift before it reaches consumers.
openapi-typescript generates a paths object and component types. openapi-fetch consumes paths and infers request/response types from the path key + method — no casting, no any.
For runtime safety, pair with zod-openapi or @sinclair/typebox to derive Zod or JSON Schema validators from the same spec. This closes the gap between compile-time types and actual API responses.
/v2/) or header versioning.msw-auto-mock, Prism) keep tests honest without a live server.See references/process.md for full package usage, schema validation patterns, versioning strategies, breaking change detection, mock server setup, CI integration, and anti-patterns.
development
Creates a brand from scratch through market research and interactive sparring. Runs competitive research via Perplexity, then guides the user through positioning, audience, voice, values, and content pillars. Produces the full brand guideline set at .ai/brand/{name}/. Use when building a new brand, defining brand strategy for a product, or when /våbenskjold:create is invoked.
testing
Loads brand guidelines from .ai/brand/{name}/ and makes them available to the current context. Progressive disclosure: L1 confirms brand exists, L2 loads summary, L3 loads specific files on demand. Use when a downstream skill or user needs brand context, or when /våbenskjold:apply is invoked.
documentation
Guided reinvention of an existing brand guideline. Loads current brand from .ai/brand/{name}/, identifies what to keep vs change, and walks the user through targeted evolution. Preserves brand equity while updating positioning, voice, or values. Use when refreshing a brand or when /våbenskjold:evolve is invoked.
development
Codifies an existing brand from materials, samples, and references. Analyzes provided content to extract voice patterns, values, and positioning. Produces the same guideline format as brand-strategy. Use when a brand already exists but isn't documented, or when /våbenskjold:audit is invoked.