actions
Helps configure and implement Mighty actions for repeatable, typed operations.
Install
mkdir -p .claude/skills/actions-indexedlabs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12803" && unzip -o skill.zip -d .claude/skills/actions-indexedlabs && rm skill.zipInstalls to .claude/skills/actions-indexedlabs
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Guide for creating, configuring, and leveraging Mighty actions (action_def), specifically focusing on sandbox_command bindings and the use of setup/teardown commands to execute safe repo-local operations. Use when users ask to define actions, leverage setup_commands/teardown_commands, or understand the action execution model.Key capabilities
- →Define typed, repeatable operations
- →Specify input and output schemas for actions
- →Bind actions to `sandbox_command` for local execution
- →Execute setup commands before the main action command
- →Execute teardown commands after the main action command
- →Manage actions via upserting and publishing
How it works
This skill defines actions using JSON payloads that specify identity, I/O schemas, and execution bindings, allowing for safe, repo-local script execution within an isolated environment.
Inputs & outputs
When to use actions
- →Define new action
- →Configure sandbox command
- →Setup action workflow
About this skill
Actions
Overview
Mighty Actions (action_def) define typed, repeatable operations. They provide a safe surface to execute repo-local code, invoke internal tools, or run validation scripts with explicitly declared inputs and outputs.
Actions are defined via local JSON payloads and upserted using the Mighty CLI. This ensures versioned, repeatable execution with clear schemas.
Action Definitions
To define an action, you author a JSON file describing its identity, I/O schemas, and its execution binding.
Key Properties
action_id: A unique string identifier.name/description: Human-readable labels.input_schema_json: A standard JSON Schema defining what arguments the action accepts. The action runner will write these to${workdir}/.mighty/action_input.json.output_schema_json: A JSON Schema defining what the action returns. The action must write its result to${workdir}/.mighty/action_output.json.binding: Describes how the action runs. The primary binding type for local code execution issandbox_command.
Sandbox Command Binding
The sandbox_command binding provisions an isolated environment where repo-local scripts can run safely. It supports specific lifecycle stages, including setup and teardown commands.
Binding Configuration
type: Must be"sandbox_command".workdir(optional): The working directory relative to the repository root.command: The primary command/script to execute (e.g.,"scripts/run_eval.sh").args(optional): An array of arguments to pass to the main command.setup_commands(optional): An array of shell commands executed sequentially before the main command. Useful for installing dependencies or preparing the environment (e.g.,["npm install", "make clean"]). If any setup command fails, the action terminates early.teardown_commands(optional): An array of shell commands executed sequentially after the main command exits. Useful for cleanup (e.g.,["docker-compose down"]). Teardown commands run even if the main command fails, but their failures do not override the main command's exit status.env(optional): Key-value pairs for environment variables.config_ref(optional): Materializes the space's config profile (proxy bounds, secrets) into the sandbox.
Example: Defining an Action with Setup & Teardown
Here is an example action.json payload that leverages setup_commands and teardown_commands:
{
"action_id": "run_integration_tests",
"name": "Run Integration Tests",
"description": "Executes the integration test suite safely within the sandbox.",
"input_schema_json": {
"type": "object",
"properties": {
"test_suite": {
"type": "string",
"enum": ["api", "frontend"]
}
},
"required": ["test_suite"]
},
"output_schema_json": {
"type": "object",
"properties": {
"passed": { "type": "boolean" },
"coverage_percent": { "type": "number" }
},
"required": ["passed"]
},
"binding": {
"type": "sandbox_command",
"workdir": "tests/integration",
"setup_commands": [
"npm ci",
"docker-compose -f docker-compose.test.yml up -d db",
"npm run wait-for-db"
],
"command": "npm",
"args": ["run", "test:ci"],
"teardown_commands": [
"docker-compose -f docker-compose.test.yml down -v"
]
}
}
Managing Actions
-
Upsert the action: Use the CLI to create or update the draft definition.
mt action upsert --file action.json -
Publish the action: Once validated, publish the action so it becomes immutable and available for runs.
mt action publish <action_id> -
Run the action: You can trigger it using
mt action run, passing the inputs.mt action run <action_id> --input '{"test_suite": "api"}'
Best Practices
- Always use
setup_commandsfor dependencies rather than embeddingnpm install && ./run.shin the maincommand. This keeps the execution phases clean and easier to debug. - Use
teardown_commandsto ensure resources are cleaned up regardless of whether the maincommandsucceeded or failed. - Design actions to be non-interactive. The sandbox runner will not answer prompts.
- Output artifacts should be captured by writing to
${workdir}/.mighty/action_output.json, asstdout/stderrare treated as logs rather than structured data.
When not to use it
- →When embedding `npm install && ./run.sh` in the main `command`
- →When actions are expected to be interactive
- →When `stdout`/`stderr` are used for structured data output
Limitations
- →Actions are intended to be non-interactive
- →Output artifacts must be written to `${workdir}/.mighty/action_output.json`
- →Failures in teardown commands do not override the main command's exit status
How it compares
This workflow provides a structured and isolated environment for executing repo-local operations with explicit setup and teardown phases, offering more control and safety than running arbitrary scripts.
Compared to similar skills
actions side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| actions (this skill) | 0 | 5mo | Review | Intermediate |
| bazel-build-optimization | 14 | 2mo | No flags | Advanced |
| github-actions-templates | 7 | 3mo | No flags | Intermediate |
| cicd-automation-workflow-automate | 3 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by indexedlabs
View all by indexedlabs →You might also like
bazel-build-optimization
wshobson
Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.
github-actions-templates
wshobson
Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates.
cicd-automation-workflow-automate
sickn33
You are a workflow automation expert specializing in creating efficient CI/CD pipelines, GitHub Actions workflows, and automated development processes. Design automation that reduces manual work, improves consistency, and accelerates delivery while maintaining quality and security.
cli-commands
windmill-labs
MUST use when using the CLI.
monitor-ci
nrwl
Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", wants to track CI status, or needs help with self-healing CI fixes
nx-run-tasks
nrwl
Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.