act — Claude Code command: run GitHub Actions locally
Run a GitHub Actions workflow locally with act, inspect available workflows, and check the Docker setup. Useful when you want to test CI from your project.
npx claude-code-templates@latest --command automation/actWhat act does
The command looks for workflows under .github/workflows/ and can run one by name. Without a workflow name, it can list the available workflows. Before execution, it checks that act is installed and Docker is running, then considers workflow triggers and .actrc settings if that file exists.
Secrets can come from .env or .secrets. Use --verbose to see more output, --dry-run for a trial run, or act --list to inspect workflows. Docker must be running for local execution. The command is listed for Claude Code, with installation paths also provided for Codex, GitHub Copilot, and Gemini CLI.
What it helps with
- run a selected GitHub Actions workflow on the local machine
- list workflows available in a project
- check Docker and
actbefore starting a workflow - inspect detailed output or try a dry run
Example prompts for the agent
- Run the
buildworkflow locally withact. - List the GitHub Actions workflows in this project.
- Try the workflow in dry-run mode and show detailed output.
How to install act
1claude-code-templates
npx claude-code-templates@latest --command automation/act2Manually: put the files in place
.claude/commands/act.mdCall it with /act. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/act.mdCall it with /prompts:act. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/act.prompt.mdManually: put the files in place
.gemini/commands/act.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about act
How do I install act in Claude Code?
Run npx claude-code-templates@latest --command automation/act, then use the .claude/commands/act.md file.
What does act do?
It runs GitHub Actions workflows locally through act. The command checks Docker and available workflows, and can help inspect execution logs.
What do I need to run a workflow locally?
Install act and make sure Docker is running. Secrets can be read from .env or .secrets.
Source text
act.md · MIT
--- allowed-tools: Read, Edit, Bash argument-hint: [workflow-name] description: Execute GitHub Actions locally using act --- # Act - GitHub Actions Local Execution Execute GitHub Actions workflows locally using act: $ARGUMENTS ## Current Workflows - Available workflows: !`find .github/workflows -name "*.yml" -o -name "*.yaml" | head -10` - Act configuration: @.actrc (if exists) - Docker status: !`docker --version` ## Task Execute GitHub Actions workflow locally: 1. **Setup Verification** - Ensure act is installed: `act --version` - Verify Docker is running - Check available workflows in `.github/workflows/` 2. **Workflow Selection** - If workflow specified: Run specific workflow `$ARGUMENTS` - If no workflow: List all available workflows - Check workflow triggers and events 3. **Local Execution** - Run workflow with appropriate flags - Use secrets from `.env` or `.secrets` - Handle platform-specific runners - Monitor execution and logs 4. **Debugging Support** - Use `--verbose` for detailed output - Use `--dry-run` for testing - Use `--list` to show available actions ## Example Commands ```bash # List all workflows act --list # Run specific workflow act workflow_dispatch -W .github/workflows/$ARGUMENTS.yml # Run with secrets act --secret-file .env # Debug mode act --verbose --dry-run ```
© davila7 · MIT · davila7/claude-code-templates