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

# AI Commands

> Turn a task you do repeatedly into a reusable saved prompt you can trigger in any chat

# AI Commands

An AI Command is a reusable saved prompt in ChemCloud AI. It turns a task you do repeatedly — like a weekly delivery report — into a command you can trigger in any chat by typing its slug (e.g. `/weekly-delivery-report`).

The best way to create a command is with the `/create-command` command, which is seeded into every buyer profile and walks you through building, testing and saving your own.

## Commands use cases

Think of any repetitive task you do throughout the week:

* Create a summary of incoming deliveries, to email to a customer or colleage
* Check price history of a product, and compare to your most recent quotes
* Review suppliers, for DIFOT, NCRs and price movements across key products

Commands are a way to perform these tasks quickly, in a standardised way.  Importantly, you can share these across your entire team.

***

## Triggering a command

* Type the command's slug in any chat, e.g. `/weekly-delivery-report`
* Start a chat from the **+** interface in Chat
* Find commands via global search

***

## Creating a command

* Type `/create-command` in any chat — this is the primary method. It interviews you about the task, drafts the command, test-runs it on your real data, and opens the **New Command** form pre-filled for you to save
* Saved commands can also be viewed and updated directly from the commands interface

***

## Anatomy of a command

Every command has four parts:

| Part             | What it is                                                                |
| ---------------- | ------------------------------------------------------------------------- |
| **Name**         | Plain English, 2–4 words (e.g. "Weekly Delivery Report")                  |
| **Description**  | One line, under 60 characters                                             |
| **Slug**         | Lowercase, hyphenated, prefixed with `/` (e.g. `/weekly-delivery-report`) |
| **Instructions** | The saved prompt that runs when the command is triggered                  |

### Structure of the instructions

Command instructions follow a fixed shape, in this order:

1. **Role and task** — who the assistant acts as and the single outcome it produces
2. **Data sources** — the specific ChemCloud records, reports or documents to use
3. **Steps** — a numbered procedure, in the order you'd do it yourself
4. **Inputs** — what you must supply at run time, and what happens if an input is missing (ask, or use a stated default)
5. **Output format** — exactly what the command produces (table, summary, etc.)
6. **Constraints** — rules the command always follows (see below)

***

## Configuration options

| Option           | Detail                                                                                       |
| ---------------- | -------------------------------------------------------------------------------------------- |
| **Name**         | Plain-English title, 2–4 words                                                               |
| **Description**  | One-line summary, under 60 characters                                                        |
| **Slug**         | Lowercase, hyphenated trigger (e.g. `/monday-rag-report`)                                    |
| **Instructions** | The full prompt, ideally under 400 words                                                     |
| **Visibility**   | Set when saving the command via the **New Command** form (available options to be confirmed) |

Saved commands can be edited at any time from **Saved Commands**.

***

## Examples

### Creating a command with `/create-command` (primary method)

Run `/create-command` in any chat. It works in three phases:

<Steps>
  <Step title="Interview">
    It asks four questions, one at a time: what you're trying to achieve, the steps you go through now, what inputs it will need, and how you want the output.
  </Step>

  <Step title="Test drive">
    It drafts the command (name, description, slug, full instructions) and runs the draft on a real example of your data so you can see actual output before saving.
  </Step>

  <Step title="Refine and save">
    It asks what to change, revises the draft, and opens the **New Command** form pre-filled so you can set visibility and save.
  </Step>
</Steps>

<Note>
  Nothing is saved until you've seen it working and confirmed.
</Note>

### Running a saved command

Type a saved command's slug in chat and supply any required inputs:

```
/customer-shipment-report Customer: Bondi Chemicals
```

The command runs its saved instructions against that customer's open deliveries and returns the output in the saved format — for example, a RAG status table (Delivery ref, Product, Supplier, Promised date, Current ETA, Documents, Status) ordered Red → Amber → Green, with three bullets summarising what needs action this week.
