@grammeaway/pi-first-prompt
Pi agentic harness extension: /first-prompt shows the session's initial prompt for reuse, copyable via pi-clip
Package details
Install @grammeaway/pi-first-prompt from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@grammeaway/pi-first-prompt- Package
@grammeaway/pi-first-prompt- Version
1.0.0- Published
- Sep 24, 2026
- Downloads
- 201/mo · 9/wk
- Author
- grammeaway
- License
- MIT
- Types
- extension
- Size
- 5 KB
- Dependencies
- 0 dependencies · 2 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-first-prompt
Disclaimer: Extension written fully by Pi itself.
Reuse a session's initial prompt in the pi coding agent. Handy for looping over a task, or restarting with fresh context, without scrolling back through a long session to find the prompt.
Install
pi install npm:@grammeaway/pi-first-prompt
Usage
Run /first-prompt. The session's first user prompt appears in the chat,
verbatim.
With pi-clip installed, the prompt is
also added to the /clip picker, so you can copy it raw to your clipboard and
paste it into a new session.
Notes
- Display only. The prompt is shown as a custom session entry and is never
sent to the model, so
/first-promptis safe to run mid-response. - Reads the current branch of the session tree, so after navigating or forking you get that branch's first prompt. Images are left out, text parts are joined.
- Other extensions can pick up the prompt from the
clip:snippetevent onpi.events(the payload is the prompt string).
Development
npm install
npm test