# `Codex.Prompts`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.16.1/lib/codex/prompts.ex#L1)

Custom prompt discovery and expansion helpers.

# `prompt`

```elixir
@type prompt() :: %{
  name: String.t(),
  path: String.t(),
  content: String.t(),
  description: String.t() | nil,
  argument_hint: String.t() | nil
}
```

# `expand`

```elixir
@spec expand(prompt() | map() | String.t(), String.t() | [String.t()] | map() | nil) ::
  {:ok, String.t()} | {:error, map()}
```

Expands a prompt's content using positional or named arguments.

If the prompt contains named placeholders (e.g. `$USER`), the args must be
provided as `KEY=value` pairs. Otherwise positional arguments expand `$1..$9`
and `$ARGUMENTS`.

# `list`

```elixir
@spec list(keyword()) :: {:ok, [prompt()]}
```

Lists custom prompts from `$CODEX_HOME/prompts` (or a provided directory).

## Options

  * `:dir` - override prompt directory
  * `:exclude` - list of prompt names to skip

---

*Consult [api-reference.md](api-reference.md) for complete listing*
