name: semaphore-cli
description: Debug and triage Semaphore CI pipelines/jobs for SimplePractice with sem (pipelines, workflows, jobs, logs, attach/debug, stop/rebuild). Trigger when CI is failing, flaky, stuck, queued, or when pipeline/workflow/job IDs must be inspected.
Semaphore CI Debugging (SimplePractice)
Use this skill for CI troubleshooting only.
Trigger
- CI is failing, flaky, stuck, or slow.
- The request mentions
sem, pipeline/workflow/job IDs, logs, attach/debug, stop, or rebuild. - You need real Semaphore runtime state before taking action.
Out Of Scope
- Generic Semaphore admin (secrets, dashboards, deployment targets) unless explicitly requested.
- Authoring
.semaphore/*.ymlwithout live CI operations. - Local build/test work unrelated to Semaphore state.
Session Start
sem connect simplepractice.semaphoreci.com "$SEMAPHORE_API_TOKEN"
sem context
Fallback if env var is missing:
sem connect simplepractice.semaphoreci.com <YOUR_API_TOKEN>
Expected: sem context shows simplepractice.semaphoreci.com with *.
Command Quick Reference
# Discovery
sem get pipelines -p simplepractice
sem get workflows -p simplepractice
sem get workflow <workflow-id>
sem get pipeline <pipeline-id>
sem get jobs
# Debugging
sem logs <job-id>
sem attach <job-id> # running jobs only
sem debug <job-id> # finished jobs
# then in debug shell:
source ~/commands.sh
# Recovery
sem stop job <job-id>
sem stop pipeline <pipeline-id>
sem rebuild pipeline <pipeline-id>
sem rebuild pipeline <pipeline-id> --follow
sem rebuild workflow <workflow-id>
Fast Incident Workflow
sem get pipelines -p simplepracticesem get pipeline <pipeline-id>sem logs <job-id>sem debug <job-id>thensource ~/commands.shsem rebuild pipeline <pipeline-id> --follow
Guardrails
- Read before mutate: inspect with
sem get/sem logsbefore stop/rebuild. sem attachonly works on running jobs.sem debugis for finished jobs; runsource ~/commands.shbefore reproducing.rebuild pipelinereruns failed jobs only.rebuild workflowreruns all jobs.- If flags are unclear, run
sem help <command>first.
Repo-Aware Check
- CI behavior is defined by repo files. Confirm before assumptions:
<app-repo>/.semaphore/ci.yml<app-repo>/.semaphore/*.sh<app-repo>/scripts/*ci*
- For
simplepractice, treatchange_inand branch-specific rules as the source of truth from CI config.
Reference: https://docs.semaphore.io/reference/semaphore-cli