/circleci:debug-ci-failuresfrom circleci
Debug CircleCI build failures by analyzing pipeline status, failure logs, test results, and flaky tests. Walks through a systematic workflow using the CircleCI MCP server.
Ships in circleci. 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.
You are helping the user debug CircleCI build failures. Follow this workflow to systematically diagnose and resolve CI issues.
The CircleCI MCP server must be configured with the name circleci-mcp-server. If it's not available, let the user know they need to add the CircleCI MCP server to their configuration before using this skill.
The CircleCI MCP tools are deferred and must be loaded before use. Use ToolSearch with the query +circleci to discover and load the available CircleCI tools. Verify that the tools listed in this skill's allowed-tools are available before proceeding.
Determine which CircleCI project to investigate. Use one of these approaches in order of preference:
git remote get-url origin and the branch with git branch --show-current.mcp__circleci-mcp-server__list_followed_projects to show the user their projects and let them pick one.Use mcp__circleci-mcp-server__get_latest_pipeline_status to quickly triage the current state of the pipeline:
This avoids unnecessary log fetching when there is nothing to debug.
Use mcp__circleci-mcp-server__get_build_failure_logs to retrieve the failure logs. Pass the appropriate parameters based on how the project was identified:
workspaceRoot, gitRemoteURL, and branchurl parameterprojectSlug and branchUse mcp__circleci-mcp-server__find_flaky_tests to check if any tests in the project are known to be flaky. This helps distinguish between genuine failures and intermittent issues.
If flaky tests are found, clearly flag which failures in the logs might be caused by flaky tests.
If the failure involves test failures, use mcp__circleci-mcp-server__get_job_test_results to get detailed test metadata including:
Always use filterByTestsResult: 'failure' when investigating failures so the tool returns only failed tests instead of the full test suite.
Analyze the tool output directly in your response. Do not write scripts or create temporary files to process the results.
If the output includes an <MCPTruncationWarning>, the data was too large to
return in full. Work through these fallbacks in order:
.../jobs/123) instead of a pipeline or branch-level URL.filterByTestsResult: 'failure' with get_job_test_results to return only failed tests.Based on the collected information, provide:
After diagnosis, offer to:
mcp__circleci-mcp-server__rerun_workflow with the workflowId from the Step 2 pipeline status output. Set fromFailed: true to rerun only from the failed job instead of rerunning the entire workflow.What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/circleci-buildsDiagnose and fix failing CircleCI builds quickly and safely. Use when users ask to investigate failed CircleCI jobs, triage flaky pipelines, identify root causes from logs, and implement minimal fixes in configuration, test setup, or build-related code paths./circleci-cliDay-to-day CircleCI from the terminal with the circleci CLI — authenticate, validate config before you commit, watch the run your push triggered, review pipeline/workflow/job status, print a failure report for your latest failed run in one command, read job logs and failed tests, list a project's flaky tests, list or download every artifact in a run in one command, and rerun/cancel/trigger. Use when a developer asks to authenticate CLI access, check their build or pipeline status, watch a run after pushing, see why CI failed, read job output/logs, find failing tests, list flaky tests, download build outputs such as a coverage report, rerun failed jobs, cancel or re-trigger a run, validate a config change locally, or look up a project's environment variables, contexts, triggers or pipeline definitions. For first-time project connection / pipeline-definition setup use the onboarding skill; for the diagnose-and-fix methodology on a failing build use circleci-builds./circleci-configOptimize CircleCI configuration for speed, reliability, and maintainability. Use when users ask to improve `.circleci/config.yml`, reduce CI runtime, tune caching/workspaces/parallelism, remove pipeline waste, or fix flaky pipeline behavior caused by configuration choices./circleci-deploy-setupSet up, audit, or regenerate CircleCI deploy markers, deploy and rollback pipelines, and release validation in a repository. Use when a user wants to onboard a project to deploys, releases, deploy markers, smart deployments, release validation or auto-rollback; when they ask what deploy setup a repo already has or whether it is complete; when they want to regenerate or upgrade an existing deploy.yml, rollback.yml, or marker setup; or when they ask to replicate the Deploys setup wizard locally. Covers config generation, verification, pipeline registration, and wiring validation webhooks from Datadog, Grafana, Prometheus, Alertmanager, or any tool that can POST to a URL. For first-time project connection and basic pipeline setup use the onboarding skill./onboardingAgent-driven onboarding guide for CircleCI. Walks a user through the full setup journey: account creation, organization selection or creation, GitHub App connection, project creation, pipeline definition + trigger, and iterating a config file until it passes. Everything is done from the terminal with the circleci CLI — never send the user to the web app for something a command can do. Use this skill whenever a user says "onboard to CircleCI", "set up CircleCI", "get started with CircleCI", "connect my repo to CircleCI", "create a CircleCI project", or asks for help with any early CircleCI setup step. Also trigger if the user has a new repo and wants CI running on it. For day-to-day work on an already-connected project (watch a run, read failing logs, rerun) use the circleci-cli skill instead./circleci-smarter-testing-debuggingDebug CircleCI Smarter Testing on a project that is already onboarded, using `circleci testsuite impact` to explore impact data (which files impact a test, which tests a file impacts) and `circleci testsuite result` to show how a job's test atoms were selected and how they ran. Use when asking why a test was selected or skipped, why a change didn't run the expected tests, why too many tests run, or how a test atom ran in a job. For first-time setup use circleci-smarter-testing-onboarding.npx claudepluginhub circleci-public/skills --plugin circleciOther plugins' skills for the same job