Diagnose and configure Semaphore pre-flight checks — organization- and project-level commands that run at pipeline initialization before any block. Use when a pipeline fails at init with no block output or to read/add/change/remove a gate applying to every workflow.
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.
A pre-flight check is a list of shell commands Semaphore runs in an init job at the start of every workflow in a scope, before any block is scheduled. There are two scopes — one check per organization and one per project — and both run, so a pipeline passes only if neither fails. A non-zero exit stops the pipeline there, which is why the symptom is a failed pipeline with no block output at all.
| Scope | Applies to | Read it with |
|---|---|---|
| Organization | Every pipeline in the org, CI and promotions alike | sem-ai pfc show |
| Project | Every pipeline in that one project | sem-ai pfc show --project <name> |
Pre-flight checks are not in .semaphore/semaphore.yml. Editing YAML cannot disable them.
The tell is a pipeline that failed while its block list is empty or never started.
# 1. What failed, and did any block run?
sem-ai diagnose <workflow-id>
sem-ai pipeline show <pipeline-id> # blocks: [] or every block still pending
# 2. Server-side reason for a pipeline that never got going.
sem-ai troubleshoot pipeline <pipeline-id>
# 3. If an init job is listed, its log holds the check's own output.
sem-ai job list --states FINISHED
sem-ai job log <job-id>
Rule of thumb:
| Symptom | Likely cause | Next step |
|---|---|---|
| Failed pipeline, zero blocks, no test results | Pre-flight check failed | sem-ai pfc show then sem-ai pfc show --project <name> |
Pipeline stuck initializing | Invalid pipeline YAML | sem-ai yaml validate --file .semaphore/semaphore.yml |
| Blocks ran, one failed | Ordinary job failure | debug-pipeline skill |
| Fails only on promoted pipelines | Check keyed on SEMAPHORE_PIPELINE_PROMOTION | read the commands in sem-ai pfc show |
Check both scopes before concluding a project is clean — an org-level check fails project pipelines that have no check of their own.
sem-ai pfc show # organization-wide
sem-ai pfc show --project my-project # one project
Returns the commands, the secrets they are allowed to use, the agent the init job runs on, and who last changed it (requester_id, updated_at). "No pre-flight check configured for this organization/project" means the scope has none — that is a valid state, not an error to work around.
apply replaces the whole check — it does not merge. Whatever you send becomes the check in full, and it takes effect on the next workflow in that scope, for everyone.
So: read first, show the user the difference, then apply.
# 1. What is there now?
sem-ai pfc show --project my-project
# 2. Apply the full intended check (commands run in the order given).
sem-ai pfc apply --project my-project \
--command checkout \
--command './scripts/security-gate.sh' \
--secret scanner-token
# 3. Confirm, then prove it on a real run.
sem-ai pfc show --project my-project
sem-ai workflow run --project my-project --branch main
Pin the init job's agent when the commands need a particular image:
sem-ai pfc apply --command './scripts/gate.sh' \
--machine-type e2-standard-2 --os-image ubuntu2204
For anything longer than a couple of commands, keep the spec in a file and apply that — it is reviewable and re-appliable:
# pfc.yml
commands:
- checkout
- ./scripts/security-gate.sh
secrets:
- scanner-token
agent:
machine_type: e2-standard-2
os_image: ubuntu2204
sem-ai pfc apply --project my-project --from-file pfc.yml
--from-file accepts YAML or JSON and cannot be combined with --command / --secret / --machine-type / --os-image. Scope always comes from --project, never from the file.
sem-ai pfc delete --project my-project # drop the project check
sem-ai pfc delete # drop the organization-wide check
Deleting one scope leaves the other in force. If a project's pipelines still fail at init after deleting the project check, the org-level check is the one failing them.
checkout first if the check reads the repo.SEMAPHORE_PROJECT_NAME, SEMAPHORE_GIT_BRANCH, and SEMAPHORE_PIPELINE_PROMOTION (set when the init is for a promoted pipeline, useful for gating deploys only).secrets; the check cannot reach a secret it was not given.| Response | Meaning |
|---|---|
no pre-flight check configured for this organization/project | Nothing set at that scope |
permission denied: this requires the ...pre_flight_checks.manage permission | The token can read but not change checks — ask an org owner |
...feature is not enabled for your organization | Pre-flight checks are not on this plan/organization |
invalid pre-flight check: ... | The server rejected the spec — the message names the field |
debug-pipeline skill.auto_promote, deployment targets, who may promote) are the semaphore-promotions skill; a pre-flight check is a second, independent gate on top of them.semaphore-blocks skill.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/sem-ai:semaphore-preflightfrom sem-ai
npx claudepluginhub semaphoreio/sem-ai --plugin sem-ai18 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./gha-to-semaphoreTranslate a repo's GitHub Actions workflows into an equivalent Semaphore pipeline. ONLY covers the GHA→Semaphore mapping and conversion procedure; for Semaphore-side depth (cache CLI, test-results, blocks structure, sharding, promotions) defer to the linked skills. Use when the user asks to convert/port/migrate GitHub Actions to Semaphore, says "translate this workflow" or "convert ci.yml", or the repo has `.github/workflows/` and the user wants Semaphore instead. Can be invoked directly as `/sem-ai:gha-to-semaphore` (or via the broader `/sem-ai:init` orchestrator)./initInitialize Semaphore CI/CD for the current repository — bootstrap the Semaphore project, write a working `.semaphore/semaphore.yml` (translating from GitHub Actions if present, or from scratch), wire required secrets, validate, and watch the first workflow. Applies Semaphore-side defaults automatically — agent image, toolbox CLIs, `test-results` epilogue rule, sharding heuristics — by routing through the linked skills. Use when the user wants to set up CI on Semaphore, says "initialize", "bootstrap CI", "prepare CI/CD for this project", "create a workflow on Semaphore", "make a `.semaphore` config", or runs `/sem-ai:init`./manage-infraManage Semaphore infrastructure — secrets, notifications, agent types, scheduled tasks, artifacts.Other plugins' skills for the same job