Skip to main content

Reverse-engineered from Auggie's Ctrl+P — transforms rough ideas into production system prompts for AI coding agents

Project description

pe Prompt Enhancer

Generate reusable 7-section agent system prompts from rough persona ideas.
With optional install helpers, benchmarking, and local history.

PyPI License: MIT Version Python 3.12+ Zero dependencies

Two CLI modes for two use cases:

  • pe persona — Generate persistent 7-section system prompts (for saving, sharing, installing into agent configs)
  • pe enhance-task — Inline task refinement with workspace context (like Auggie's Ctrl+P)

The CLI is pe (short) and prompt-enhancer (long). Both work identically.

Install

pip install prompt-enhancer-cli

Or install directly from source:

pip install git+https://github.com/hongphuc5497/prompt-enhancer.git

The PyPI distribution is prompt-enhancer-cli (the bare name prompt-enhancer was already taken). The command is still pe (or prompt-enhancer) — only the install line changes.

Set your API key:

echo "LLM_API_KEY=*** > ~/.prompt-enhancer.env

Config (~/.prompt-enhancer.env):

LLM_API_KEY=***i...ps://api.deepseek.com
LLM_MODEL=deepseek-chat

Any OpenAI-compatible API works: DeepSeek, OpenAI, OpenRouter, Together, Groq, etc.

Quick start

# Generate a 7-section system prompt
pe persona "a senior Rust developer who prefers functional programming"

# Inline task refinement (Auggie Ctrl+P style)
pe enhance-task "fix the login bug in the auth module"

# Safe install into agent config (creates backup if exists)
pe install "a security reviewer" --agent claude

# Benchmark before vs after
pe benchmark --enhance "a Go backend dev"

# Lint a prompt (static analysis, no API key)
pe lint enhanced.md

# Health check
pe doctor

# Live analytics dashboard
pe dashboard

# View analytics
pe store stats

Two modes

Command Purpose Output
pe persona Generate persistent system prompt 7 sections: ROLE, CONTEXT, RULES, TECH, FORMAT, PITFALLS, EXAMPLES
pe enhance-task Inline task refinement 3-5 sentence focused task prompt with workspace context

Both modes auto-discover workspace context (AGENTS.md, CLAUDE.md, package.json, Cargo.toml, etc.) from the current project.

What pe persona generates

  1. ROLE — Specific, well-scoped identity
  2. CONTEXT — Project specs from workspace files
  3. BEHAVIORAL RULES — Communication style, decision-making
  4. TECHNICAL GUIDELINES — Testing, code style, architecture
  5. OUTPUT FORMAT — Code blocks, explanation style
  6. PITFALLS / GUARDRAILS — Anti-patterns, security warnings
  7. EXAMPLES — 1-2 realistic interactions

Plus a "pro tip".

Benchmark

7-dimension rubric scoring (SurePrompts): Role Clarity, Context Sufficiency, Instruction Specificity, Format Structure, Example Quality, Constraint Tightness, Output Validation. Each scored 1–5, max 35.

pe benchmark --before raw.txt --after enhanced.md
pe benchmark --enhance "a Go backend dev"   # all-in-one
Score Verdict
28-35 Production-ready
21-27 Working draft
14-20 Needs major revision
7-13 Rewrite from scratch

Comparison with Auggie

Both this tool and Auggie's native --enhance-prompt have their strengths:

pe persona pe enhance-task Auggie --enhance-prompt
Best for Persistent system prompts Inline task refinement Inline task refinement
Output 7-section document 3-5 sentences 1-3 sentences
Workspace aware Yes (auto-discovers context) Yes Yes (native)
Installable Yes (pe install) No No
Reusable Save, share, version Session-scoped Session-scoped
Benchmark Built-in rubric No No
Analytics Auto-store Auto-store No

They are complementary tools, not competitors.

Profiles

Profile Focus
senior-dev Technical depth, testing, edge cases
architect System design, trade-offs, scalability
reviewer Security, performance, code smells
sre Observability, reliability, incident response
product User experience, feature prioritization
mentor Teaching, onboarding, pair-programming

Agent integration

pe install "a Rust dev..." --agent claude    # → CLAUDE.md
pe install "..." --agent codex               # → .codex/system.md
pe install "..." --agent cursor              # → .cursorrules
pe install "..." --agent all                 # → all compatible configs

Safe by default — creates .bak backup of existing files. Use --force to skip backup, --dry-run to preview.

Agent Config file Auto-loaded?
Claude Code CLAUDE.md
Codex .codex/system.md
OpenCode AGENTS.md
Cursor .cursorrules
Auggie AGENTS.md
Copilot .github/copilot-instructions.md
Aider .aider-persona.md --system-prompt flag

Analytics store

Every enhancement is auto-logged to ~/.prompt-enhancer/store.jsonl:

pe store list              # Recent enhancements
pe store stats             # Analytics
pe store search "rust"     # Search by keyword
pe store show <id>         # Detailed view
pe store delete <id>       # Remove a record
pe store clear             # Wipe all data
pe store export --format csv  # Export for analysis

First run shows a privacy notice. Use --no-store to opt out.

Dashboard

pe dashboard opens a live, scrollable analytics TUI — zero dependencies, pure stdlib ANSI. It's display-width aware (emoji and CJK align correctly) and degrades gracefully to ASCII on dumb terminals and in pipes.

pe dashboard                  # live view (default on a TTY)
pe dashboard --refresh 30     # auto-reload + redraw every 30s
pe dashboard --since 7d       # filter to the last 7 days
pe dashboard --agent claude   # filter by delegated agent
pe dashboard --ascii          # ASCII-only output

In live view: j/ k/ scroll, g/G jump to top/bottom, space pages, q/Esc quits. Piping or redirecting prints a clean one-shot snapshot and exits immediately (no hang, no escape codes).

Demo

See docs/demo.tape for the VHS terminal recording script.

Config

# ~/.prompt-enhancer.env
LLM_API_KEY=***i...ps://api.deepseek.com   # Default
LLM_MODEL=deepseek-chat                    # Default

Contributing

See CONTRIBUTING.md. PRs welcome.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prompt_enhancer_cli-1.6.0.tar.gz (39.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prompt_enhancer_cli-1.6.0-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file prompt_enhancer_cli-1.6.0.tar.gz.

File metadata

  • Download URL: prompt_enhancer_cli-1.6.0.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prompt_enhancer_cli-1.6.0.tar.gz
Algorithm Hash digest
SHA256 7b71ad9871283f801ca970a5258dad01862861ede0160ba0c29c96a2ceb8211a
MD5 14799a909f0f358baee094076e17d55f
BLAKE2b-256 5c39ebaeebe7d25e575a1861914c5e1e199237470f05af49eaf8a129d23a7060

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_enhancer_cli-1.6.0.tar.gz:

Publisher: release.yml on hongphuc5497/prompt-enhancer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompt_enhancer_cli-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prompt_enhancer_cli-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2e06452f196b489bde39b88dfca928767f267ffc954b0ee65a35103d794322d
MD5 c0f245ad7f34b745ec0ee0c186b21dac
BLAKE2b-256 1137ba30ad5ffb0587df7fb961dad5a172c2312d03eb46a3b63df82d236d28f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_enhancer_cli-1.6.0-py3-none-any.whl:

Publisher: release.yml on hongphuc5497/prompt-enhancer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page