
Write HTML. Render video. Built for agents.
This repository defines a standard way to annotate prompts with reusable behaviors like reasoning, formatting, and output structure. The Python package applies those decorators, the spec defines the syntax and rules, and the integrations let you use them in tools like Claude Code and MCP-capable apps.

Builders who want their agent prompts to be reusable, consistent, and easier to shape across tools.
You can turn long prompt instructions into reusable decorators that your agent can apply consistently.
Defines the prompt decorator syntax, behavior, and extension rules in a published spec.
Provides the `prompt_decorators` package for loading definitions, creating decorator instances, and applying them to prompts.
Stores decorator definitions in a registry with validation, compatibility checks, and versioning.
Adds inline `::Name(params)` expansion, a `/decorate` command, and plugin hooks for Claude Code.
Lets MCP-capable clients use prompt decorator functionality through a server integration.
Includes `.cursorrules` and `.cursor/` files for using the framework inside Cursor.
Ships docs, schemas, demos, and scripts for validating decorators and generating documentation.
pip install prompt-decorators
# Verify the package is installed python -c "import prompt_decorators; print(prompt_decorators.__version__)" # Verify registry loading python -m prompt_decorators verify
Prompt Decorators is a comprehensive framework that standardizes how prompts for Large Language Models (LLMs) are enhanced, structured, and transformed. This repository contains both the official Prompt Decorators Specification and its complete Python reference implementation.
Prompt Decorators introduces a standardized annotation system inspired by software design patterns that allows users to modify LLM behavior through simple, composable "decorators." By prefixing prompts with annotations like +++Reasoning, +++StepByStep, or +++OutputFormat, users can consistently control how AI models process and respond to their requests across different platforms and implementations.
This project addresses the growing complexity of AI interactions by providing:
::Name(params) sigils into precise instructions before the model sees the prompt. Ships with a /decorate slash command, always-on config, and an opt-in Haiku-powered auto-selector.As Large Language Models become increasingly integrated into workflows across industries, the need for standardized, consistent ways to interact with these systems has become apparent. Current prompt engineering approaches are largely ad-hoc, requiring extensive documentation, reinvention, and significant cognitive overhead when switching between systems or use cases.
Prompt Decorators address this challenge by providing a systematic approach to modifying AI behavior through simple, composable annotations. Inspired by the Decorator pattern in programming and Python's function decorators, they serve as a layer of abstraction that decouples the core prompt from instructions about how to process and present the response.
Current prompt engineering suffers from several limitations:
Prompt Decorators solves key challenges in prompt engineering:
Whether you're crafting prompts for specific reasoning patterns, structuring outputs in particular formats, or ensuring consistent responses across different models, Prompt Decorators provides a systematic approach that makes prompt engineering more modular, reusable, and maintainable.
The Prompt Decorators framework addresses these challenges through:
The Prompt Decorators project is currently in active development.
You can see the how prompt decorators work by testing out the demo or running the MCP server implementation together with your Claude Desktop.
Or you can use the .cursorrules in this repository as system instructions in Cursor (or chatGPT/Claude) to instruct it. Try it out and share your experiences!
For a detailed breakdown of implementation status, see our Implementation Status document.
The roadmap for this project is outlined in the ROADMAP file.
You can install the package from PyPI https://pypi.org/project/prompt-decorators/:
pip install prompt-decorators
For additional functionality, you can install optional dependencies:
# For Model Context Protocol (MCP) integration
pip install "prompt-decorators[mcp]"
# For development and testing
pip install "prompt-decorators[dev,test]"
# For documentation
pip install "prompt-decorators[docs]"
# For all optional dependencies
pip install "prompt-decorators[all]"
import prompt_decorators as pd
# Load available decorators
pd.load_decorator_definitions()
# Create a decorator instance
reasoning = pd.create_decorator_instance("Reasoning", depth="comprehensive")
# Apply the decorator to a prompt
prompt = "Explain the concept of prompt engineering."
decorated_prompt = reasoning.apply(prompt)
print(decorated_prompt)
After installation, verify that everything is working correctly:
# Verify the package is installed
python -c "import prompt_decorators; print(prompt_decorators.__version__)"
# Verify registry loading
python -m prompt_decorators verify
If you see "Registry verification successful" with a count of loaded decorators, you're ready to go!
For more detailed examples and usage instructions, please refer to the official documentation.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more information.
Contributions are welcome! Please read the CONTRIBUTING file for guidelines on how to contribute to this project.
This project would not be possible without the contributions of the following individuals and organizations:
Sign in to join the discussion.
No comments yet. Be the first to say what this is good for.

Write HTML. Render video. Built for agents.
Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents โ swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.
A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.
๐ท๏ธ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!