Kestra Operations Skill
Use this skill to perform day-to-day Kestra operations with kestractl.
When to use
Use this skill when the request includes:
- Listing, inspecting, validating, or deploying flows
- Triggering executions and checking execution status
- Managing namespaces or namespace files (
nsfiles)
- Configuring or switching Kestra CLI contexts
Kestra 2.0 migration — delegate. For Kestra 1.3 → 2.0 migration or upgrade requests (readiness checks, kestra-migrate warnings, flows failing to parse on 2.0): search the installed agent skills for one named migrate-kestra-2 — by name, wherever the user's skills are installed (project or user scope). If available, use it: it drives the migration and calls kestra-ops for kestractl sub-operations. If not installed, prompt the user to install it, then delegate:
npx skills add kestra-io/agent-skills@migrate-kestra-2
Required inputs
- Target environment or context (
dev, staging, prod)
- Host URL, tenant, and authentication method (usually token)
- Namespace, flow ID, execution ID, and/or local file paths
- Output preference (
table for human-readable, json for automation)
Prerequisites
kestractl is installed and executable
- Access token and tenant are available
- A valid context exists in
~/.kestractl/config.yaml or values are provided via env vars/flags
Configuration precedence
Resolve config from highest to lowest precedence:
- Command flags (
--host, --tenant, --token, --output)
- Environment variables (
KESTRACTL_HOST, KESTRACTL_TENANT, KESTRACTL_TOKEN, KESTRACTL_OUTPUT)
- Config file (
~/.kestractl/config.yaml)
- Built-in defaults
Common setup:
kestractl config add dev http://localhost:8080 main --token DEV_TOKEN
kestractl config add prod https://prod.kestra.io production --token PROD_TOKEN
kestractl config use dev
kestractl config show
Standard workflow
- Resolve and confirm the target context.
- Run read-only discovery first.
- Validate artifacts before any deployment.
- Execute the requested operation with explicit flags.
- Verify outcomes (
--wait for run operations where needed).
- Return a concise ops report with results and follow-up actions.
Command patterns
Flows:
kestractl flows list my.namespace
kestractl flows get my.namespace my-flow
kestractl flows validate ./flows/
kestractl flows deploy ./flows/ --namespace prod.namespace --override --fail-fast
Executions:
kestractl executions run my.namespace my-flow --wait
kestractl executions get 2TLGqHrXC9k8BczKJe5djX
Namespaces:
kestractl namespaces list
kestractl namespaces list --query my.namespace
Namespace files:
kestractl nsfiles list my.namespace --path workflows/ --recursive
kestractl nsfiles get my.namespace workflows/example.yaml --revision 3
kestractl nsfiles upload my.namespace ./assets resources --override --fail-fast
kestractl nsfiles delete my.namespace workflows --recursive
Guardrails
- Confirm production context before write operations (
deploy, upload, delete).
- Prefer
flows validate before flows deploy.
- Use
--output json for scripting and automation reliability.
- Avoid
--verbose in shared logs because it can expose credentials.
- For destructive
nsfiles actions, confirm path scope and only use --force intentionally.
Response format
- Context used (host, tenant, context name)
- Commands executed (grouped by read vs write)
- Results (success/failure and key IDs)
- Risks, rollback notes, and follow-up actions
Example prompts
- "Use
kestra-ops to validate and deploy all flows in ./flows to prod.namespace with fail-fast enabled, then report what changed."
- "Use
kestra-ops to run my-flow in my.namespace, wait for completion, and summarize execution status."
- "Use
kestra-ops to upload ./assets to namespace files under resources with override enabled, then list uploaded files recursively."
1---2name: kestra-ops3description: Operate Kestra environments using kestractl for context setup, flow inspection, flow validation and deployment, execution monitoring, namespace operations, and namespace file management. Use when users request Kestra operational CLI tasks in dev, staging, or production.4---56# Kestra Operations Skill78Use this skill to perform day-to-day Kestra operations with `kestractl`.910## When to use1112Use this skill when the request includes:13- Listing, inspecting, validating, or deploying flows14- Triggering executions and checking execution status15- Managing namespaces or namespace files (`nsfiles`)16- Configuring or switching Kestra CLI contexts1718**Kestra 2.0 migration — delegate.** For Kestra 1.3 → 2.0 migration or upgrade requests (readiness checks, `kestra-migrate` warnings, flows failing to parse on 2.0): search the installed agent skills for one named `migrate-kestra-2` — by name, wherever the user's skills are installed (project or user scope). If available, use it: it drives the migration and calls kestra-ops for kestractl sub-operations. If not installed, prompt the user to install it, then delegate:1920```bash21npx skills add kestra-io/agent-skills@migrate-kestra-222```2324## Required inputs2526- Target environment or context (`dev`, `staging`, `prod`)27- Host URL, tenant, and authentication method (usually token)28- Namespace, flow ID, execution ID, and/or local file paths29- Output preference (`table` for human-readable, `json` for automation)3031## Prerequisites3233- `kestractl` is installed and executable34- Access token and tenant are available35- A valid context exists in `~/.kestractl/config.yaml` or values are provided via env vars/flags3637## Configuration precedence3839Resolve config from highest to lowest precedence:401. Command flags (`--host`, `--tenant`, `--token`, `--output`)412. Environment variables (`KESTRACTL_HOST`, `KESTRACTL_TENANT`, `KESTRACTL_TOKEN`, `KESTRACTL_OUTPUT`)423. Config file (`~/.kestractl/config.yaml`)434. Built-in defaults4445Common setup:4647```bash48kestractl config add dev http://localhost:8080 main --token DEV_TOKEN49kestractl config add prod https://prod.kestra.io production --token PROD_TOKEN50kestractl config use dev51kestractl config show52```5354## Standard workflow55561. Resolve and confirm the target context.572. Run read-only discovery first.583. Validate artifacts before any deployment.594. Execute the requested operation with explicit flags.605. Verify outcomes (`--wait` for run operations where needed).616. Return a concise ops report with results and follow-up actions.6263## Command patterns6465Flows:6667```bash68kestractl flows list my.namespace69kestractl flows get my.namespace my-flow70kestractl flows validate ./flows/71kestractl flows deploy ./flows/ --namespace prod.namespace --override --fail-fast72```7374Executions:7576```bash77kestractl executions run my.namespace my-flow --wait78kestractl executions get 2TLGqHrXC9k8BczKJe5djX79```8081Namespaces:8283```bash84kestractl namespaces list85kestractl namespaces list --query my.namespace86```8788Namespace files:8990```bash91kestractl nsfiles list my.namespace --path workflows/ --recursive92kestractl nsfiles get my.namespace workflows/example.yaml --revision 393kestractl nsfiles upload my.namespace ./assets resources --override --fail-fast94kestractl nsfiles delete my.namespace workflows --recursive95```9697## Guardrails9899- Confirm production context before write operations (`deploy`, `upload`, `delete`).100- Prefer `flows validate` before `flows deploy`.101- Use `--output json` for scripting and automation reliability.102- Avoid `--verbose` in shared logs because it can expose credentials.103- For destructive `nsfiles` actions, confirm path scope and only use `--force` intentionally.104105## Response format106107- Context used (host, tenant, context name)108- Commands executed (grouped by read vs write)109- Results (success/failure and key IDs)110- Risks, rollback notes, and follow-up actions111112## Example prompts113114- "Use `kestra-ops` to validate and deploy all flows in `./flows` to `prod.namespace` with fail-fast enabled, then report what changed."115- "Use `kestra-ops` to run `my-flow` in `my.namespace`, wait for completion, and summarize execution status."116- "Use `kestra-ops` to upload `./assets` to namespace files under `resources` with override enabled, then list uploaded files recursively."