debug-pipeline
Skill2 starsChanged 7 months agoApache-2.0Archived repositoryView on GitHub
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.
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Use the dedicated diagnosis tool.
- Distinctive: line 70
Check overall project health for context:
- Distinctive: line 190
Check all failed steps, not just the first one.
- Distinctive: line 201
Verify org/project scope
- Distinctive: line 202
Remove filters to see all executions
- Distinctive: line 206
Verify MCP server is running and connected
- Distinctive: line 207
Check API key validity
- Distinctive: line 208
Ensure required toolsets (pipelines, logs) are enabled
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debug Pipeline
Diagnose pipeline executions and suggest fixes via MCP.
Instructions
Step 1: Diagnose Execution (Preferred)
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.
Step 1b: Full Diagnostic Mode
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 forDiagnose Parameters
| 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 |
Step 2: Project Health Overview
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.
Step 3: Find Failed Executions (if needed)
Call MCP tool: harness_list
Parameters:
resource_type: "execution"
org_id: "<organization>"
project_id: "<project>"
search_term: "<pipeline name>"Step 4: Get Execution Details
Call MCP tool: harness_get
Parameters:
resource_type: "execution"
resource_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"Step 5: Get Execution Logs
Call MCP tool: harness_get
Parameters:
resource_type: "execution_log"
resource_id: "<execution_id>"
org_id: "<organization>"
project_id: "<project>"Step 6: Get Pipeline Definition
Call MCP tool: harness_get
Parameters:
resource_type: "pipeline"
resource_id: "<pipeline_identifier>"
org_id: "<organization>"
project_id: "<project>"Analysis Framework
Categorize errors and provide targeted fixes:
Build Failures
- Missing dependencies - Check package.json/requirements.txt
- Compilation errors - Review recent code changes
- Docker build failures - Check Dockerfile and base image
Infrastructure Errors
- "No delegate available" - Check delegate status, verify tags match
- Connector failures - Rotate credentials, test connection
- Resource limits - Check cloud quotas and limits
Configuration Errors
- "Secret not found" - Verify secret exists at correct scope (account/org/project)
- "Could not resolve expression" - Check expression syntax
- "Connector not found" - Verify connectorRef identifier
Deployment Errors
- ImagePullBackOff - Check registry credentials and image tag
- CrashLoopBackOff - Check container logs, resource limits
- Readiness probe failed - Review probe configuration
Timeout Errors
- Step/stage exceeded timeout - Increase timeout or optimize
- Delegate task queued too long - Scale up delegates
Artifact Errors
- "Artifact not found" - Verify artifact path, check upstream build
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>
### Fix
**Immediate:** <specific steps>
**Prevention:** <how to avoid in future>Examples
- "Why did my build pipeline fail?" - Use
harness_diagnosewith pipeline_id - "Debug execution abc123" - Use
harness_diagnosewith execution_id - "Show me recent failures" - Use
harness_statusthen drill into failures - "Analyze the pipeline at https://app.harness.io/..." - Pass URL directly to
harness_diagnose - "Which stage is the bottleneck in my pipeline?" - Use
harness_diagnoseon a successful execution - "Get full logs for the failed deploy step" - Use
harness_diagnosewithinclude_logs: true
Performance Notes
- Take your time analyzing logs thoroughly. Read complete error messages and stack traces before diagnosing.
- Check all failed steps, not just the first one. Multiple failures may share a root cause or reveal a dependency chain.
- Quality of diagnosis is more important than speed. A wrong diagnosis wastes more time than a thorough one.
Troubleshooting
Logs Not Available
- Logs expire based on retention settings
- Very recent executions may have delayed logs
- Aborted executions may not have complete logs
Cannot Find Execution
- Verify org/project scope
- Remove filters to see all executions
- Check RBAC permissions
MCP Connection Issues
- Verify MCP server is running and connected
- Check API key validity
- Ensure required toolsets (pipelines, logs) are enabled
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- harness/harness-skills★ 12799% same
Wrote their own version · 4
- bbvch-ai/aihub-core★ 16same name
- tstephx/book-mcp-server★ 1same name
- glassflow/agent-skills★ 0same name
- LuisHiluy/claude-code-pipeline-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/harness.mdcCursor rule
- analyze-costsSkill
- audit-reportSkill
- chaos-experimentSkill
- create-agentSkill
- create-agent-templateSkill
- create-connectorSkill
- create-environmentSkill
- create-infrastructureSkill
- create-pipelineSkill
- create-pipeline-v1Skill
- create-policySkill
- create-secretSkill
- create-serviceSkill
- create-templateSkill
- create-triggerSkill
- dora-metricsSkill
- gitops-statusSkill
- manage-delegatesSkill
- manage-feature-flagsSkill
- manage-rolesSkill
- manage-usersSkill
- migrate-pipelineSkill
- run-pipelineSkill
- scorecard-reviewSkill
- security-reportSkill
- template-usageSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

