gen-morphisms

Generate morphism implementations from build artifacts for domain operations and API handlers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of morphism implementations from build artifacts, wiring API handlers, and composing operations with the App monad.

Core Features & Use Cases

  • CRITICAL RULES: ensure all morphisms return App[A], imports from gen-types, and environment-based dependencies.
  • Domain operations generation: produce atomic and derived morphisms from artifacts.
  • Code layout: produce artifacts like domain/operations, api/handlers, and middleware.

Quick Start

Example: "Generate the Python modules for user_ops.py and routes for POST /users using artifacts/v1/build and artifacts/v1/gen."

Frequently Asked Questions about gen-morphisms

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

FAQPage Schema
How do I generate morphism implementations from build artifacts?

Generate morphism implementations by pointing the Skill to your build artifacts directory, specifying domain operations and API handlers. The Skill produces morphism code that returns App[A], imports from gen-types, and retrieves dependencies from Env, automating wiring across domain/operations, api/handlers, and middleware layouts.

What's the proper way to structure morphisms with the App monad?

Morphisms generated by this Skill follow a strict pattern: all implementations return App[A], obtain dependencies through Env, and import effects from domain/effects. This ensures type safety and composability across your operation and HTTP endpoint implementations.

Can I use this to generate HTTP endpoint handlers from domain operations?

Yes. The Skill generates API handlers by composing domain operations into HTTP endpoint routes. It creates handlers that respect the App monad contract, automatically wire environment-based dependencies, and validate signatures against morphism specifications.

What are the critical rules for generated morphism code?

All morphisms must return App[A], import from gen-types, and depend on Env for dependency injection. The Skill validates these signatures automatically and ensures consistent layout across generated artifacts, preventing runtime misalignment between operations and handlers.

How do I compose multiple operations into a single morphism?

Pass multiple operation artifacts to the Skill with composition intent specified. It generates composite morphisms that chain operations through the App monad, maintaining proper effect handling and dependency resolution across the composition chain.