> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerotwo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Prompts

Custom prompts are deprecated. Use [skills](/build-skills) for reusable
instructions that ZeroCode can invoke explicitly or implicitly.

Custom prompts (deprecated) let you turn Markdown files into reusable prompts that you can invoke as slash commands in both the ZeroTwo desktop app and the ZeroTwo desktop app.

Custom prompts require explicit invocation and live in your local ZeroCode home directory (for example, `~/.zerotwo`), so they're not shared through your repository. If you want to share a prompt (or want ZeroCode to implicitly invoke it), [use skills](/build-skills).

1. Create the prompts directory:

```bash theme={null}
   mkdir -p ~/.zerotwo/prompts
```

2. Create `~/.zerotwo/prompts/draftpr.md` with reusable guidance:

```markdown theme={null}
   ---
   description: Prep a branch, commit, and open a draft PR
   argument-hint: [FILES=<paths>] [PR_TITLE="<title>"]
   ---

   Create a branch named `dev/<feature_name>` for this work.
   If files are specified, stage them first: $FILES.
   Commit the staged changes with a clear message.
   Open a draft PR on the same branch. Use $PR_TITLE when supplied; otherwise write a concise summary yourself.
```

3. Restart ZeroCode so it loads the new prompt (restart your CLI session, and reload the desktop app if you are using it).

Expected: Typing `/prompts:draftpr` in the slash command menu shows your custom command with the description from the front matter and hints that files and a PR title are optional.

## Add metadata and arguments

ZeroCode reads prompt metadata and resolves placeholders the next time the session starts.

* **Description:** Shown under the command name in the popup. Set it in YAML front matter as `description:`.
* **Argument hint:** Document expected parameters with `argument-hint: KEY=<value>`.
* **Positional placeholders:** `$1` through `$9` expand from space-separated arguments you provide after the command. `$ARGUMENTS` includes them all.
* **Named placeholders:** Use uppercase names like `$FILE` or `$TICKET_ID` and supply values as `KEY=value`. Quote values with spaces (for example, `FOCUS="loading state"`).
* **Literal dollar signs:** Write `$$` to emit a single `$` in the expanded prompt.

After editing prompt files, restart ZeroCode or open a new chat so the updates load. ZeroCode ignores non-Markdown files in the prompts directory.

## Invoke and manage custom commands

1. In ZeroCode (CLI or desktop app), type `/` to open the slash command menu.
2. Enter `prompts:` or the prompt name, for example `/prompts:draftpr`.
3. Supply required arguments:

```text theme={null}
   /prompts:draftpr FILES="src/pages/index.astro src/lib/api.ts" PR_TITLE="Add hero animation"
```

4. Press Enter to send the expanded instructions (skip either argument when you don't need it).

Expected: ZeroCode expands the content of `draftpr.md`, replacing placeholders with the arguments you supplied, then sends the result as a message.

Manage prompts by editing or deleting files under `~/.zerotwo/prompts/`. ZeroCode scans only the top-level Markdown files in that folder, so place each custom prompt directly under `~/.zerotwo/prompts/` rather than in subdirectories.
