Diagnose Harness pipeline executions via MCP. Analyzes any execution (failed or successful) to produce structured reports with stage/step breakdown, timing, bottlenecks, failure details, chained pipeline drill-down, and execution logs. Use when asked to debug a pipeline, investigate a failure, find out why a build failed, analyze pipeline errors, check execution logs, review execution performance, or find bottlenecks. Trigger phrases: debug pipeline, pipeline failed, why did my build fail, analyze failure, pipeline error, execution logs, fix pipeline, execution bottleneck, slow pipeline.
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Diagnose pipeline executions and suggest fixes via MCP.
Use the dedicated diagnosis tool. It accepts an execution_id, pipeline_id (auto-fetches latest execution), or a Harness URL:
Call MCP tool: harness_diagnose
Parameters:
pipeline_id: "<pipeline_identifier>" # or execution_id or url
org_id: "<organization>"
project_id: "<project>"This returns a structured report with stage/step breakdown, timing, bottlenecks, and failure details in one call. It also automatically follows chained (child) pipeline failures.
For deeper analysis, request logs and pipeline YAML:
Call MCP tool: harness_diagnose
Parameters:
execution_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"
summary: false # raw diagnostic payload
include_yaml: true # include pipeline definition
include_logs: true # include failed step logs
log_snippet_lines: 120 # tail N lines per step (0 = unlimited)
max_failed_steps: 5 # cap number of steps to fetch logs for| Parameter | Default | Description |
|---|---|---|
execution_id | -- | Specific execution to analyze |
pipeline_id | -- | Fetch latest execution for this pipeline |
url | -- | Harness UI URL (auto-extracts IDs) |
summary | true | Structured report (true) or raw payload (false) |
include_yaml | false (summary) / true (raw) | Include pipeline YAML definition |
include_logs | false (summary) / true (raw) | Include failed step logs |
log_snippet_lines | 120 | Max log lines per step (tail). 0 = unlimited |
max_failed_steps | 5 | Max steps to fetch logs for. 0 = unlimited |
Check overall project health for context:
Call MCP tool: harness_status
Parameters:
org_id: "<organization>"
project_id: "<project>"Shows recent failed executions, running executions, and deployment activity.
Call MCP tool: harness_list
Parameters:
resource_type: "execution"
org_id: "<organization>"
project_id: "<project>"
search_term: "<pipeline name>"Call MCP tool: harness_get
Parameters:
resource_type: "execution"
resource_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"Call MCP tool: harness_get
Parameters:
resource_type: "execution_log"
resource_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"Call MCP tool: harness_get
Parameters:
resource_type: "pipeline"
resource_id: "<pipeline_identifier>"
org_id: "<organization>"
project_id: "<project>"Categorize errors and provide targeted fixes:
## Pipeline Failure Analysis
**Pipeline:** <name>
**Execution:** <id>
**Failed At:** <timestamp>
### Failure Summary
**Stage:** <failed_stage>
**Step:** <failed_step>
**Error:** <error message>
### Root Cause
<explanation>
### Fix
**Immediate:** <specific steps>
**Prevention:** <how to avoid in future>harness_diagnose with pipeline_idharness_diagnose with execution_idharness_status then drill into failuresharness_diagnoseharness_diagnose on a successful executionharness_diagnose with include_logs: trueharness/harness-ai
ac52a15
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.