clojure-malli-schema

Enforce Malli schemas via :malli/schema metadata and :catn in Clojure projects.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/esp1/claude-config --skill clojure-malli-schema
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clojure-malli-schema
Source: https://github.com/esp1/claude-config/tree/main/dot.claude/skills/clojure-malli-schema
Command: npx skills add https://github.com/esp1/claude-config --skill clojure-malli-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Ensures consistent Malli-driven validation and self-documented schemas across a Clojure codebase, catching schema issues early in development and keeping function signatures and data structures aligned with formal schemas.

Core Features & Use Cases

  • Enforce function-scoped Malli schemas: Always attach :malli/schema metadata to functions and use :catn for parameter names to ensure self-documentation.
  • Data structure schemas and registries: Define schemas in a dedicated namespace and register them in tests to validate data contracts across modules.
  • Dev-mode instrumentation and test fixtures: Enable Malli dev-mode instrumentation to catch violations during development and testing.
  • Documentation and maintainability: Schemas provide executable, up-to-date documentation and improve error messages and debugging.

Quick Start

Enable Malli dev-mode instrumentation, wire your schemas into the test fixtures, and run the test suite to validate all function and data structure schemas.

Frequently Asked Questions about clojure-malli-schema

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

FAQPage Schema
How do I enforce Malli schemas in Clojure projects?▼

Enforce Malli schemas by attaching :malli/schema metadata to functions and using :catn for parameter names. This covers function definitions, data structures, and test fixtures with proper registry composition.

What's the best way to validate data contracts in Clojure using Malli registries?▼

Validate data contracts by defining schemas in a dedicated namespace and registering them in test fixtures. This ensures data structure schemas are validated consistently across modules during testing.

How does dev-mode instrumentation catch Malli schema violations?▼

Dev-mode instrumentation catches Malli schema violations during development and testing by wiring schemas into test fixtures and running the test suite, validating all function and data structure schemas early.

Do I need :catn usage for Malli function schemas?▼

Yes, :catn usage is required for Malli function schemas to ensure self-documentation of parameter names. Attach :malli/schema metadata to functions alongside :catn to maintain executable, up-to-date documentation.

Why attach :malli/schema metadata to Clojure functions?▼

Attaching :malli/schema metadata to Clojure functions ensures consistent Malli-driven validation and self-documented schemas. It catches schema issues early in development and aligns function signatures with formal schemas.

Can I integrate Malli schema validation with existing test fixtures?▼

Yes, integrate Malli schema validation with test fixtures by enabling dev-mode instrumentation and wiring schemas into the test fixtures. Run the test suite to validate all function and data structure schemas automatically.