Skip to main content

What are Commands?

Commands are one of three artifact types in Packmind, alongside standards and skills. In teams using AI 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. Commands are repeatable and predictable instruction patterns that can be applied to achieve a specific outcome. Examples of commands can be:
  • Create or update domain model and the SQL schema, including database migrations
  • Add a new use case in a business domain

Creating Commands

Commands can be created in three ways:
  1. Through the web app — Create commands directly in the Packmind interface
  2. Through the MCP server — Use AI-assisted workflows for more sophisticated command creation
  3. Through the CLI — Create commands from JSON playbook files

Creating Commands in the Web App

To create a command directly in the Packmind web app:
  1. Navigate to Commands in the main menu
  2. Click Create
  3. Fill in the command details:
    • Name: A descriptive name for the command
    • Content: The instructions in Markdown format
  4. Click Save to create the command
Use the web app when you want to quickly create or edit commands manually. Use the MCP server workflow when you want AI assistance in structuring commands from your development history. Use the CLI when you have commands already defined in files.

Creating Commands with MCP Server

The MCP server provides an AI-assisted workflow through the packmind-create-command skill that helps structure well-formed commands. You can invoke the skill by:
  • Typing /packmind-create-command in your AI assistant (if slash commands are supported)
  • Running: Execute @.packmind/commands/packmind-create-command.md
The AI agent will automatically follow the command creation workflow which:
  1. Identifies the development process you want to capture
  2. Structures it into clear, actionable steps with context validation checkpoints
  3. Defines specific “when to use” scenarios
  4. Adds optional code examples to demonstrate each step
This skill is automatically installed when you run packmind-cli skills init or distribute packages to your repository.

Creating Commands with the CLI

You can create commands from the command line using JSON playbook files:
packmind-cli commands create ./my-command.json
This is useful when you have commands already defined as files in your repository or want to create commands programmatically without using the web app or MCP server. See CLI: Command-Line Interface for detailed format and examples.

Best Practices for Command Creation

To get the best results, provide rich context to your AI agent:
  • After completing a task: When you’ve accomplished a series of tasks in a session with your AI Agent, ask it to create a command based on what you’ve done
    Synthesize the steps we followed to create a new use case and create a Packmind command based on this
    
  • From Git history: A commit or pull request can reflect a command. Ask your agent to analyze commits or a Pull Request URL
    Create a command by analyzing the changes in pull request #123
    
  • From existing code: Provide files as context to extract patterns
    Create a command for adding a new API endpoint based on @routes/users.ts and @controllers/UserController.ts
    
The workflow ensures your command includes:
  • Clear step-by-step instructions
  • Context validation checkpoints (questions to ask before starting)
  • Usage scenarios (when this command applies)
  • Optional code snippets for each step
For detailed information about the command creation workflow and available MCP tools, see the MCP Server reference.

Updating Commands

Updating commands is possible from the web app, on the dedicated section of the commands.

Commands Versions

Every time you update a command, this creates a new version. This keeps track of the history of your changes, and it’s useful to keep track of which versions are currently distributed to Git repositories.

Command Identification

Each command has three identifiers:
IdentifierExamplePurpose
Name"Add a New REST Endpoint"User-facing display name in the web app
Slug"add-a-new-rest-endpoint"URL-safe identifier used for invocation and file naming
ID550e8400-e29b-41d4-a716-446655440000Internal database identifier
The slug is automatically generated from the name and used throughout the system. If you create multiple commands with similar names in the same space, Packmind appends numbers to keep slugs unique (e.g., "add-api-endpoint", "add-api-endpoint-1").

How to Use Commands After Distribution

Unlike standards (which are applied automatically), commands are user-invoked—you run them when you need them. Commands are identified and invoked using their slug (the auto-generated URL-safe name).

Using Slash Commands (Claude Code, Cursor, GitHub Copilot)

For AI assistants with native slash command support, type / followed by the command slug:
/add-a-new-rest-endpoint
The AI assistant will recognize the command by its slug and execute its instructions.

Manual Invocation (Continue, GitLab Duo, Junie, AGENTS.md)

For AI assistants without native slash command support, reference the command file by its slug:
Execute @.packmind/commands/add-a-new-rest-endpoint.md
The AI assistant will read the command file and follow its instructions. For detailed information about where commands appear for each AI assistant and all invocation methods, see Understanding Where Your Artifacts Appear.