> ## Documentation Index
> Fetch the complete documentation index at: https://packmind-feat-rename-cli-packmind.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create your first command

In teams using coding assistants, sharing and reusing *prompts that work* is often tedious.

A Packmind **Command** is an executable, step-by-step guide that tells the AI assistant exactly how to perform a development task so your team's practices are applied consistently and reproducibly.

**Examples**

* “Add a new REST endpoint” — steps to define the route, implement the handler, add input validation, write tests, and update API docs.
* “Set up a CI pipeline for a project” — steps to configure the workflow, run lint/tests/build on each push/PR, and report status checks.

## How to

You can create commands using the `/packmind-create-command` command in your AI coding assistant.

1. Open your IDE and your coding assistant in **agentic mode**.
2. For this demo, we will create a **language-agnostic command**. (You can also target a specific language or framework.)
3. Type this command:

```
/packmind-create-command
```

Or use a natural language prompt:

```text theme={null}
Analyze our codebase and create a Packmind command to add a new endpoint to our API.
```

<Tip>
  **Guided Creation** — The `/packmind-create-command` skill provides
  step-by-step guidance through the entire creation process, ensuring your
  command is well-structured and reusable.
</Tip>

### How it works

The AI agent will automatically follow the **command creation workflow** which guides it through:

1. **Understanding the process** - The agent identifies the development process you want to capture as a command
2. **Structuring the command** - The agent breaks down the process into clear, actionable steps with:
   * **When to use** scenarios - Specific situations where the command applies
   * **Context validation checkpoints** - Questions to clarify before implementing
   * **Step-by-step instructions** - Atomic, repeatable actions with optional code examples
3. **Finalization** - Once structured properly, the agent creates the command in Packmind

Your new command will be available in the Packmind web app, in the **Commands** panel.

<Tip>
  The workflow ensures commands are well-structured and reusable by enforcing
  clear steps, validation checkpoints, and usage scenarios. This makes them
  effective for AI agents and team members alike.
</Tip>

## Tips

The quality of the generated command depends mostly on the level of detail you provide.

When capturing a **Command**, you can, for example:

* **Use the current conversation**

  **Example**

  ```text theme={null}
  Create a Packmind command for adding a new endpoint based on your last suggested changes.
  ```

* **Mention example files or directories**

  **Example**

  ```text theme={null}
  Using the file `MyPageFile.tsx`, create a Packmind command for bootstrapping a new page in the frontend.
  ```

* **Use a Git commit diff**

  **Example**

  ```text theme={null}
  Read commit abcd123 and create a command for migrating an Angular component to React.
  ```

## What Makes a Good Command

* **Clear purpose** — The command name and summary clearly explain what it accomplishes
* **Realistic scenarios** — The "When to use" section covers actual situations your team encounters
* **Validation checkpoints** — Questions clarify prerequisites and assumptions
* **Actionable steps** — Each step is specific and can be completed independently
* **Helpful examples** — Code snippets demonstrate what to do, not just explain it
