Orchestrate workflows with mise [tasks]. TRIGGERS - mise tasks, mise run, task runner, depends, depends_post, workflow automation, task dependencies.
/plugin marketplace add terrylica/cc-skills/plugin install terrylica-itp-plugins-itp@terrylica/cc-skillsThis skill is limited to using the following tools:
references/advanced.mdreferences/arguments.mdreferences/patterns.mdOrchestrate multi-step project workflows using mise [tasks] section with dependency management, argument handling, and file tracking.
Explicit triggers:
mise tasks, mise run, [tasks] sectiondepends, depends_post.mise.tomlusage specAI Discovery trigger (prescriptive):
When
mise-configurationskill detects multi-step workflows (test suites, build pipelines, migrations), prescriptively invoke this skill to generate appropriate[tasks]definitions.
[tasks.build]
description = "Build the project"
run = "cargo build --release"
mise run build # Run single task
mise run test build # Run multiple tasks
mise run test ::: build # Run in parallel
mise r build # Short form
| Type | Syntax | When |
|---|---|---|
depends | depends = ["lint", "test"] | Run BEFORE task |
depends_post | depends_post = ["notify"] | Run AFTER task succeeds |
wait_for | wait_for = ["db"] | Wait only if running |
[tasks.hello]
run = "echo 'Hello, World!'"
[tasks.test]
description = "Run test suite"
run = "pytest tests/"
[tasks.test]
description = "Run test suite"
alias = "t"
run = "pytest tests/"
Now mise run t works.
[tasks.frontend]
dir = "packages/frontend"
run = "npm run build"
[tasks.test]
env = { RUST_BACKTRACE = "1", LOG_LEVEL = "debug" }
run = "cargo test"
Note: env values are NOT passed to dependency tasks.
For multi-account GitHub setups, add a verification task:
[tasks._verify-gh-auth]
description = "Verify GitHub token matches expected account"
hide = true # Hidden helper task
run = """
expected="${GH_ACCOUNT:-}"
if [ -z "$expected" ]; then
echo "GH_ACCOUNT not set - skipping verification"
exit 0
fi
actual=$(gh api user --jq '.login' 2>/dev/null || echo "")
if [ "$actual" != "$expected" ]; then
echo "ERROR: GH_TOKEN authenticates as '$actual', expected '$expected'"
exit 1
fi
echo "✓ GitHub auth verified: $actual"
"""
[tasks.release]
description = "Create semantic release"
depends = ["_verify-gh-auth"] # Verify before release
run = "npx semantic-release --no-ci"
See mise-configuration skill for GH_TOKEN setup.
SSH ControlMaster Warning: If using multi-account SSH, ensure
ControlMaster nois set for GitHub hosts in~/.ssh/config. Cached connections can authenticate with the wrong account.
[tasks.setup]
run = [
"npm install",
"npm run build",
"npm run migrate"
]
[tasks.deploy]
depends = ["test", "build"]
run = "kubectl apply -f deployment.yaml"
Tasks test and build run BEFORE deploy.
[tasks.release]
depends = ["test"]
depends_post = ["notify", "cleanup"]
run = "npm publish"
After release succeeds, notify and cleanup run automatically.
[tasks.migrate]
wait_for = ["database"]
run = "./migrate.sh"
If database task is already running, wait for it. Otherwise, proceed.
[tasks.ci]
description = "Full CI pipeline"
depends = ["lint", "test", "build"]
depends_post = ["coverage-report"]
run = "echo 'CI passed'"
Single command: mise run ci executes entire chain.
Dependencies without inter-dependencies run in parallel:
[tasks.validate]
depends = ["lint", "typecheck", "test"] # These can run in parallel
run = "echo 'All validations passed'"
[tasks._check-credentials]
description = "Verify credentials are set"
hide = true
run = '''
if [ -z "$API_KEY" ]; then
echo "ERROR: API_KEY not set"
exit 1
fi
'''
[tasks.deploy]
depends = ["_check-credentials"]
run = "deploy.sh"
Hidden tasks don't appear in mise tasks output but can be dependencies.
View hidden tasks: mise tasks --hidden
[tasks.test]
run = "pytest"
[tasks."test:unit"]
run = "pytest tests/unit/"
[tasks."test:integration"]
run = "pytest tests/integration/"
[tasks."test:e2e"]
run = "playwright test"
Run all test tasks: mise run 'test:*'
mise run 'test:*' # All tasks starting with test:
mise run 'db:**' # Nested: db:migrate:up, db:seed:test
[tasks.deploy]
description = "Deploy to environment"
usage = '''
arg "<environment>" help="Target environment" {
choices "dev" "staging" "prod"
}
flag "-f --force" help="Skip confirmation"
flag "--region <region>" default="us-east-1" env="AWS_REGION"
'''
run = '''
echo "Deploying to ${usage_environment}"
[ "$usage_force" = "true" ] && echo "Force mode enabled"
echo "Region: ${usage_region}"
'''
Required positional:
usage = 'arg "<file>" help="Input file"'
Optional positional:
usage = 'arg "[file]" default="config.toml"'
Variadic (multiple values):
usage = 'arg "<files>" var=#true'
Boolean flag:
usage = 'flag "-v --verbose"'
# Access: ${usage_verbose:-false}
Flag with value:
usage = 'flag "-o --output <file>" default="out.txt"'
# Access: ${usage_output}
Environment-backed flag:
usage = 'flag "--port <port>" env="PORT" default="8080"'
In run scripts, arguments become usage_<name> environment variables:
/usr/bin/env bash << 'SKILL_SCRIPT_EOF'
${usage_environment} # Required arg value
${usage_verbose:-false} # Boolean flag with default
${usage_output} # Flag with value
SKILL_SCRIPT_EOF
DEPRECATION WARNING: The Tera template method ({{arg(name="...")}}) will be removed in mise 2026.11.0. Use usage spec instead.
For complete argument syntax, see: arguments.md
[tasks.build]
sources = ["Cargo.toml", "src/**/*.rs"]
run = "cargo build"
Task re-runs only when source files change.
[tasks.build]
sources = ["Cargo.toml", "src/**/*.rs"]
outputs = ["target/release/myapp"]
run = "cargo build --release"
If outputs are newer than sources, task is skipped.
mise run build --force # Bypass caching
[tasks.compile]
outputs = { auto = true } # Default behavior
run = "gcc -o app main.c"
[tasks.drop-database]
confirm = "This will DELETE all data. Continue?"
run = "dropdb myapp"
[tasks.quiet-task]
quiet = true # Suppress mise's output (not task output)
run = "echo 'This still prints'"
[tasks.silent-task]
silent = true # Suppress ALL output
run = "background-job.sh"
[tasks.silent-stderr]
silent = "stderr" # Only suppress stderr
run = "noisy-command"
[tasks.edit-config]
raw = true # Direct stdin/stdout/stderr
run = "vim config.yaml"
Warning: raw = true disables parallel execution.
[tasks.legacy-test]
tools = { python = "3.9", node = "18" }
run = "pytest && npm test"
Use specific tool versions for this task only.
[tasks.powershell-task]
shell = "pwsh -c"
run = "Get-Process | Select-Object -First 5"
mise watch build # Re-run on source changes
Requires watchexec: mise use -g watchexec@latest
mise watch build --debounce 500ms # Wait before re-run
mise watch build --restart # Kill and restart on change
mise watch build --clear # Clear screen before run
mise watch build --on-busy-update=queue # Queue changes
mise watch build --on-busy-update=restart # Restart immediately
mise watch build --on-busy-update=do-nothing # Ignore (default)
Requires: MISE_EXPERIMENTAL=1 and experimental_monorepo_root = true
mise run //projects/frontend:build # Absolute from root
mise run :build # Current config_root
mise run //...:test # All projects
mise run '//projects/...:build' # Build all under projects/
mise run '//projects/frontend:*' # All tasks in frontend
Tasks in subdirectories are auto-discovered with path prefix:
packages/api/.mise.toml tasks → packages/api:tasknameFor complete monorepo documentation, see: advanced.md
Tasks automatically inherit [env] values:
[env]
DATABASE_URL = "postgresql://localhost/mydb"
_.file = ".env" # Load additional env vars
[tasks.migrate]
run = "diesel migration run" # $DATABASE_URL available
[env]
_.file = { path = ".env.secrets", redact = true }
[tasks._check-env]
hide = true
run = '[ -n "$API_KEY" ] || { echo "Missing API_KEY"; exit 1; }'
[tasks.deploy]
depends = ["_check-env"]
run = "deploy.sh"
| Anti-Pattern | Why Bad | Instead |
|---|---|---|
| Replace /itp:go with mise tasks | No TodoWrite, no ADR tracking, no checkpoints | Use mise tasks for project workflows, /itp:go for ADR-driven development |
| Hardcode secrets in tasks | Security risk | Use _.file = ".env.secrets" with redact = true |
| Giant monolithic tasks | Hard to debug, no reuse | Break into small tasks with dependencies |
Skip description | Poor discoverability | Always add descriptions |
Prerequisites: Before defining tasks, ensure [env] section is configured.
PRESCRIPTIVE: After defining tasks, invoke
mise-configurationskill to ensure [env] SSoT patterns are applied.
The mise-configuration skill covers:
[env] - Environment variables with defaults[settings] - mise behavior configuration[tools] - Version pinning_.file, _.path, _.python.venvThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.