# @grammeaway/pi-first-prompt

> Pi agentic harness extension: /first-prompt shows the session's initial prompt for reuse, copyable via pi-clip

Latest version **1.0.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @grammeaway/pi-first-prompt
pnpm add @grammeaway/pi-first-prompt
yarn add @grammeaway/pi-first-prompt
bun add @grammeaway/pi-first-prompt
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2026-09-24 |
| First published | 2026-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Victor Gram Thomsen |
| Maintainers | grammeaway |
| Keywords | pi, pi-extension, prompt, reuse, loop, pi-clip, pi-package |

## Links

- npm: https://www.npmjs.com/package/@grammeaway/pi-first-prompt
- Repository: https://github.com/grammeaway/pi-first-prompt
- Homepage: https://github.com/grammeaway/pi-first-prompt#readme
- Issues: https://github.com/grammeaway/pi-first-prompt/issues
- npm.io page: https://npm.io/package/@grammeaway/pi-first-prompt

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2026-09-24

## README

# pi-first-prompt

Disclaimer: Extension written fully by Pi itself.

Reuse a session's initial prompt in the
[pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) 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

```bash
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](https://github.com/grammeaway/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-prompt` is 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:snippet` event on
  `pi.events` (the payload is the prompt string).

## Development

```bash
npm install
npm test
```

---
_Source: https://npm.io/package/@grammeaway/pi-first-prompt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
