Translates GitHub Actions workflows into equivalent Semaphore pipelines, handling matrix, if conditions, reusable workflows, and runner mappings.
Ships in sem-ai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Authoritative reference: docs.semaphore.io/getting-started/migration/github-actions. Mappings below extend it with constructs the migration guide doesn't cover (matrix, if:, reusable workflows, custom actions, on: triggers, sharding).
Scope of this skill: only the GHA→Semaphore translation friction. For Semaphore concepts referenced below, follow the cross-links — don't inline depth here.
Semaphore agents ship with the toolbox preinstalled. Most GHA uses: actions/...@v* setup boilerplate exists to install tools Semaphore already has on PATH. A 200-line GHA workflow usually becomes a 60–90 line Semaphore pipeline because each uses: setup collapses into a single prologue: line.
When drafting the translation, don't translate setup actions into equivalent apt-get install / curl | bash commands — assume the toolbox is on PATH and use its CLIs directly. See semaphore-toolbox for the full surface and probe-agent-environment to verify what's preinstalled if uncertain.
Every GHA construct lands in one of:
# TODO(gha-to-semaphore): comment in the yaml and list the item in the PR body.Each row points at the skill that holds the Semaphore-side depth — read those for syntax, footguns, exact CLI arguments.
| GitHub Actions | Semaphore | Bucket | Depth lives in |
|---|---|---|---|
name: (workflow) | name: (pipeline) | direct | semaphore-blocks |
jobs: | blocks: | direct | semaphore-blocks |
jobs.<id>.steps: | blocks[].task.jobs[].commands | direct | semaphore-blocks |
jobs.<id>.runs-on: | agent.machine.{type,os_image} (see runner mapping below) | adapted | semaphore-blocks |
jobs.<id>.needs: | blocks[].dependencies: | direct | semaphore-blocks |
jobs.<id>.strategy.matrix: | matrix block or separate blocks (see "Matrix" below) | adapted | semaphore-blocks |
jobs.<id>.if: | blocks[].run.when: (see "Conditionals" below) | adapted | semaphore-blocks |
jobs.<id>.env: | task.env_vars: | direct | semaphore-blocks |
jobs.<id>.services: | sem-service start <name> in prologue | direct | semaphore-toolbox |
actions/checkout@v* | checkout (preinstalled; usually in global_job_config.prologue) | direct | semaphore-toolbox |
actions/setup-{node,go,python,ruby,java,…} | sem-version <lang> <ver> | direct | semaphore-toolbox |
actions/cache@v* | cache restore / cache store (key conventions, cardinality, footguns) | adapted | semaphore-toolbox |
actions/upload-artifact@v* / actions/download-artifact@v* | artifact push <scope> <path> / artifact pull <scope> <path> [--force] | direct | semaphore-toolbox |
inline shell retry loop / nick-fields/retry@v* | retry <cmd> | direct | semaphore-toolbox |
EnricoMi/publish-unit-test-result-action@v* / dorny/test-reporter@v* / mikepenz/action-junit-report@v* | test-results publish junit.xml --name <suite> in epilogue | adapted | semaphore-test-results |
secrets.<NAME> reference | bind via secrets: block; pre-create with sem-ai secret create (see "Secrets" below) | adapted | manage-infra |
workflow-root env: | global_job_config.env_vars: | direct | semaphore-blocks |
on: push / on: pull_request | pipeline runs on push by default; PR runs configured per-project (no YAML opt-in) | adapted | — |
workflow_dispatch with inputs: | promotion with parameters | adapted | semaphore-promotions |
reusable workflow (uses: ./.github/workflows/...) | no equivalent — flag for manual review | manual | — |
GHA expressions (${{ ... }}) beyond ref/event_name | substitute with env vars or promotion parameters; many cases need manual rewrite | adapted | — |
concurrency: (cancel-in-progress, group) | partial via auto_cancel: at pipeline root | adapted | semaphore-blocks |
permissions: (GITHUB_TOKEN scopes) | N/A — drop and note | manual | — |
runs-on → agent.machine)GHA runs-on | Semaphore agent.machine |
|---|---|
ubuntu-latest / ubuntu-24.04 | type: f1-standard-2, os_image: ubuntu2404 (official-doc default) |
ubuntu-22.04 | type: f1-standard-2, os_image: ubuntu2204 |
macos-latest / macos-14 | type: a1-standard-4, os_image: macos-xcode15 |
self-hosted with label X | self-hosted Semaphore agent type s1-X if one exists (sem-ai agent types) |
Default when unclear: type: f1-standard-2, os_image: ubuntu2404.
if: → run.when)Semaphore's run.when uses a different DSL. Conservative quick table:
| GHA expression | Semaphore run.when |
|---|---|
github.ref == 'refs/heads/main' | branch = 'main' |
startsWith(github.ref, 'refs/tags/') | tag =~ '.*' |
github.event_name == 'pull_request' | pull_request =~ '.*' |
anything using github.event.* payload fields | flag for manual review |
When in doubt, leave # TODO(gha-to-semaphore): translate condition and surface in PR body.
strategy.matrix → matrix or separate blocks)go: ['1.21', '1.22']) → Semaphore matrix: on a job. Cleanest.matrix: on the job (multiplies out).matrix.os with distinct OS images → split into separate blocks (one per OS) with different agent.machine.os_image.strategy.fail-fast and strategy.max-parallel have no direct equivalent — drop them; mention in PR body.For job-level fan-out (run the same job N times on N agents to shard test work), use parallelism: N — see semaphore-blocks "Sharding one job across N parallel runs".
GHA secrets.X implicitly assumes the secret exists. Semaphore secrets are explicit org-level resources, then bound to a task with secrets:.
Procedure:
.github/workflows/* for every secrets.<NAME>. Dedupe.sem-ai secret create <NAME> --env <NAME>=<value> — the user supplies the value; never invent or copy from GHA.task.secrets:).See manage-infra for secret create flags and scoping.
Leave a # TODO(gha-to-semaphore): comment in the yaml and list each in the PR body:
uses: <author>/<action>@v* (any non-actions/* custom action) — no equivalent. Rewrite as inline commands.uses: ./.github/actions/<name> (local composite actions) — same.uses: ./.github/workflows/<name>.yml) — Semaphore has promotions + pipeline files but no direct includes; case-by-case.services: with custom images (anything outside sem-service's supported list) — translate to docker run in a prologue.peaceiris/actions-gh-pages, softprops/action-gh-release, etc.) — use sem-ai deploy + gh release create equivalents.environment: (GitHub Environments) — approximate with Semaphore deploy targets + subject_rules (see manage-infra); GHA approval gates don't translate.workflow_dispatch.inputs.<X> beyond simple strings — promotion parameters cover string inputs; complex inputs: (choice with dynamic options, secrets-in-inputs) need rewrite. See semaphore-promotions.github.event.* payload fields, vars.*, inputs.* beyond promotion params — Semaphore env vars differ; manual.permissions: (GITHUB_TOKEN scopes / OIDC id-token: write) — N/A on Semaphore; drop. Note any downstream features that depended on it (npm provenance, GitHub releases as the workflow user, OIDC for cloud deploys).concurrency: cancel-in-progress — partial via auto_cancel: at pipeline root; flag for review.When invoked, do the following in order:
ls .github/workflows/ — list every workflow. Confirm with the user which to convert (default: all)..semaphore/semaphore.yml (and .semaphore/<name>.yml for additional workflows). Apply the mapping table; use the linked skills for syntax details.parallelism: N + the runner's native shard flag in the PR body and (optionally) apply it. See semaphore-blocks "Sharding". Don't auto-apply on first draft; surface as a suggestion.sem-ai yaml validate --file .semaphore/semaphore.yml. Iterate until clean.sem-ai project create --skip-yaml (yaml already exists from step 3).sem-ai secret create only after the user supplies the value..semaphore/*.yml filessem-ai secret createwatch-after-push — find the run by commit_sha and sem-ai watch it to completion (project auto-detects from origin; pass --project only to override or when the repo maps to multiple). On any failure, drill in with sem-ai workflow list and sem-ai job log. Iterate.## Summary
Converts `<n>` GitHub Actions workflow(s) to Semaphore pipeline(s).
Original workflows untouched — both CI systems can run side-by-side.
## What was converted
- `<gha-workflow-1>.yml` → `.semaphore/semaphore.yml`
- <block name>: <jobs and what they do>
- …
## What needs your review
- <bucket-3 item, file:line, reason>
- …
## Secrets required (already created)
- `<SECRET_NAME>` — used by <block>
## Differences in behavior
- Runner: GHA `ubuntu-latest` → Semaphore `f1-standard-2 / ubuntu2404`
- `strategy.fail-fast` dropped (no equivalent)
- PR-trigger config moved to Semaphore project settings
- …
## Speed suggestions
- Cypress job has 58 specs — consider `parallelism: 4` + cypress-split plugin
- …
.github/workflows/* unless the user explicitly asks to deprecate GHA in the same PR.# TODO(gha-to-semaphore): is the marker.actions/* core setid-token: write).github/workflows/* after migration — leave that to the usersemaphore-toolbox — checkout, cache, artifact, sem-version, sem-service, retry CLIs + footgunssemaphore-test-results — test-results publish (epilogue rule, per-framework JUnit configs, pipeline aggregation)semaphore-blocks — blocks / tasks / jobs structure, dependencies, parallelism + sharding, status aggregationsemaphore-promotions — deploy gates, promotion parameters, workflow_dispatch translationmanage-infra — sem-ai secret create, deploy targets, agent typesprobe-agent-environment — verify what's preinstalled on the agent before adding install stepssem-ai project create — bootstrap before first pushWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
18 skills in this plugin
/debug-pipelineDiagnose and fix CI pipeline failures. Step-by-step debugging with sem-ai./deployDeploy via Semaphore promotions. Manage deployment targets, promote pipelines, deploy-and-wait./fix-flakyTriage and FIX flaky tests on a Semaphore project end-to-end — find the worst offenders, pull history, locate the test in the code, diagnose the root cause, write a fix or justified quarantine, and verify by re-running. Use whenever the user wants to fix/investigate flaky tests, de-flake CI, reduce intermittent failures, asks "why is CI randomly red", wants to quarantine a flake, or after `sem-ai flaky list` surfaces offenders. Goes BEYOND detection (test-intelligence) to root-cause + code change + verification./sem-ai:gha-to-semaphorefrom sem-ai
npx claudepluginhub semaphoreio/sem-ai --plugin sem-aiOther plugins' skills for the same job