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.
npx skills add metabase/metabase --skill add-malli-schemas -a claude-codeWhat 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
msschema types for this endpoint and create a named schema if the response shape is reused. - Check the temporal fields: use
ms/TemporalStringfor requests and:anyfor responses before JSON serialization.
How to install add-malli-schemas
1Skills CLI (Vercel)
npx skills add metabase/metabase --skill add-malli-schemas -a claude-code2Manually: put the files in place
~/.claude/skills/add-malli-schemas/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/add-malli-schemas/
1Skills CLI (Vercel)
npx skills add metabase/metabase --skill add-malli-schemas -a codex2Manually: put the files in place
.agents/skills/add-malli-schemas/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add metabase/metabase --skill add-malli-schemas -a cursor2Manually: put the files in place
.cursor/skills/add-malli-schemas/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install metabase/metabase add-malli-schemas2Manually: put the files in place
.github/skills/add-malli-schemas/SKILL.md1Skills CLI (Vercel)
npx skills add metabase/metabase --skill add-malli-schemas -a gemini-cli2Platform CLI
gemini skills install https://github.com/metabase/metabase --path .claude/skills/add-malli-schemasManually: put the files in place
.devin/skills/add-malli-schemas/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add metabase/metabase --skill add-malli-schemas -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.