tessl i github:cteyton/packmind --skill packmind-create-commandGuide for creating reusable commands via the Packmind CLI. This skill should be used when users want to create a new command that captures multi-step workflows, recipes, or task automation for distribution to Claude.
This skill provides a complete walkthrough for creating reusable commands via the Packmind CLI.
Commands are structured, multi-step workflows that capture repeatable tasks, recipes, and automation patterns. They help teams standardize common development workflows and enable Claude to execute complex tasks consistently.
Every command playbook is a JSON file with this structure:
{
"name": "Command Name",
"summary": "What the command does, why it's useful, and when it's relevant",
"whenToUse": [
"Scenario 1 when this command applies",
"Scenario 2 when this command applies"
],
"contextValidationCheckpoints": [
"Question 1 to validate before proceeding?",
"Question 2 to ensure context is clear?"
],
"steps": [
{
"name": "Step Name",
"description": "What this step does and how to implement it",
"codeSnippet": "```typescript\n// Optional code example\n```"
}
]
}The CLI validates playbooks automatically. Requirements:
Check if packmind-cli is installed:
packmind-cli --versionIf not available, install it:
npm install -g @packmind/cliThen login to Packmind:
packmind-cli loginSkip this step only when the command's workflow and steps are already clearly defined.
To create an effective command, clearly understand:
What workflow does this command automate?
When should this command be triggered?
Example clarifying questions:
Transform the understanding from Step 1 into concrete steps.
Good descriptions:
Bad descriptions:
Questions that verify requirements before execution:
Good checkpoints:
Bad checkpoints:
Define specific, actionable scenarios:
Good scenarios:
Bad scenarios:
.packmind/commands/_drafts/ (create the folder if missing) using filename <command-slug>-draft.json (lowercase with hyphens)Example minimal playbook:
{
"name": "Create API Endpoint",
"summary": "Set up a new REST API endpoint with controller, service, and tests.",
"whenToUse": ["When adding a new REST endpoint to the API"],
"contextValidationCheckpoints": ["Is the HTTP method and path defined?"],
"steps": [
{
"name": "Create Controller",
"description": "Create the controller file in \`infra/http/controllers/\` with the endpoint handler."
}
]
}Before running the CLI command, you MUST get explicit user approval:
Show the user the complete playbook content in a formatted preview:
Provide the file path to the draft JSON file (.packmind/commands/_drafts/<command-slug>-draft.json) so users can open and edit it directly if needed.
Ask: "Here is the command that will be created on Packmind. The draft file is at `<path>` if you want to review or edit it. Do you approve?"
Wait for explicit user confirmation before proceeding to Step 5.
If the user requests changes, edit the draft file and re-submit for approval.
Run the packmind-cli command to create the command:
packmind-cli commands create <path-to-playbook.json> --origin-skill=create-commandExample:
packmind-cli commands create ./.packmind/commands/_drafts/create-api-endpoint-draft.json --origin-skill=create-commandExpected output on success:
packmind-cli Command "Your Command Name" created successfully (ID: <uuid>)
View it in the webapp: <url>"Not logged in" error:
packmind-cli login"Failed to resolve global space" error:
JSON validation errors:
After the command is successfully created, delete the temporary files:
.packmind/commands/_drafts/ (e.g., <command-slug>-draft.json)Only clean up on success - if the CLI command fails, keep the files so the user can retry.
After successful creation, check if the command fits an existing package:
packmind-cli install --list to get available packages<package-slug> package."<package-slug>packmind-cli packages add --to <package-slug> --command <command-slug> --origin-skill=create-commandpackmind-cli install to sync the changes?"packmind-cli installHere's a complete example creating a command for setting up a new API endpoint:
File: create-api-endpoint.command.playbook.json
{
"name": "Create API Endpoint",
"summary": "Set up a new REST API endpoint with controller, service, and tests following the hexagonal architecture pattern.",
"whenToUse": [
"When adding a new REST endpoint to the API",
"When implementing a new backend feature that exposes HTTP endpoints"
],
"contextValidationCheckpoints": [
"Is the HTTP method and path defined (e.g., POST /users)?",
"Is the request/response payload structure specified?",
"Is the associated use case or business logic identified?"
],
"steps": [
{
"name": "Create Controller",
"description": "Create the controller file in the \`infra/http/controllers/\` directory with the endpoint handler and input validation.",
"codeSnippet": "```typescript\n@Controller('users')\nexport class UsersController {\n @Post()\n async create(@Body() dto: CreateUserDTO) {\n return this.useCase.execute(dto);\n }\n}\n```"
},
{
"name": "Create Use Case",
"description": "Create the use case in the \`application/useCases/\` directory implementing the business logic."
},
{
"name": "Create Tests",
"description": "Create unit tests for the controller and use case in their respective \`.spec.ts\` files following the Arrange-Act-Assert pattern."
},
{
"name": "Register in Module",
"description": "Add the controller and use case to the appropriate NestJS module's \`controllers\` and \`providers\` arrays."
}
]
}Creating the command:
packmind-cli commands create ./.packmind/commands/_drafts/create-api-endpoint-draft.json --origin-skill=create-command| Field | Required | Description |
|---|---|---|
| name | Yes | Command name |
| summary | Yes | What, why, and when (one sentence) |
| whenToUse | Yes | At least one scenario |
| contextValidationCheckpoints | Yes | At least one checkpoint question |
| steps | Yes | At least one step |
| steps[].name | Yes | Step title |
| steps[].description | Yes | Implementation details |
| steps[].codeSnippet | No | Markdown code block with language (e.g., ```ts) |
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.