add-malli-schemas
Efficiently add Malli schemas to API endpoints in the Metabase codebase with proper patterns, validation timing, and error handling
Security Assessment
About add-malli-schemas
The 'add-malli-schemas' skill streamlines the process of integrating Malli schemas into API endpoints within the Metabase codebase. This skill addresses the common challenges of ensuring consistent schema definitions, proper validation, and effective error handling across different endpoints. By providing a structured approach to schema addition, developers can maintain uniformity and reliability in their API responses, ultimately enhancing the overall quality of the codebase.
FAQ
How do I add a new Malli schema to an API endpoint?
You can add a new Malli schema by defining the schema using the appropriate syntax and integrating it into the API endpoint definition, ensuring to cover route, query, and body parameters.
Are there any best practices for defining schemas?
Yes, you should use existing schema types from the 'ms' namespace when possible, create named schemas for reusable or complex types, and always add contextual error messages for validation failures.
What files should I refer to for examples?
You can refer to 'src/metabase/warehouses/api.clj' for comprehensive schemas, 'src/metabase/api_keys/api.clj' for response schemas, and other specified files for various schema patterns.
Install add-malli-schemas
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
metabase/metabase