Feature Request: Add /prompt command for managing reusable custom prompts (create, edit, delete, select, auto-echo)

Resolved 💬 2 comments Opened Sep 25, 2025 by YangsonHung Closed Oct 15, 2025

What feature would you like to see?

Description
I'd like to request a new feature for Codex CLI: a built-in /prompt command to manage reusable custom prompts.

Use cases / Motivation

  • In daily coding, we often reuse similar prompts (e.g. "Write React component with Tailwind CSS", "Generate Jest unit tests", etc.).
  • Currently, we need to copy/paste these prompts manually each time.
  • A /prompt management system would allow us to store, organize, and quickly reuse prompts locally or in the cloud.

Proposed Features

  1. /prompt add <name> <content>
  • Save a custom prompt with a name (alias).
  1. /prompt list
  • Show all saved prompts.
  1. /prompt edit <name>
  • Edit an existing prompt.
  1. /prompt delete <name>
  • Remove a prompt.
  1. /prompt use <name>
  • Insert a saved prompt into the current input.
  1. Auto echo when using:
  • When selecting a prompt, automatically insert the text into the input so it can be further edited.
  1. Storage options:
  • Local file-based management (e.g. ~/.codex/prompts.json).
  • Future option: sync via cloud or account (if supported).

Example Workflow

/prompt add react_component "Write a React component with TailwindCSS and TypeScript."
/prompt use react_component

Codex CLI would auto-fill the input with:

"Write a React component with TailwindCSS and TypeScript."

And then I can edit it before sending.

Benefits

  • Greatly improves productivity by avoiding repetitive typing.
  • Provides a "personal prompt library" for different projects.
  • Fits naturally into CLI workflow (similar to /config or /mcp).

Possible Implementation

  • Store prompts in a JSON or TOML file under ~/.codex/.
  • Provide CRUD commands under /prompt.
  • Optional: support cloud sync in the future.

---

🔗 Environment

  • Codex CLI version: \[0.41.0]
  • OS: \[Windows]

---

Would you accept a PR for this feature if I (or community) draft one?

---

Are you interested in implementing this feature?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗