Debugging pipelines
Skill pvnarp/harness-agentic-skills/skills/harness/debugging-pipelines
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.From its SKILL.md
npx -y skills add pvnarp/harness-agentic-skills --skill debugging-pipelinesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.0 KB, as published. Nobody here has run it
Debug Pipeline
What this skill uses
Harness MCP tools: harness:harness_diagnose, harness:harness_get, harness:harness_list, harness:harness_status
Resource types: execution, execution_log
Native alternative. Most of what this skill does, the official Harness MCP exposes directly via
harness:harness_diagnose. You can also just ask: "Why did my build pipeline fail?" or "Diagnose execution at this URL" - Claude will use the right tool without this skill. The skill exists to give you a slash-command shortcut and an opinionated output shape.
Instructions
Step 1: Diagnose (preferred path)
harness:harness_diagnose produces a complete structured report in one call. It accepts a Harness UI URL (auto-extracts identifiers), an execution_id, or a pipeline_id (which fetches the latest execution). It also follows chained child-pipeline failures automatically.
Call MCP tool: harness:harness_diagnose
Parameters:
url: "<Harness execution URL>" # easiest path
Or specify identifiers explicitly:
Call MCP tool: harness:harness_diagnose
Parameters:
execution_id: "<execution_id>"
org_id: "<org>"
project_id: "<project>"
For deeper analysis, request logs and the pipeline YAML:
Call MCP tool: harness:harness_diagnose
Parameters:
execution_id: "<execution_id>"
org_id: "<org>"
project_id: "<project>"
summary: false # raw diagnostic payload
include_yaml: true
include_logs: true
log_snippet_lines: 120 # tail N lines per step (0 = unlimited)
max_failed_steps: 5 # cap how many steps to fetch logs for
Step 2: Project health overview (if needed)
When you don't know which execution to look at:
Call MCP tool: harness:harness_status
Parameters:
org_id: "<org>"
project_id: "<project>"
Returns recent failed executions, running executions, and deployment activity. Pick the relevant one and run Step 1 against it.
Step 3: Manual drill-in (rarely needed)
Only if harness:harness_diagnose can't help: list executions, get one, or fetch logs directly.
Call MCP tool: harness:harness_list
Parameters:
resource_type: "execution"
search_term: "<pipeline name>"
Call MCP tool: harness:harness_get
Parameters:
resource_type: "execution_log"
resource_id: "<execution_id>"
Suggested response format
## Pipeline Failure Analysis
**Pipeline:** <name>
**Execution:** <id>
**Failed at:** <timestamp>
### Failure summary
**Stage:** <failed_stage>
**Step:** <failed_step>
**Error:** <error message>
### Root cause
<explanation tied to the error class - see Common error classes below>
### Fix
**Immediate:** <specific steps>
**Prevention:** <how to avoid in future>
Common error classes
When categorizing failures, map to one of these:
| Class | Symptoms | Typical fix |
|---|---|---|
| Build | Missing dependencies, compilation errors, Docker build failures | Check manifests, recent code changes, base image |
| Infrastructure | "No delegate available", connector failures, quota limits | Check delegate status / tags, rotate credentials, raise quota |
| Configuration | "Secret not found", "Could not resolve expression", missing connectorRef | Verify scope, expression syntax, connector identifier |
| Deployment | ImagePullBackOff, CrashLoopBackOff, readiness-probe-failed | Check registry creds, container logs, probe config |
| Timeout | Step / stage exceeded, delegate task queued too long | Raise timeout, optimize, scale delegates |
| Artifact | "Artifact not found" | Verify artifact path, upstream build |
Examples
- "Why did my build pipeline fail?" -
harness:harness_diagnosewithpipeline_id - "Debug execution abc123" -
harness:harness_diagnosewithexecution_id - "Show me recent failures" -
harness:harness_status, then drill into failures - "Analyze the pipeline at https://app.harness.io/..." - paste the URL into
harness:harness_diagnose - "Which stage is the bottleneck?" -
harness:harness_diagnoseon a successful execution (returns timing breakdown) - "Get full logs for the failed deploy step" -
harness:harness_diagnosewithinclude_logs: true
Related skills
Prerequisites (skills typically run before this one):
Composes with (skills commonly invoked together):
Follow-ups (skills commonly chained after this one):
Performance Notes
- Take time to read complete error messages and stack traces before diagnosing.
- Check all failed steps, not just the first - multiple failures may share a root cause.
- Diagnosis quality matters more than speed. A wrong diagnosis wastes more time than a thorough one.
Troubleshooting
- Logs not available - log retention policies expire old data; aborted executions may not have complete logs.
- Cannot find execution - verify org/project scope; remove filters; check RBAC permissions.
- MCP connection issues - confirm
harness mcp listshows the server connected; verify API key.