prompt-recipe-smith
prompt-recipe-smith is a small Python package for building effective chat prompts
from vague user ideas.
It is designed for people who may not know AI, software, or prompt engineering terms. The package helps turn a rough thought into a clearer prompt by applying a reusable prompt-building procedure.
PromptTemplate vs PromptRecipe
A PromptTemplate is a fixed prompt form with variables:
from prompt_recipe_smith import PromptTemplate
template = PromptTemplate("Explain {topic} for a beginner.")
print(template.render({"topic": "email security"}))
A PromptRecipe is more than a template. It can include steps, defaults,
examples, clarification ideas, and up to three simple branches. A
PromptBuilder applies the recipe to a user's rough input and returns a
PromptResult.
Installation
Install from PyPI:
uv add prompt-recipe-smith
Minimal Example
The command-line app asks three clarification questions, then prints the final prompt for the chat agent:
prompt-recipe-smith I want to plan a small workshop
One-shot Builder
from prompt_recipe_smith import PromptBuilder
from prompt_recipe_smith.output import to_json, to_plain_text
from prompt_recipe_smith.recipes import clarify_idea_recipe
recipe = clarify_idea_recipe()
result = PromptBuilder().build(recipe, "I want to write a polite follow-up email")
print(to_plain_text(result))
print(to_json(result))
Plain Text Output
Help me turn this writing idea into a clear request:
I want to write a polite follow-up email
Ask up to three plain-language clarification questions, then draft an improved prompt.
Layered Questions
Use PromptSessionRunner when you want the same three-question flow in Python:
The built-in clarification questions are written in English, but users can answer them in any language. The CLI, API, and JSON output preserve Unicode text such as Japanese, Chinese, French, and Arabic.
from prompt_recipe_smith import PromptBuilder
from prompt_recipe_smith.recipes import clarify_idea_recipe
from prompt_recipe_smith.session import PromptSessionRunner
runner = PromptSessionRunner(
recipe=clarify_idea_recipe(),
builder=PromptBuilder(),
)
session = runner.start("I want to plan a small workshop")
session = runner.answer(session, "A one-day facilitation agenda")
session = runner.answer(session, "First-time team leads")
session = runner.answer(session, "Keep it practical and under six hours")
result = runner.finish(session)
print(result.prompt)
Keyword Matching
Branch keywords are internal hints used to select a simple recipe path such as
writing, learning, or planning. The built-in keyword data is defined in
src/prompt_recipe_smith/recipes/builtin.py, and the matching logic is handled
by src/prompt_recipe_smith/models.py.
Notebook Demo
A Google Colab-friendly demo notebook is available at
examples/prompt_recipe_smith_colab_demo.ipynb. It shows installation, one-shot
prompt building, the three-question layered flow, multilingual answers, and JSON
output.
JSON Output
{
"prompt": "Help me turn this writing idea into a clear request:\nI want to write a polite follow-up email\n\nAsk up to three plain-language clarification questions, then draft an improved prompt.",
"recipe_name": "clarify-idea",
"user_input": "I want to write a polite follow-up email",
"selected_branch": "writing",
"steps": [
"Restate the user's rough idea.",
"Ask for the missing context only if it matters.",
"Produce a practical prompt the user can paste into chat."
],
"provider": "chatgpt",
"answers": {}
}
Development
uv sync
uv run pytest
uv run ruff check .
uv run mypy src
uv build
Scope
The first version supports plain text and JSON output. JSONL, Gemini, Anthropic, and Django integrations are future extension targets. The provider layer does not call external APIs.
Metadata
Release files for prompt-recipe-smith 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| prompt_recipe_smith-0.2.0.tar.gz | 8.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prompt_recipe_smith-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.5 kB
Release files / prompt_recipe_smith-0.2.0.tar.gz
| Download URL | prompt_recipe_smith-0.2.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbf38219e6a875b53b62edc1dfcf3880ce34ab7127944510f7db29a724e08de0
|
|
BLAKE2b-256 checksum How to use checksums |
e23fe4929b041a479c9d2d0f5fe980867693931c33b16f31b64f56d784aa2b76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logRelease files / prompt_recipe_smith-0.2.0-py3-none-any.whl
| Download URL | prompt_recipe_smith-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45d43a29ee51d0782fe6cc8128eaccc01e9b3eafda722b7ec22ea1e226bab797
|
|
BLAKE2b-256 checksum How to use checksums |
8bb97443478da5d8053495b9f71df5ce9c8102713601d6bdb42a2bb5751ce12c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logSecurity for prompt-recipe-smith 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for prompt_recipe_smith-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.