Cobalt — Type rules

Standardize TypeScript type-safety patterns and Zod schema usage in the Cobalt monorepo.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses inconsistencies in TypeScript codebases by providing clear, project-specific rules for function signatures, return type annotations, and the use of Zod schemas versus manual interfaces.

Core Features & Use Cases

  • Signature Standardization: Defines when to explicitly annotate return types versus relying on TypeScript inference.
  • Schema-First Development: Enforces the use of Zod-inferred types to prevent drift between validation logic and type definitions.
  • Use Case: When refactoring a server-side module, use these rules to determine whether to annotate a helper function or allow Drizzle row inference to maintain clean, maintainable code.

Quick Start

Apply the Cobalt type rules to the current file to ensure all exported functions are correctly annotated and Zod schemas are used as the single source of truth.

Frequently Asked Questions about Cobalt — Type rules

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

FAQPage Schema
How do I enforce TypeScript return type annotations in a monorepo?

To enforce TypeScript return type annotations in a monorepo, apply standardized coding rules that define when to explicitly annotate exported functions versus relying on TypeScript inference for internal helpers.

Should I use Zod schema inference or manual interfaces for API type safety?

You should use Zod schema inference over manual interfaces for API type safety to enforce schema-first development, preventing drift between runtime validation logic and static type definitions.

How do I standardize TypeScript conventions for server-side logic?

Standardize TypeScript conventions for server-side logic by applying project-specific rules for function signatures, return type annotations, and generic usage to ensure consistency across database interactions and API schemas.

When should I allow Drizzle row inference instead of explicit return types?

You should allow Drizzle row inference instead of explicit return types when refactoring helper functions, relying on inference to maintain clean and maintainable code where explicit annotations are unnecessary.

Does this Skill work with Zod and Drizzle for TypeScript refactoring?

Yes, this Skill works with Zod and Drizzle for TypeScript refactoring by applying type-safety patterns that standardize schema inference and database row typing within the Cobalt monorepo.