pi-prompt-improve
Pi coding-agent extension that rewrites the editor prompt for GPT or Claude, with shortcuts and settings.
Package details
Install pi-prompt-improve from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-prompt-improve- Package
pi-prompt-improve- Version
1.0.1- Published
- Sep 14, 2026
- Downloads
- 218/mo · 218/wk
- Author
- shahidshabbir-se
- License
- MIT
- Types
- extension
- Size
- 207.5 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-prompt-improve
A Pi coding-agent extension. It rewrites the current editor draft for GPT or Claude, or copy-edits it in English, then puts the result back in the editor.
Prerequisites
Pi with a selected model that already has credentials. The extension uses that model unless you pin a different enhancer.
Peer packages (bundled with Pi, do not install them yourself):
@earendil-works/pi-coding-agent@earendil-works/pi-ai@earendil-works/pi-tui
Install
pi install npm:pi-prompt-improve
From git:
pi install git:github.com/shahidshabbir-se/pi-prompt-improve
Current run only, not saved to settings:
pi -e npm:pi-prompt-improve
Reload Pi (/reload or restart) after a lasting install.
Do not keep both a local copy under ~/.pi/agent/extensions/pi-prompt-improve/ and the npm package enabled at the same time.
What you get
/prompt-improverewrites the editor draft for the active model family./prompt-improve:englishfixes grammar and clarity. It does not turn the text into an agent prompt.- Shortcuts:
Alt+P(rewrite) andAlt+E(English). Both are optional and remappable. - A settings menu, a status report, and one-level undo of the last rewrite.
- Optional preview before replace, auto-send of the rewritten draft, a status-bar line, and extra context from recent turns or project metadata.
If the editor is empty, /prompt-improve and the shortcuts open settings instead of rewriting.
If enabled is off, rewrite commands refuse to run until you turn the extension back on.
Commands
/prompt-improve
/prompt-improve:english
/prompt-improve undo
/prompt-improve status
/prompt-improve settings
/prompt-improve reset-settings
/prompt-improve enable|disable
/prompt-improve family auto|gpt|claude
/prompt-improve mode auto|plain|execution-contract
/prompt-improve enhancer-model active
/prompt-improve enhancer-model fixed <provider>/<id>
/prompt-improve enhancer-model family-linked <gpt-provider>/<gpt-id> <claude-provider>/<claude-id>
/prompt-improve map active <gpt|claude>
/prompt-improve map set <provider>/<id> <gpt|claude>
/prompt-improve map add <pattern> <gpt|claude>
/prompt-improve map remove <pattern>
/prompt-improve conversation on|off
/prompt-improve project-metadata on|off
/prompt-improve status-bar on|off
/prompt-improve strength light|balanced|strong
/prompt-improve preview on|off
/prompt-improve auto-send on|off
/prompt-improve auto-send-when-busy steer|follow-up
/prompt-improve preserve-code on|off
/prompt-improve timeout <seconds>
/prompt-improve help
timeout is an integer number of seconds from 5 through 300.
/prompt-improve help prints this list.
Settings file
Path: ~/.pi/agent/prompt-improve.json
The package does not ship this file. Pi creates it when you save settings. If it is missing or unreadable, these defaults apply:
| Setting | Default |
|---|---|
enabled |
true |
shortcutEnabled |
true |
shortcutKey |
alt+p |
englishShortcutEnabled |
true |
englishShortcutKey |
alt+e |
targetFamilyMode |
auto |
fallbackFamily |
gpt |
enhancerModelMode |
active |
includeRecentConversation |
false |
includeProjectMetadata |
false |
statusBarEnabled |
false |
rewriteStrength |
balanced |
rewriteMode |
auto |
previewBeforeReplace |
false |
autoSendEnhancedPrompt |
false |
autoSendBusyBehavior |
steer |
preserveCodeBlocks |
true |
enhancementTimeoutMs |
45000 |
reset-settings writes those defaults back to the file.
License
MIT