Skip to main content
skill CX Codex

add-malli-schemas — Claude Code skill: what it does, how to install

This skill adds Malli schemas to Metabase API endpoints, covering request inputs and responses. Use it when changing Clojure API code.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add metabase/metabase --skill add-malli-schemas -a claude-code
Open on GitHub

What add-malli-schemas does

The skill guides schema work for Metabase API endpoints. It covers route parameters, query parameters with :optional true and :default, request bodies for POST/PUT, and response schemas placed after the route string. It also recommends reusable named schemas and types from metabase.util.malli.schema, aliased as ms.

Its examples point to src/metabase/warehouses_rest/api.clj, src/metabase/api_keys/api.clj, src/metabase/collections_rest/api.clj, and src/metabase/timeline/api/timeline.clj. The checklist includes contextual validation errors and advises against using the raw request map unless it is needed.

Temporal fields have a specific rule: use ms/TemporalString for request schemas, but use :any for response schemas. Responses are validated before JSON serialization, so they still contain Java Time objects. That detail determines which schema fits an endpoint response.

What it helps with

  • describe route parameters for an API endpoint
  • set optional query parameters with defaults
  • validate a POST/PUT request body with Malli
  • define an endpoint response schema
  • add contextual validation errors

Example prompts for the agent

  • Add Malli schemas to the API endpoint I’m changing in Metabase, covering route parameters, query parameters, the request body, and the response.
  • Choose suitable ms schema types for this endpoint and create a named schema if the response shape is reused.
  • Check the temporal fields: use ms/TemporalString for requests and :any for responses before JSON serialization.

How to install add-malli-schemas

1Skills CLI (Vercel)

npx skills add metabase/metabase --skill add-malli-schemas -a claude-code

2Manually: put the files in place

~/.claude/skills/add-malli-schemas/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/add-malli-schemas/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about add-malli-schemas

How do I install add-malli-schemas in Claude Code?

Run npx skills add metabase/metabase --skill add-malli-schemas -a claude-code, then use ~/.claude/skills/add-malli-schemas/SKILL.md.

What does add-malli-schemas do?

It guides the addition of Malli schemas to Metabase API endpoints. The skill covers route and query parameters, request bodies, responses, and validation errors.

How should temporal fields be handled in Malli schemas?

Use ms/TemporalString for request parameters. Use :any in response schemas because validation runs before Java Time objects are serialized to JSON.

Similar skills

All skills for Backend and APIs →

From the same set9

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor