Fetches CircleCI job logs via the v1.1 API and displays step-level output. Focuses on failed steps. Use when: CI checks fail on a PR, user shares a CircleCI job URL, user asks to check build logs, 'circleci', 'build failed', 'CI failed', 'check the logs'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fetching-circleci-logs:fetching-circleci-logsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Fetch step-level build logs from CircleCI jobs using the v1.1 API.
Fetch step-level build logs from CircleCI jobs using the v1.1 API.
https://circleci.com/gh/org/repo/169955)CircleCI URLs follow this pattern:
https://circleci.com/gh/{org}/{repo}/{job_number}
Extract org, repo, and job_number from the URL. If the user provides only a job number, ask for the org/repo or check the current git remote:
git remote get-url origin | sed -E 's|.*github\.com[:/]([^/]+)/([^/.]+).*|\1/\2|'
grep 'token' ~/.circleci/cli.yml | awk '{print $2}'
If the file doesn't exist or has no token, tell the user to run circleci setup or set the token manually.
Run this as a single command, substituting {org}, {repo}, and {job_number}:
TOKEN=$(grep 'token' ~/.circleci/cli.yml | awk '{print $2}') && \
curl -s -H "Circle-Token: $TOKEN" \
"https://circleci.com/api/v1.1/project/gh/{org}/{repo}/{job_number}" | \
python3 -c "
import sys, json, urllib.request
data = json.load(sys.stdin)
for step in data.get('steps', []):
for action in step.get('actions', []):
status = action.get('status', '')
name = action.get('name', '')
exit_code = action.get('exit_code')
failed = action.get('failed', False)
print(f'STEP: {name} | status: {status} | exit: {exit_code}')
if failed and action.get('output_url'):
with urllib.request.urlopen(action['output_url']) as r:
for msg in json.load(r):
print(msg.get('message', '')[:2000])
"
After fetching, summarize:
output_url is a pre-signed S3 URL — no additional auth needed to fetch it.When fetching CircleCI logs, complete this checklist:
~/.circleci/cli.ymlDo not proceed to suggest fixes until all checks pass.
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.
2plugins reuse this skill
First indexed Jul 18, 2026
npx claudepluginhub danielbodnar/claude-skillz --plugin fetching-circleci-logs