From actions-ubuntu-slim-migration
Analyzes GitHub Actions workflows and migrates eligible jobs from ubuntu-latest to ubuntu-slim for cost-optimized CI with duration and compatibility checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/actions-ubuntu-slim-migration:migrate-to-ubuntu-slimThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze GitHub Actions workflows and migrate eligible jobs from `ubuntu-latest` to `ubuntu-slim` for cost optimization.
Analyze GitHub Actions workflows and migrate eligible jobs from ubuntu-latest to ubuntu-slim for cost optimization.
ubuntu-slim is a lightweight, single-CPU GitHub-hosted runner optimized for lightweight operations:
| Specification | ubuntu-slim | ubuntu-latest |
|---|---|---|
| CPU | 1 | 4 |
| Memory | 5 GB | 16 GB |
| Storage | 14 GB | 14 GB |
| Timeout | 15 min | 6 hours |
| Cost (public) | Free | Free |
Best suited for: automation tasks, issue operations, short-running jobs, linting, simple tests.
First, discover all workflows and create a task list.
ls .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null || true
For each workflow, perform TWO checks:
Run the analysis script:
${CLAUDE_PLUGIN_ROOT}/skills/migrate-to-ubuntu-slim/scripts/analyze-workflow-duration.sh <workflow-file>
Output: workflow n mean stddev mean+2σ migration reason
migration: yes, no, or - (unknown)reason: Human-readable explanation of the decisionCriteria: mean + 2σ < 420 seconds (7 minutes). This allows 2x slowdown on ubuntu-slim (1 CPU vs 4 CPU) while staying under 15-minute timeout.
Read the workflow YAML and check for incompatible patterns.
Run a quick keyword scan to surface suspicious commands:
${CLAUDE_PLUGIN_ROOT}/skills/migrate-to-ubuntu-slim/scripts/check-slim-compat.sh <workflow-file>
Review matched lines and check if the workflow installs the tool before using it. If not, keep ubuntu-latest or add explicit install steps. Note: this script only checks for common CLI tools. Manually verify the patterns listed below (e.g., services:, container:).
Reject if ANY found:
| Pattern | Reason |
|---|---|
services: | Docker service containers not supported |
container: | Custom container images may not work |
docker build, docker push, docker compose, docker-compose | Docker is NOT available (container-based runner) |
| CLI tools not in preinstalled list | Missing tools require explicit install or use ubuntu-latest |
cargo build, go build, make -j | Heavy compilation too slow on 1 CPU |
npm run build, webpack, tsc --build | Frontend builds may be slow |
java, gradle, maven, mvn | JVM needs more memory |
Large matrix: strategy | Each job must still meet runtime criteria |
Good candidates:
eslint, ruff, golangci-lint)prettier, black)Mark workflow as:
Update todo: mark "Analyze workflow: " as completed.
After analyzing all workflows, present summary:
## Migration Plan
### Eligible:
| Workflow | mean+2σ | Note |
|----------|---------|------|
| test.yml | 198s | Simple pytest |
| lint.yml | 51s | ruff check |
### Not eligible:
| Workflow | Reason |
|----------|--------|
| build.yml | Uses services: postgres |
| e2e.yml | mean+2σ=920s exceeds limit |
Ask user: "Proceed with migration?"
After user confirmation, edit each eligible workflow file:
# Before
runs-on: ubuntu-latest
# After
runs-on: ubuntu-slim
Update todo as each file is edited.
git diff .github/workflows/
chore(ci): migrate eligible jobs to ubuntu-slim runner
Note: ubuntu-slim runs as a container (not a full VM) and is available for both public and private repositories.
npx claudepluginhub pokutuna/claude-plugins --plugin actions-ubuntu-slim-migrationReference for GitHub Actions workflow best practices, including runner context, timeout-minutes, caching, concurrency, and security. Use when writing or debugging .yml workflows.
Write and optimize GitHub Actions workflows. Use when creating CI/CD pipelines, configuring workflow triggers, managing artifacts, or debugging workflow runs.
Create, evaluate, and optimize GitHub Actions workflows and custom actions for CI/CD pipelines, troubleshooting, security analysis, performance tuning. Covers Ruby/Rails, TypeScript/Node.js, Heroku, Fly.io deployments.