prompt-dsl

Compose categorical prompt templates using functor combinators and monadic structures in Python.

1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/HermeticOrmus/hermetic-claude --skill prompt-dsl-hermeticormus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-dsl
Source: https://github.com/HermeticOrmus/hermetic-claude/tree/main/claude/skills/prompt-dsl
Command: npx skills add https://github.com/HermeticOrmus/hermetic-claude --skill prompt-dsl-hermeticormus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured and composable way to build complex prompts for language models, moving beyond simple string concatenation to a more robust, algebraic approach.

Core Features & Use Cases

  • Categorical Prompt Structure: Treats prompts as objects and transformations as morphisms, enabling formal composition.
  • DSL Primitives: Offers basic prompt types (system, user, context) and composition operators (sequence, parallel, repeat, conditional).
  • Template System: Supports parameterized prompts akin to exponential objects in category theory.
  • Functor and Monad Operations: Enables applying transformations and sequencing effects within the prompt construction process.
  • Use Case: Building a sophisticated prompt for code generation that involves multiple steps: defining the system persona, providing context, specifying requirements, and then refining the output based on certain conditions.

Quick Start

Use the prompt-dsl skill to define a sequential prompt that first sets the system role and then adds a user message.

Frequently Asked Questions about prompt-dsl

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

FAQPage Schema
How do I build composable prompt templates for language models?

You can build composable prompt templates by using a domain-specific language with functor combinators and natural transformation operators to formally structure and sequence prompt objects instead of relying on string concatenation.

What is categorical prompt composition for language models?

Categorical prompt composition is an approach that treats prompts as objects and transformations as morphisms, enabling formal algebraic composition using sequence, parallel, repeat, and conditional operators to build complex prompt structures.

How do I implement typed prompt algebras in Python?

You implement typed prompt algebras in Python by using dataclasses and abstract base classes to define prompt expressions and monadic structures, enabling typed transformations and functor operations within the prompt construction process.

Can I use conditional logic and parallel operations when engineering prompts?

Yes, you can use conditional logic and parallel operations through the provided DSL primitives, which support sequence, parallel, repeat, and conditional composition operators for structuring multi-step prompt templates for code generation.

Does this prompt composition DSL require any external Python dependencies?

No, this prompt composition DSL requires no external dependencies, relying solely on standard Python dataclasses and abstract base classes to define the underlying prompt expressions and monadic structures.

What is the best way to structure a multi-step code generation prompt?

The best way to structure a multi-step code generation prompt is using a sequential template that defines the system persona, provides context, specifies requirements, and refines output based on conditions using categorical composition operators.