Install
Install with PiG
pig install npm:pi-prompt-improveInstall with Pi
pi install npm:pi-prompt-improvePackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./dist/index.js"
]
}README
Written by the package's publisher, shown as published in version 1.1.0 (README.md). PiG does not review it.
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.
Highlights & Performance
- Pre-bundled distribution: Ships pre-compiled ESM bundle (
dist/index.js) for instant Pi startup with zero runtime TypeScript transpilation overhead. - Model-targeted enhancement: Rewrites prompts specifically for GPT reasoning or Claude XML structure, or polishes English clarity.
- Context-aware: Integrates recent turns, skills, and subagent metadata into rewriting context when enabled.
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