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.

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"

# Health check
pe doctor

# 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.

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.5.0.tar.gz (33.0 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.5.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prompt_enhancer_cli-1.5.0.tar.gz
  • Upload date:
  • Size: 33.0 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.5.0.tar.gz
Algorithm Hash digest
SHA256 63ad5539dd414f775f3dfe639055284350282896edaa4b84e3c75a8948dddb9c
MD5 ef16eacf91077d0db0ed561db58beb04
BLAKE2b-256 ea331539a28522d359fb037cac70a5eb24123496253e2646888e2987ddab9d69

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_enhancer_cli-1.5.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.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prompt_enhancer_cli-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64622214011679f0dded20e4c8dd83aa9be731c822fb5ff62cd516ff3c676356
MD5 bcded3d03b293fda1711f0ecbba446d6
BLAKE2b-256 7fd64d3adde194ebd09f372ee11bef7aa1a23463aaa2e6445d67487781c02041

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_enhancer_cli-1.5.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