> For the complete documentation index, see [llms.txt](https://docs.observal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.observal.io/cli-reference/prompt.md).

# observal registry prompt

Manage reusable prompt templates in the Registry. Prompts can be submitted, listed, rendered, edited, archived, restored, transferred, and shared with co-authors. Standalone prompt installation has been removed; attach prompts to agents instead.

## Commands

| Command          | Description                               |
| ---------------- | ----------------------------------------- |
| `submit`         | Submit a prompt or save a draft           |
| `list`           | List approved visible prompts             |
| `my`             | List your prompts across all statuses     |
| `show`           | Show one prompt and its template          |
| `render`         | Render a prompt with variables            |
| `edit`           | Edit a draft, pending, or rejected prompt |
| `archive`        | Archive an approved prompt                |
| `unarchive`      | Restore an archived prompt                |
| `transfer-owner` | Transfer ownership                        |
| `co-authors`     | List, add, or remove co-authors           |

All structured commands support table and JSON output.

## Submit

```bash
observal registry prompt submit \
  --name review \
  --description "Review code" \
  --category code-review \
  --template "Review {{code}}" \
  --output json

observal registry prompt submit --from-file prompt.json --output json
observal registry prompt submit --submit acme/review --output json
```

JSON mode never prompts. A plain template file requires explicit name, description, and category options. A JSON file may contain the complete payload.

Valid categories are `system-prompt`, `code-review`, `code-generation`, `testing`, `documentation`, `debugging`, and `general`.

## List and show

```bash
observal registry prompt list --category code-review --output json
observal registry prompt my --output json
observal registry prompt show acme/review --output json
```

Row numbers are scoped to the latest Prompt list. Empty Prompt lists clear previous Prompt row references. Human output escapes template text so bracketed content is rendered literally.

## Render

```bash
observal registry prompt render acme/review --var code=main.py --output json
```

Every variable must use `key=value` syntax with a non-empty key. JSON returns the direct server result. Human output prints the rendered prompt as literal text.

## Edit

```bash
observal registry prompt edit acme/review --description "Updated" --output json
observal registry prompt edit acme/review --from-file updates.json --output json
```

Invalid categories, versions, files, and edit-lock conflicts preserve their shared error category and stable exit code.

## Agent usage

Prompts are agent components rather than standalone harness installations:

```bash
observal agent add prompt <prompt-uuid>
observal agent build
```

## Related

* [`observal registry`](/cli-reference/registry.md): complete Registry reference
* [`observal agent`](/cli-reference/agent.md): compose and publish agents


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.observal.io/cli-reference/prompt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
