Production-grade prompt engineering toolkit. Score, optimize, and generate prompts.
Project description
PromptForge Pro ๐ฅ
Production-grade prompt engineering toolkit for ChatGPT, Claude, Gemini, and every LLM.
Stop writing bad prompts. PromptForge Pro scores, optimizes, and generates battle-tested prompts from a library of 50+ templates โ entirely from your terminal.
What's Inside
| Module | What it does |
|---|---|
| Scorer | Rates any prompt 0โ100 across 6 dimensions with specific fix suggestions |
| Optimizer | Rewrites weak prompts โ auto-injects roles, format specs, constraints |
| Templates | 50+ ready-to-fill prompt templates across 15 categories |
| Compare | A/B tests two prompt variants with scoring |
| Batch | Optimize 20+ prompts in one command |
| API | Full REST API โ deploy to RapidAPI, Render, or your own server |
Installation
pip install -r requirements.txt
No API keys needed for the core toolkit. Everything runs locally.
CLI Usage
Score a prompt
python -m promptforge.cli score "Write a blog post about AI"
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PROMPT SCORE: 51.0/100 [D โ Weak]
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Clarity โโโโโโโโโโ 10.0/10
Specificity โโโโโโโโโโ 5.0/10
Context โโโโโโโโโโ 4.0/10
Format โโโโโโโโโโ 4.0/10
Constraints โโโโโโโโโโ 4.0/10
Completeness โโโโโโโโโโ 2.0/10
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ISSUES:
โ No role assigned to the AI
โ No output format specified
โ Prompt is extremely short
SUGGESTIONS:
โ Add 'You are a [role]...' to anchor behavior
โ Specify format: list, JSON, paragraphs, etc.
โ Expand with context and constraints
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Optimize a prompt
python -m promptforge.cli optimize "Write a blog post about AI"
Score: 51.0 โ 65.0 (+14.0 improvement)
Changes:
โ Added role: 'You are an expert content strategist'
โ Added format hint: 'Structure your response with clear sections'
โ Added conciseness instruction
Compare two prompts
python -m promptforge.cli compare "Tell me about Python" "You are a Python expert. Explain Python's GIL in 150 words with a practical example."
Browse templates
python -m promptforge.cli templates
python -m promptforge.cli templates --category coding
python -m promptforge.cli search "email"
Fill a template interactively
python -m promptforge.cli fill blog_outline
Template: Blog Post Outline Builder
Required variables:
ยท topic
ยท keyword
ยท word_count
ยท level
Enter values:
topic: How to use AI for freelancing
keyword: AI freelancing
...
Batch optimize from file
python -m promptforge.cli batch --file prompts.txt --output results.json
Start the REST API
python -m promptforge.cli serve
# โ http://localhost:8000
# โ http://localhost:8000/docs
Template Categories (50+ templates)
| Category | Templates |
|---|---|
| AI / Prompt Engineering | Prompt optimizer, System prompt architect, Few-shot builder, CoT builder |
| Business | Email composer, Executive summary, Cold pitch, Meeting agenda |
| Marketing | Product descriptions, Ad copy, SEO meta, Brand voice |
| Coding | Code review, Bug fix, API docs, Unit tests, Refactor |
| Content | Blog outlines, YouTube scripts, Newsletters, Twitter threads |
| Data | Data analysis, SQL generator, Report narrator |
| Education | Lesson plans, Concept explainer, Quiz generator |
| Creative | Story outlines, Character profiles, Poem generator |
| Productivity | Task breakdown, Decision framework, Weekly planner |
| HR | Job descriptions, Performance reviews |
| Finance | Financial summaries, Investment thesis |
| Support | Customer responses, FAQ generator |
| Legal | T&C drafter, Privacy policy sections |
| Health | Fitness plans, Meal planners |
| Research | Literature review, Hypothesis builder |
Python API
from promptforge.scorer import score_prompt
from promptforge.optimizer import optimize_prompt
from promptforge.templates import fill_template, search_templates
# Score
result = score_prompt("your prompt here")
print(result.total) # 0-100
print(result.grade) # "A โ Strong"
print(result.suggestions) # list of improvements
# Optimize
opt = optimize_prompt("write a poem about cats")
print(opt.optimized) # improved prompt
print(opt.improvement) # +N points
# Use a template
prompt = fill_template("code_review", {
"language": "Python",
"code": "def add(a,b): return a+b"
})
# Search templates
results = search_templates("email")
REST API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /score |
Score a prompt |
| POST | /optimize |
Optimize a prompt |
| POST | /compare |
Compare two prompts |
| POST | /batch-optimize |
Batch optimize up to 20 |
| GET | /templates |
List all templates |
| GET | /templates/{key} |
Get single template |
| POST | /templates/fill |
Fill a template |
| GET | /categories |
List categories |
| GET | /search?q= |
Search templates |
Full Swagger docs at /docs when running locally.
Deploy to Render (Free)
# render.yaml is included โ just connect your repo
# Free tier: 750 hours/month, spins up on request
License
MIT โ use it, sell it, build on it.
Built with Python 3.10+ ยท No external AI APIs required ยท Works offline
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file promptforge_pro-1.0.0.tar.gz.
File metadata
- Download URL: promptforge_pro-1.0.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eafdcf8ee3e907d654cbd40ff1cbc2d37032bfaf937fb2d0c06eaea2a33110c2
|
|
| MD5 |
7225ec3c9d76955ba1b4d39ab25de862
|
|
| BLAKE2b-256 |
3a29682e694c381add48cab2029aff7e4badd152bd600c6ab97509668d959efc
|
File details
Details for the file promptforge_pro-1.0.0-py3-none-any.whl.
File metadata
- Download URL: promptforge_pro-1.0.0-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e360c53446a8fb9fdbedc1c6d85c1dfa140d30fc29f4c330936c99cd39c91d6f
|
|
| MD5 |
364aa3b226976f8a0f932aaed87fd20d
|
|
| BLAKE2b-256 |
f173c6fcc9ec654ad022b9ea0179b8d83ae2bf2413f3620f27caab51d18909f2
|