Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pproenca avatar

Orval

  • 269 installs
  • 191 repo stars
  • Updated July 24, 2026
  • pproenca/dot-skills

orval is an agent skill that guides Orval configuration and type-safe TypeScript client generation from OpenAPI specifications with React Query, SWR, and MSW mock setup.

About

orval is an agent skill from pproenca/dot-skills that encodes Orval OpenAPI TypeScript client generation best practices. It contains 42 rules across 8 categories covering spec quality, orval.config.ts architecture, output organization, custom mutators, query library integration, type generation, and MSW mock handlers. Developers reach for orval when configuring a new project's API layer, generating clients from OpenAPI specs in CI, integrating React Query or SWR hooks, or building MSW mocks for tests. The skill recommends patterns for auth mutators, retry and error handling, AbortSignal passing, and consistent orval.config.ts structure. Triggers include orval.config.ts, OpenAPI codegen, API client setup, and mock generation tasks inside AI coding assistants.

  • orval

Orval by the numbers

  • 269 all-time installs (skills.sh)
  • +7 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #1,425 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pproenca/dot-skills --skill orval

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs269
repo stars191
Last updatedJuly 24, 2026
Repositorypproenca/dot-skills

How do you generate TypeScript clients from OpenAPI?

Use orval for development tasks

Who is it for?

TypeScript developers wiring frontend or backend services to OpenAPI-documented REST APIs with generated clients and test mocks.

Skip if: GraphQL schema codegen, manual fetch wrapper projects, or AST codemod migrations handled by the codemod skill.

When should I use this skill?

The user configures orval.config.ts, generates OpenAPI TypeScript clients, or sets up React Query hooks and MSW mocks.

What you get

orval.config.ts configuration, generated TypeScript API client, query hooks, and optional MSW mock handlers.

  • orval.config.ts
  • generated TypeScript API client
  • MSW mock handlers

By the numbers

  • Contains 42 rules across 8 categories
  • Covers orval.config.ts, mutators, query hooks, and MSW mocks

Files

SKILL.mdMarkdownGitHub ↗

Orval OpenAPI Best Practices

Comprehensive guide for generating type-safe TypeScript clients from OpenAPI specifications using Orval. Contains 42 rules across 8 categories, prioritized by impact to guide automated configuration, client generation, and testing setup.

When to Apply

Reference these guidelines when:

  • Configuring Orval for a new project
  • Setting up OpenAPI-based TypeScript client generation
  • Integrating React Query, SWR, or Vue Query with generated hooks
  • Creating custom mutators for authentication and error handling
  • Generating MSW mocks for testing

Rule Categories by Priority

PriorityCategoryImpactPrefix
1OpenAPI Specification QualityCRITICALspec-
2Configuration ArchitectureCRITICALorvalcfg-
3Output Structure & OrganizationHIGHoutput-
4Custom Client & MutatorsHIGHmutator-
5Query Library IntegrationMEDIUM-HIGHoquery-
6Type Safety & ValidationMEDIUMtypes-
7Mock Generation & TestingMEDIUMmock-
8Advanced PatternsLOWadv-

Quick Reference

1. OpenAPI Specification Quality (CRITICAL)

  • spec-operationid-unique - Use unique and descriptive operationIds
  • spec-schemas-reusable - Define reusable schemas in components
  • spec-tags-organization - Organize operations with tags
  • spec-response-types - Define all response types explicitly
  • spec-required-fields - Mark required fields explicitly

2. Configuration Architecture (CRITICAL)

  • orvalcfg-mode-selection - Choose output mode based on API size
  • orvalcfg-client-selection - Select client based on framework requirements
  • orvalcfg-separate-schemas - Separate schemas into dedicated directory
  • orvalcfg-input-validation - Validate OpenAPI spec before generation
  • orvalcfg-baseurl-setup - Configure base URL properly
  • orvalcfg-prettier-format - Enable automatic code formatting

3. Output Structure & Organization (HIGH)

  • output-file-extension - Use distinct file extensions for generated code
  • output-index-files - Generate index files for clean imports
  • output-naming-convention - Configure consistent naming conventions
  • output-clean-target - Enable clean mode for consistent regeneration
  • output-headers-enabled - Enable headers in generated functions

4. Custom Client & Mutators (HIGH)

  • mutator-custom-instance - Use custom mutator for HTTP client configuration
  • mutator-error-types - Export custom error types from mutator
  • mutator-body-wrapper - Export body type wrapper for request transformation
  • mutator-interceptors - Use interceptors for cross-cutting concerns
  • mutator-token-refresh - Handle token refresh in mutator
  • mutator-fetch-client - Use fetch mutator for smaller bundle size

5. Query Library Integration (MEDIUM-HIGH)

  • oquery-hook-options - Configure default query options globally
  • oquery-key-export - Export query keys for cache invalidation
  • oquery-infinite-queries - Enable infinite queries for paginated endpoints
  • oquery-suspense-support - Enable suspense mode for streaming UX
  • oquery-signal-cancellation - Pass AbortSignal for request cancellation
  • oquery-mutation-callbacks - Use generated mutation options types

6. Type Safety & Validation (MEDIUM)

  • types-zod-validation - Generate Zod schemas for runtime validation
  • types-zod-strict - Enable Zod strict mode for safer validation
  • types-zod-coerce - Use Zod coercion for type transformations
  • types-use-dates - Enable useDates for Date type generation
  • types-bigint-support - Enable useBigInt for large integer support

7. Mock Generation & Testing (MEDIUM)

  • mock-msw-generation - Generate MSW handlers for testing
  • mock-use-examples - Use OpenAPI examples for realistic mocks
  • mock-delay-config - Configure mock response delays
  • mock-http-status - Generate mocks for all HTTP status codes
  • mock-index-files - Generate mock index files for easy setup

8. Advanced Patterns (LOW)

  • adv-input-transformer - Use input transformer for spec preprocessing
  • adv-operation-override - Override settings per operation
  • adv-output-transformer - Use output transformer for generated code modification
  • adv-form-data-handling - Configure form data serialization

How to Use

Read individual reference files for detailed explanations and code examples:

  • Section definitions - Category structure and impact levels
  • Rule template - Template for adding new rules
  • Example: spec-operationid-unique

Related Skills

  • For consuming generated hooks, see tanstack-query skill
  • For mocking generated API clients, see test-msw skill
  • For schema validation, see zod skill

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Related skills

How it compares

Use orval for OpenAPI TypeScript client codegen rather than codemod, which targets AST-based repository migrations.

FAQ

How many rules does the orval skill include?

The orval skill includes 42 rules across 8 categories prioritized by impact. Categories cover OpenAPI spec quality, orval.config.ts architecture, output organization, mutators, query integration, types, and MSW mock generation.

What integrations does the orval skill cover?

The orval skill covers TypeScript client generation from OpenAPI specs with React Query, SWR, or Vue Query hooks. It also documents custom HTTP mutators for authentication and MSW mock handlers for automated tests.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.