migrate-to-ubuntu-slim
This skill should be used when the user asks to "migrate to ubuntu-slim".
What this skill does
# Migrate GitHub Actions to ubuntu-slim
Analyze GitHub Actions workflows and migrate eligible jobs from `ubuntu-latest` to `ubuntu-slim` for cost optimization.
## About ubuntu-slim
`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.
## Migration Workflow
### Phase 1: Create Plan
First, discover all workflows and create a task list.
1. List workflow files:
```bash
ls .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null || true
```
2. Create a todo list with tasks:
- "Analyze workflow: <workflow-name>" for each workflow file found
- "Present migration plan"
- "Apply changes (after user confirmation)"
- "Show diff and prompt commit"
### Phase 2: Analyze Each Workflow
For each workflow, perform TWO checks:
#### Check 1: Runtime Statistics
Run the analysis script:
```bash
${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 decision
**Criteria**: mean + 2σ < 420 seconds (7 minutes). This allows 2x slowdown on ubuntu-slim (1 CPU vs 4 CPU) while staying under 15-minute timeout.
#### Check 2: Implementation Patterns
Read the workflow YAML and check for incompatible patterns.
Run a quick keyword scan to surface suspicious commands:
```bash
${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:**
- Linting (`eslint`, `ruff`, `golangci-lint`)
- Formatting checks (`prettier`, `black`)
- Simple unit tests
- Notifications, issue/PR operations
- Deploy polling/wait jobs - mostly I/O wait, low CPU usage
#### Result
Mark workflow as:
- **Eligible**: Runtime OK AND no blocking patterns
- **Not eligible**: Explain reason (runtime or pattern)
Update todo: mark "Analyze workflow: <name>" as completed.
### Phase 3: Present Migration Plan
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?"
### Phase 4: Apply Changes
After user confirmation, edit each eligible workflow file:
```yaml
# Before
runs-on: ubuntu-latest
# After
runs-on: ubuntu-slim
```
Update todo as each file is edited.
### Phase 5: Show Diff and Prompt Commit
1. Show diff:
```bash
git diff .github/workflows/
```
2. Suggest commit message:
```
chore(ci): migrate eligible jobs to ubuntu-slim runner
```
3. **Do NOT commit** - let user decide.
## Important Notes
- Always verify run time data before recommending migration
- Consider peak run times, not just averages - jobs with high variance may exceed 15-minute limit
- Some actions may not work correctly on ubuntu-slim due to reduced resources
- **ubuntu-slim has fewer preinstalled tools** - workflows may fail due to missing commands even if analysis passes. Actual execution is required to confirm compatibility
- Recommend starting with non-critical workflows (linting, notifications) before migrating build/test jobs
## Reference
- [GitHub Docs: GitHub-hosted runners](https://docs.github.com/en/actions/reference/runners/github-hosted-runners)
- [ubuntu-slim preinstalled software](https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md)
Note: ubuntu-slim runs as a container (not a full VM) and is available for both public and private repositories.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.