atmos ai skill install atmos-custom-commandsAtmos Custom Commands
Use this skill when users define or modify project-specific Atmos CLI commands in the top-level
commands section of atmos.yaml.
Custom commands replace scattered scripts with discoverable CLI commands that can use arguments, flags, environment variables, authentication identities, tool dependencies, component config, nested subcommands, and typed execution steps.
When a task is mainly about steps, step type, working_directory, step env, output,
scripts, workdirs, or hook-compatible step payloads, also load atmos-steps.
Quick Shape
commands:- name: hellodescription: Say helloarguments:- name: namedefault: Worldsteps:- type: saytext: "Hello {{ .Arguments.name }}"
atmos helloatmos hello Erik
For full field syntax, read references/command-syntax.md.
Agent Workflow
- Inspect existing
commandsinatmos.yamland imported config before adding a new command. - Prefer native typed steps over large shell blocks.
- Add flags and arguments with clear names and defaults.
- Use
dependencies.toolsfor tools the command needs in its execution context. - Use
identitywhen the command needs Atmos Auth credentials. - Verify with
atmos <command> --helpand a dry-run or read-only invocation when possible.
Native Step Preference
Default to structured steps before shell:
| Need | Prefer |
|---|---|
| Run an Atmos command | type: atmos |
| Operator messages | say, toast, markdown, table, pager |
| Data shaping | format, join, filter, write |
| Status/progress | spin, stage, log, linebreak |
| Concurrency | parallel, matrix, wait, wait-all |
| Containers/emulators | container, emulator |
| HTTP calls | http |
| Preconditions | require / assert |
| External command glue | shell / exec |
Shell is still appropriate for short glue commands, terminal-native tools, checked-in scripts, or commands that genuinely need shell semantics.
Common Patterns
Flags and Arguments
commands:- name: deploy-onearguments:- name: componentrequired: trueflags:- name: stackshorthand: srequired: truesteps:- type: atmoscommand: terraform deploy {{ .Arguments.component }} -s {{ .Flags.stack }}
Tool Dependencies
commands:- name: scandependencies:tools:checkov: "latest"steps:- type: shellcommand: checkov --directory .
Authentication
commands:- name: prod-whoamidependencies:tools:aws-cli: "^2.0.0"identity: prod-readonlysteps:- type: shellcommand: aws sts get-caller-identity
Custom Component Types
Use component_config when a custom command should resolve a component and stack before running:
commands:- name: render-apparguments:- name: componentrequired: trueflags:- name: stackshorthand: srequired: truecomponent_config:component: "{{ .Arguments.component }}"stack: "{{ .Flags.stack }}"steps:- type: shellcommand: ./scripts/render-app.sh
Routing
| Need | Skill |
|---|---|
| Complete command schema and examples | references/command-syntax.md |
| Reusable multi-step orchestration | atmos-workflows |
| Shared step fields and step types | atmos-steps |
| Tool versions and PATH behavior | atmos-toolchain |
| Auth providers, identities, assume role/root, OIDC | atmos-auth |
| Components and component inheritance | atmos-components |
| Go templates and YAML functions | atmos-templates, atmos-yaml-functions |
Guardrails
- Do not override built-in commands unless the user explicitly wants that behavior.
- Do not hide complex business logic inside inline YAML shell blocks. Move it to a checked-in script or use native step types.
- Do not use custom commands for long-lived reusable orchestration when an Atmos workflow is a better fit.
- Keep command names stable; they become user-facing CLI API.