Skip to content

Command

A command package defines a slash command that users can invoke in their AI coding assistant. Use this type when your package provides an explicit action triggered by the user, like /audit, /review, or /deploy.

A command package sets "type": "command" in apkg.json. It uses only the base manifest fields — there are no command-specific fields.

{
"name": "@acme/audit-command",
"version": "1.0.0",
"type": "command",
"description": "Slash command to trigger a security audit",
"license": "MIT"
}

Automatic tool setup does not currently run for command packages. You can include .md definition files in your package that users can manually place in their .claude/commands/ directory. See Commands — Tool Integration for per-tool support details and workarounds.

Create a command package:

Terminal window
mkdir my-command && cd my-command
apkg init
# Choose type: command

Add a command definition:

---
name: audit
description: Run a security audit on the current project
---
Perform a security audit of this project. Check for:
1. Hardcoded secrets and credentials
2. Dependency vulnerabilities
3. Insecure API usage
4. Missing input validation
Report findings with severity levels and suggested fixes.

Publish it:

Terminal window
apkg publish