can-opener

Generate and update typed Elixir API client packages from OpenAPI JSON specifications.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/agoodway/GoodSkills --skill can-opener
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: can-opener
Source: https://github.com/agoodway/GoodSkills/tree/main/skills/can-opener
Command: npx skills add https://github.com/agoodway/GoodSkills --skill can-opener

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CanOpener eliminates the manual, error-prone work of writing and maintaining Elixir API client wrappers by generating a typed client directly from an OpenAPI specification.

Core Features & Use Cases

  • Compile-time OpenAPI client generation: Generates typed client functions, schema structs, and from_map/1 decoders with zero runtime reflection.
  • Repeatable bootstrap and refresh: Scaffolds a new Elixir API client package from openapi.json, and later updates it when the spec changes.
  • HTTP auth and naming control: Supports common auth strategies (bearer, custom header, or none) and uses path prefix rules to shape generated function naming.

Quick Start

Ask the AI: create an Elixir client library using can-opener by scaffolding from my openapi.json with package name billing_client, module BillingClient, base url https://api.example.com, bearer auth, and path prefix /api/v1/.

Frequently Asked Questions about can-opener

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

FAQPage Schema
How do I generate a typed Elixir API client from an OpenAPI specification?

You can generate a typed Elixir API client from an OpenAPI JSON specification by scaffolding a new Mix project package. The process creates typed client functions, schema structs, and from_map decoders with zero runtime reflection.

What is the best way to update an Elixir API client when an OpenAPI spec changes?

Updating an Elixir API client when an OpenAPI spec changes involves dispatching an update command to regenerate the typed functions and schemas. This ensures your client package stays synchronized with endpoint and schema evolution without manual rewrites.

Can I use bearer token authentication for an OpenAPI generated Elixir client?

Yes, you can use bearer token authentication for a generated Elixir client. The scaffolding process supports common HTTP auth strategies including bearer tokens, custom headers, or no authentication, configured directly into the API module.

Does generating an Elixir client from OpenAPI require runtime reflection?

No, generating an Elixir client from OpenAPI does not require runtime reflection. The scaffolding mechanism performs compile-time generation of typed functions and schema structs, ensuring reliable API consumption with zero runtime overhead.

Do I need a specific project template to scaffold an Elixir API client from openapi.json?

Yes, you need a CanOpener-based project template to scaffold an Elixir API client from openapi.json. This template wires the spec, otp_app, base_url, auth strategy, and path prefix into a single API module to support bootstrap and update dispatches.

How do path prefixes shape function naming in an OpenAPI Elixir client?

Path prefixes shape function naming in an OpenAPI Elixir client by applying path prefix rules during generation. This controls how the typed client functions are named based on the structure of your OpenAPI specification endpoints.