canary-workflow

Update OpenAPI-generated TypeScript types and client code across a monorepo.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/oskar-dragon/claude-code --skill canary-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: canary-workflow
Source: https://github.com/oskar-dragon/claude-code/tree/main/plugins/canary-update/skills/canary-workflow
Command: npx skills add https://github.com/oskar-dragon/claude-code --skill canary-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps OpenAPI-generated TypeScript types, client methods, data layers, network handlers, and test factories in sync across a frontend monorepo to prevent runtime type mismatches and failing tests after schema changes.

Core Features & Use Cases

  • Type regeneration: Guidance for regenerating TypeScript types from the OpenAPI specification and identifying added, modified, or removed types.
  • Client and data-layer updates: Steps to update canary-client method signatures and propagate changes into buyers and sellers data layers.
  • Test and mocks alignment: Instructions to update network handlers and test factories so mocked responses and factories match new types.
  • Validation: Commands to run type checking, linting, formatting, and unused-export checks to validate changes.
  • Use Case: When an API endpoint adds a field, use this workflow to regenerate types, update the client method and data-layer usage, adjust mock handlers and factories, and run validations to ensure the codebase stays consistent.

Quick Start

Run the canary types generator, inspect the generated diff for new or changed types, update the canary client and affected data layers and tests accordingly, then run the monorepo type-check and lint validation.

Frequently Asked Questions about canary-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I propagate OpenAPI schema changes across a TypeScript monorepo?

To propagate OpenAPI schema changes across a TypeScript monorepo, regenerate types from the OpenAPI specification, update canary-client method signatures, adjust data-layer usages, align network handlers and test factories, and run type-checking and lint validation.

Why do my frontend tests fail with runtime type mismatches after an API endpoint adds a field?

Tests fail with runtime type mismatches after API changes because OpenAPI-generated TypeScript types, client methods, and test factories are out of sync. You must regenerate types and update data layers, network handlers, and test factories to match the new schema.

What is the workflow for updating TypeScript types generated from an OpenAPI specification?

The workflow for updating OpenAPI-generated TypeScript types involves running the types generator, inspecting the diff for added or modified types, updating client method signatures and data-layer usages, adjusting mocks, and running lint and type checks.

Do I need a canary-types package to synchronize API schemas and client code?

Yes, a canary-types package is required to synchronize API schemas and client code. This workflow is specifically applicable to frontend monorepos using a canary-types package alongside a canary-client and multiple app data layers.

How do I update test factories and network handlers when OpenAPI types change?

To update test factories and network handlers when OpenAPI types change, adjust mocked responses and factories to match the newly regenerated types, ensuring that test handlers align with updated client method signatures and data layers.