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

# Commands

> Custom commands let you create reusable prompts and workflows as Markdown files. Use them to standardize common processes of your team into single commands and automate repetitive tasks.

export const Send = props => {
  return <div style={{
    display: "inline-flex",
    justifyContent: "center",
    alignItems: "center",
    width: "20px",
    height: "20px",
    borderRadius: "5px",
    backgroundColor: "#48de94"
  }}>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="black" strokeWidth="2" aria-hidden="true" style={{
    display: "inline"
  }} {...props}>
        <path strokeLinecap="round" strokeLinejoin="round" d="M5 10l7-7m0 0l7 7m-7-7v18"></path>
      </svg>
    </div>;
};

export const DeleteIcon = props => {
  return <div style={{
    display: "inline",
    justifyContent: "center",
    alignItems: "center"
  }}>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" stroke="currentColor" strokeWidth="0" style={{
    cursor: "pointer",
    display: "inline"
  }} {...props}>
        <g transform="scale(1.5)">
          <path fillRule="evenodd" clipRule="evenodd" d="M10 3h3v1h-1v9l-1 1H4l-1-1V4H2V3h3V2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1zM9 2H6v1h3V2zM4 13h7V4H4v9zm2-8H5v7h1V5zm1 0h1v7H7V5zm2 0h1v7H9V5z" />
        </g>
      </svg>
    </div>;
};

export const NewChat = props => {
  return <div style={{
    display: "inline",
    justifyContent: "center",
    alignItems: "center"
  }}>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="18" height="18" fill="currentColor" stroke="currentColor" strokeWidth="0" style={{
    display: "inline"
  }} {...props}>
        <path d="M14 7v1H8v6H7V8H1V7h6V1h1v6h6z"></path>
      </svg>
    </div>;
};

export const Rules = props => {
  return <div style={{
    display: "inline",
    justifyContent: "center",
    alignItems: "center"
  }}>
      <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{
    display: "inline"
  }} {...props}>
        <path d="M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13"></path>
        <path d="m8 6 2-2"></path>
        <path d="m18 16 2-2"></path>
        <path d="m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17"></path>
        <path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"></path>
        <path d="m15 5 4 4"></path>
      </svg>
    </div>;
};

You can create markdown files directly in the `./kombai/commands/` directory of your project or
add the existing commands directory path via the **Rules and Commands** tab on the [Settings](/account/settings) page.

## Run custom commands

1. [Launch Kombai extension](/get-started/set-up#launch-kombai-extension) in your IDE.
2. Type a slash `/` in the chat input box to check the available commands.
3. Select the custom command you want to run.
4. Add any other instructions you want to add to Kombai.
5. Press <kbd>Enter</kbd> or click the <Send /> button to run the command.

Kombai will now run the workflow defined in the associated Markdown.

## Add directory path

Kombai supports project-level as well as global commands. Project-level commands are specific to a project, while global commands are supported across all projects where you use Kombai.

Here's how to add a directory path:

1. Copy the path of the directory that contains your custom commands' Markdown files.
2. Click the <Rules /> icon below the chat input box to open the **Rules and Commands** tab in the [Settings](/account/settings) page.
3. Scroll to the **Commands** section.
4. Paste the path of the folder into the **Project Commands Directory** (for project-level commands) or **User Commands Directory** (for global commands) input field.
5. Click the <NewChat /> icon.

## Delete directory path

Here's how to delete a directory path:

1. [Launch Kombai extension](/get-started/set-up#launch-kombai-extension) in your IDE.
2. Click the <Rules /> icon below the chat input box to open the **Rules and Commands** tab in the [Settings](/account/settings) page.
3. Go to the **Commands** section.
4. Click the <DeleteIcon /> icon next to the directory path you want to delete. Alternatively, you can click the **Remove All** button to delete all saved directory paths.

## Team commands

Team commands let you share and discover commands across your team. Publish your local commands for team members to use, or use commands shared by others.

<Note>You need to be part of the Team plan to use team commands.</Note>

### Publish a command

You can publish any local command from your repo to your team. To publish a command:

1. [Launch Kombai extension](/get-started/set-up#launch-kombai-extension) in your IDE.
2. Click the <Rules /> icon below the chat input box.
3. Go to the **Team Commands** tab.
4. Under **Publish Your Commands**, select the local command you want to publish from the dropdown.
5. Click the **Publish** button.

The command will now be available to all members of your team.

<Note>
  You must have local commands added in the **Commands** tab before you can publish them.
</Note>

### Discover and use team commands

The **Team Commands** section lists all commands published by members of your team. You can search for commands by name or author using the search bar at the top of the list.

To use a team command, type a slash `/` in the chat input box — team commands appear alongside your local commands in the command list.

## FAQs

<AccordionGroup>
  <Accordion title="How do I add custom commands from Spec Kit and OpenSpec">
    [Spec Kit](https://github.com/github/spec-kit) and [OpenSpec](https://github.com/Fission-AI/OpenSpec) are tools that allow you to create custom commands. You can add the path to the generated commands folder via the **Rules and Commands** tab in the [Settings](/account/settings) page.

    For example, if you have a `.cursor/commands` folder created by OpenSpec, simply add that path in the settings. See ["Add directory path"](#add-directory-path) for instructions on how to add a directory.

    If you are using Spec Kit, you have to also add the path to the new *specify-rules* file, e.g., `.cursor/rules/specify-rules.mdc`. Refer to the ["Add rule path"](/features/rules#add-rule-path) guide for instructions on how to add a rule path.
  </Accordion>
</AccordionGroup>
