build-category

Formalize domains into versioned YAML category artifacts with objects, morphisms, identity, composition, and laws.

37|5|Updated Nov 18, 2025
One-click install
npx skills add https://github.com/BellaBe/lean-os --skill build-category
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-category
Source: https://github.com/BellaBe/lean-os/tree/main/.claude/skills/engineering-build-category
Command: npx skills add https://github.com/BellaBe/lean-os --skill build-category

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill formalizes the domain as a category with objects, morphisms, identity, composition, and laws derived from spec artifacts.

Core Features & Use Cases

  • Objects & morphisms extraction: translate spec/objects.yaml and spec/morphisms.yaml.
  • Identity & composition: define id_A and composition operators for pure and Kleisli.
  • Laws documentation: capture left_identity, right_identity, and associativity.

Quick Start

Example: "Create artifacts/v{N}/build/category.yaml from artifacts/v{N}/spec/* YAML."

Frequently Asked Questions about build-category

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

FAQPage Schema
How do I formalize a domain as a category with objects and morphisms?

Formalizing a domain as a category involves extracting objects and morphisms from spec artifacts, defining identity morphisms and composition operators, then documenting composition laws. This Skill automates that process by reading spec/objects.yaml and spec/morphisms.yaml, generating a versioned category.yaml artifact with objects, morphisms, identity, composition (pure ∘ and Kleisli >=>), and verification laws.

What's the difference between pure composition and Kleisli composition in category theory?

Pure composition (∘) chains morphisms directly in the category. Kleisli composition (>=>) lifts morphisms through a monad, handling effects or context. This Skill defines both operators so you can express different composition semantics depending on whether your domain morphisms are pure functions or effectful computations.

How do I verify that my category satisfies identity and associativity laws?

Category laws — left identity, right identity, and associativity — must hold for all morphism compositions. This Skill captures and documents these laws in the generated artifact, enabling downstream tooling to verify them against your domain's morphisms and composition definitions.

Can I use this to extract morphisms from existing API or domain specifications?

Yes. This Skill reads objects and morphisms from spec YAML files you provide, translating your domain specification into formal category structure. It works with any spec artifact format you've defined in spec/objects.yaml and spec/morphisms.yaml.

What output format does this Skill produce?

This Skill generates a versioned YAML artifact (artifacts/v{N}/build/category.yaml) containing your domain's objects, morphisms, identity definitions, composition operators, and laws. That artifact feeds downstream tooling for analysis, validation, or code generation.

Do I need category theory background to use this Skill?

Familiarity with basic category concepts — objects, morphisms, identity, and composition — helps. However, if you're building a domain model with entities and relationships plus rules for how they compose, this Skill formalizes that structure into category notation for precision and verification.