# add-malli-schemas

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2000 installs · ★ 49845
- Author: metabase
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/metabase/metabase/tree/HEAD/.claude/skills/add-malli-schemas/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/add-malli-schemas

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/metabase --skill add-malli-schemas -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/add-malli-schemas/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/add-malli-schemas/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/metabase --skill add-malli-schemas -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/add-malli-schemas/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/metabase --skill add-malli-schemas -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/add-malli-schemas/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install metabase/metabase add-malli-schemas
```

2. **Manually: put the files in place**
- File: `.github/skills/add-malli-schemas/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add metabase/metabase --skill add-malli-schemas -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/metabase/metabase --path .claude/skills/add-malli-schemas
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/add-malli-schemas/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add metabase/metabase --skill add-malli-schemas -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/metabase/metabase/tree/HEAD/.claude/skills/add-malli-schemas/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [claude-api](https://affpapa.org/en/nevibecode/skills/claude-api.md) — skill · 74198 installs
- [lark-im](https://affpapa.org/en/nevibecode/skills/lark-im.md) — skill · 472900 installs
- [lark-event](https://affpapa.org/en/nevibecode/skills/lark-event.md) — skill · 466800 installs
- [caveman-discover](https://affpapa.org/en/nevibecode/skills/caveman-discover.md) — skill · 104400 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs

From the same set: [metabase/metabase](https://affpapa.org/en/nevibecode/by/metabase/metabase.md) — 9 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
