Cobalt — API Endpoints

Standardize RESTful API endpoints in the Cobalt monorepo with Hono, Zod, and Drizzle ORM.

7|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Cobalt-Money/Cobalt --skill cobalt-api-endpoints
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Cobalt — API Endpoints
Source: https://github.com/Cobalt-Money/Cobalt/tree/main/.agents/skills/cobalt/api-endpoints
Command: npx skills add https://github.com/Cobalt-Money/Cobalt --skill cobalt-api-endpoints

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexity of maintaining a consistent, type-safe, and secure REST API architecture within the Cobalt monorepo, preventing structural drift and ensuring robust data validation.

Core Features & Use Cases

  • Standardized Routing: Provides a blueprint for folder-per-endpoint organization using Hono and Zod.
  • Data Layer Patterns: Defines conventions for Drizzle ORM queries, ownership checks, and relational data fetching.
  • Schema Management: Offers clear rules for request/response schema naming and derivation to ensure API stability.
  • Use Case: When adding a new feature like recurring transaction management, use this Skill to ensure the route, data layer, and OpenAPI schemas follow the established Cobalt architectural standards.

Quick Start

Use the Cobalt API Endpoints skill to generate the folder structure and schema definitions for a new internal REST route.

Frequently Asked Questions about Cobalt — API Endpoints

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

FAQPage Schema
How do I structure REST API endpoints in a monorepo using Hono and Zod?

To structure REST API endpoints with Hono and Zod, organize your code using a folder-per-endpoint layout. This standardizes routing and schema definitions within the monorepo, preventing structural drift and ensuring consistent API architecture.

What is the best way to manage Drizzle ORM queries and ownership checks for a REST API?

The best way to manage Drizzle ORM queries is to apply standardized data layer patterns that include centralized ownership assertion logic. This ensures secure relational data fetching and consistent query execution across your REST endpoints.

How do I ensure API stability and consistent response validation using OpenAPI?

You ensure API stability by enforcing strict response validation and clear schema naming conventions. Deriving OpenAPI schemas from Zod definitions guarantees that request and response payloads remain type-safe and structurally consistent.

Can I use this folder-per-endpoint layout for adding new features like recurring transaction management?

Yes, you can use the folder-per-endpoint layout for new features like recurring transaction management. It provides a blueprint to generate the required route, data layer, and OpenAPI schemas following established architectural standards.