一键导入
circleci
Check and watch CircleCI pipeline/workflow/job status for the current commit using CircleCI v2 API, then fetch failing job logs and fix issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check and watch CircleCI pipeline/workflow/job status for the current commit using CircleCI v2 API, then fetch failing job logs and fix issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | circleci |
| description | Check and watch CircleCI pipeline/workflow/job status for the current commit using CircleCI v2 API, then fetch failing job logs and fix issues. |
Use this skill when circleci CLI cannot show workflow/job run status.
curljqCIRCLECI_CLI_TOKENSHA=$(git rev-parse HEAD)
REMOTE=$(git remote get-url origin)
ORG_REPO=$(echo "$REMOTE" | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')
PROJECT_SLUG="gh/${ORG_REPO}"
TOKEN="${CIRCLECI_CLI_TOKEN}"
if [ -n "$TOKEN" ]; then
AUTH=(-H "Circle-Token: $TOKEN")
else
AUTH=()
fi
PIPELINE_JSON=$(curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/project/${PROJECT_SLUG}/pipeline" \
| jq --arg sha "$SHA" '[.items[] | select(.vcs.revision == $sha)] | sort_by(.number) | reverse | .[0]')
PIPELINE_ID=$(echo "$PIPELINE_JSON" | jq -r '.id // empty')
[ -n "$PIPELINE_ID" ] || { echo "No pipeline found for $SHA"; exit 1; }
echo "$PIPELINE_JSON" | jq '{pipeline_id:.id, number, state, branch:.vcs.branch, revision:.vcs.revision, subject:.vcs.commit.subject}'
curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/pipeline/${PIPELINE_ID}/workflow" \
| jq '.items[] | {workflow_id:.id, name, status, created_at, stopped_at}'
WORKFLOW_ID=$(curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/pipeline/${PIPELINE_ID}/workflow" | jq -r '.items[0].id')
curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/workflow/${WORKFLOW_ID}/job" \
| jq '.items[] | {name, job_number, status}'
Use this when jobs are still running and you need to stop on success/failure.
SHA=$(git rev-parse HEAD)
REMOTE=$(git remote get-url origin)
ORG_REPO=$(echo "$REMOTE" | sed -E 's#(git@github.com:|https://github.com/)##; s#\.git$##')
PROJECT_SLUG="gh/${ORG_REPO}"
TOKEN="${CIRCLECI_CLI_TOKEN:-${CIRCLE_TOKEN:-$CIRCLECI_TOKEN}}"
if [ -n "$TOKEN" ]; then AUTH=(-H "Circle-Token: $TOKEN"); else AUTH=(); fi
PIPELINE_ID=$(curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/project/${PROJECT_SLUG}/pipeline" \
| jq -r --arg sha "$SHA" '[.items[] | select(.vcs.revision==$sha)] | sort_by(.number) | reverse | .[0].id')
WORKFLOW_ID=$(curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/pipeline/${PIPELINE_ID}/workflow" | jq -r '.items[0].id')
for i in {1..60}; do
STATUS=$(curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/workflow/${WORKFLOW_ID}" | jq -r '.status')
echo "$(date -u +"%Y-%m-%dT%H:%M:%SZ") workflow_status=${STATUS}"
case "$STATUS" in
success|failed|error|failing|canceled|unauthorized) break ;;
esac
sleep 20
done
curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/workflow/${WORKFLOW_ID}/job" \
| jq '.items[] | {name, job_number, status}'
curl -sS "${AUTH[@]}" "https://circleci.com/api/v2/workflow/${WORKFLOW_ID}/job" \
| jq -r '.items[] | select(.status=="failed") | .job_number'
JOB_NUMBER="<job-number>"
V1="https://circleci.com/api/v1.1/project/github/${ORG_REPO}/${JOB_NUMBER}"
FAILED_STEP_URL=$(curl -sS "${AUTH[@]}" "$V1" \
| jq -r '.steps[] | select(any(.actions[]?; .status=="failed")) | .actions[] | select(.status=="failed") | .output_url' \
| head -n1)
curl -sS "$FAILED_STEP_URL" | jq -r '.[].message' | tail -n 120
circleci config validate).Reference for common gcloud CLI patterns including logging queries, PubSub inspection, GCS operations, GKE cluster access, and IAP tunneling. Use when working with Google Cloud infrastructure.
Read, write, and manage Google Docs, Sheets, and Drive files using the gog CLI tool. Use when the user asks to interact with Google Docs, Sheets, Drive, or shares a docs.google.com link.
Reference for Grafana Alloy config syntax, pipeline stages, relabeling behavior, LogQL selectors, and Go RE2 regex limitations. Use when editing or debugging Alloy config files (*.alloy).
Reference for Poetry workflows including dependency management, lockfile maintenance, and test execution. Use when working with Python projects that use Poetry (poetry.lock present).
Reference for Terraform lifecycle meta-arguments, provider migration patterns, state management, and validation. Use when editing Terraform files (.tf) or planning infrastructure changes.
A CLI tool for Atlassian Confluence. Lets you read, search, create, update, move, and delete pages and attachments from the terminal or from an agent.