tot-spec

Generate Rust, Python, TypeScript, Java, and Swift code from YAML specifications.

1|Updated Oct 12, 2022
One-click install
npx skills add https://github.com/shuoli84/tot_spec --skill tot-spec
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tot-spec
Source: https://github.com/shuoli84/tot_spec/tree/main/skills/tot-spec
Command: npx skills add https://github.com/shuoli84/tot_spec --skill tot-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

YAML specifications often lead to drift across languages for data models and RPC interfaces. tot-spec unifies definitions in a single source of truth and generates language-specific code.

Core Features & Use Cases

  • Centralizes model and RPC definitions in YAML
  • Generates Rust, Python, TypeScript, Java, and Swift artifacts
  • Enables rapid scaffolding for microservices and SDKs across teams

Quick Start

Run the tot_spec CLI with your spec folder, target generator, and output directory to produce language-specific code.

Frequently Asked Questions about tot-spec

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

FAQPage Schema
How do I generate cross-language data models and RPC interfaces from a YAML specification?▼

To generate cross-language data models and RPC interfaces from YAML, run the tot_spec CLI with your spec folder, target generator, and output directory to produce language-specific code artifacts.

Can I generate TypeScript and Rust code from the same YAML spec for microservices and SDKs?▼

Yes, you can generate TypeScript and Rust code from the same YAML spec to enable rapid scaffolding for microservices and SDKs across teams using supported generators like rs_serde and typescript.

What is the best way to keep data model definitions synchronized across Python, Java, and Swift?▼

The best way to keep data model definitions synchronized across Python, Java, and Swift is to centralize definitions in a single YAML source of truth and generate language-specific artifacts.

Which code generators are supported for cross-language YAML model generation?▼

Supported code generators for cross-language YAML model generation include rs_serde, java_jackson, swift_codable, py_dataclass, typescript, and swagger for producing consistent language-specific artifacts.

Does tot-spec require any specific dependencies to run the CLI for multi-language codegen?▼

tot-spec does not require external dependencies to run the CLI for multi-language codegen, allowing you to directly process YAML specifications and generate Rust, Python, TypeScript, Java, and Swift definitions.

Why does model drift occur across languages and how does YAML-based codegen resolve it?▼

Model drift across languages occurs when definitions are maintained separately; YAML-based codegen resolves this by unifying definitions in a single source of truth and generating consistent language-specific code.