/kamal-skills:aliasesfrom kamal-skills
Define custom command aliases under the top-level `aliases` key in `config/deploy.yml` so a long, repeated `kamal` invocation becomes a single `kamal <name>`. Use it when the user says "add a Kamal alias," "shortcut kamal app exec," "make `kamal console` open a Rails console," "create a one-liner to deploy staging," "I keep retyping the same kamal command," or asks about the `aliases` config key, alias naming rules, or a `deploy -d staging` shortcut. Covers how an alias expands into a `kamal` subcommand, the lowercase letters/numbers/dashes/underscores naming rule, and the documented examples `console: app exec -i --reuse "bin/rails console"`, `uname: app exec -p -q -r web "uname -a"`, and `staging_deploy: deploy -d staging`. For the rest of `config/deploy.yml` and DRYing it up with YAML anchors, see config. For the underlying app exec / console / logs commands the aliases wrap, see app.
Ships in kamal-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in deploying applications with Kamal. Your goal is to turn the long, repetitive kamal commands a user keeps typing into short, memorable shortcuts.
Aliases are shortcuts for Kamal commands. You define them once under the top-level aliases key in config/deploy.yml, and from then on kamal <name> runs the full command for you.
Look at what the user already runs before inventing shortcuts:
config/deploy.yml. Check whether an aliases: block already exists so you extend it instead of duplicating it.kamal commands they retype most — a long app exec for a console, a per-destination deploy, a one-off shell command across a role. Those are the best alias candidates.config/deploy.staging.yml, etc.). A destination-specific alias like staging_deploy is a common win.An alias maps a name to everything you would type after kamal. Define it under the root aliases key:
aliases:
console: app exec -i --reuse "bin/rails console"
Now this:
kamal console
runs the command the alias expands to:
kamal app exec -i --reuse "bin/rails console"
| Concept | Detail |
|---|---|
| Config key | aliases, at the root of config/deploy.yml |
| Alias value | The command text that follows kamal (drop the leading kamal) |
| Invocation | kamal <name> |
| Name characters | Lowercase letters, numbers, dashes (-), and underscores (_) only |
Start from a real command the user runs often, for example opening a Rails console:
kamal app exec -i --reuse "bin/rails console"
aliases keyCopy the command into config/deploy.yml, dropping the leading kamal:
aliases:
console: app exec -i --reuse "bin/rails console"
Each alias is named and can only contain lowercase letters, numbers, dashes, and underscores. Underscores are allowed here, so staging_deploy and db_console are valid names.
kamal console
An alias can include a destination with the -d flag, which is handy for per-environment shortcuts:
aliases:
staging_deploy: deploy -d staging
kamal staging_deploy
These are the flags that appear in the documented alias examples. Use them inside an alias value exactly as you would on the command line.
| Flag | Meaning |
|---|---|
-i, --interactive | Run an interactive command, e.g. a Rails console or bash session |
--reuse | Run inside the currently running app container instead of a fresh one |
-p, --primary | Run only on the primary host |
-q, --quiet | Minimal logging |
-r, --roles | Run only on the given roles (e.g. -r web) |
-d, --destination | Use a destination's config (e.g. deploy -d staging reads deploy.staging.yml) |
aliases:
# Open a Rails console in the currently running container
console: app exec -i --reuse "bin/rails console"
# Print kernel info from the web role's primary host, quietly
uname: app exec -p -q -r web "uname -a"
# Deploy to the staging destination
staging_deploy: deploy -d staging
Each value is just a documented kamal command with its leading kamal removed. Compose your own the same way — for a fuller catalog of practical aliases and the naming rules in detail, see references/alias-cookbook.md.
For the official documentation, see Aliases.
config/deploy.yml — required keys, destinations, and DRYing up the file with YAML anchors.kamal app exec, opening a console, and running commands on servers.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub donnfelker/kamal-skills --plugin kamal-skills25 skills in this plugin
/accessoriesRun and manage accessory services — databases, Redis, search, and other long-lived dependencies your app needs — through Kamal's `accessories:` configuration and the `kamal accessory` command. Use this when the user says things like "add a MySQL/Postgres/Redis accessory," "run a database with Kamal," "kamal accessory boot," "set up a sidecar/companion service," "my app needs a cache or search container," "persist accessory data with volumes," or "reboot/restart/remove an accessory." Covers defining the accessory (image, host/hosts/role/roles/tag/tags, port, env, files, directories, volumes, network, options, registry, proxy) and operating it with boot, reboot, restart, start, stop, details, logs, exec, and remove. For passing configuration and credentials into accessories, see env and secrets. For scheduled jobs, see cron./appOperate and inspect already-running Kamal apps without redeploying. Manage app containers with `kamal app` (boot, start, stop, containers, details, images, version, logs, exec, remove, stale_containers), set maintenance/live mode (`kamal app maintenance --message`, `kamal app live`, `error_pages_path`), see every container with `kamal details`, review what ran on each server with `kamal audit`, print the resolved config with `kamal config`, run one-off and interactive commands with `kamal app exec` (`--primary/-p`, `--interactive/-i`, `--reuse`, `--raw`), and check the installed CLI version with `kamal version`. Use when the user says "boot/start/stop the app," "show running containers," "exec into the app," "open a Rails console," "run a command on all servers," "put the app in maintenance mode," "show the audit log," or "print my Kamal config." For shipping releases, see deploy. For reverting a release, see rollback. For log-driver and OTel/file config, see logging. For kamal-proxy, see proxy.Other plugins' skills for the same job