{"id":"4e6ee3f3-d378-4bce-8f6b-1dc7a950e672","shortId":"SJQu6h","kind":"skill","title":"debug-pipeline","tagline":">-","description":"# Debug Pipeline\n\nDiagnose pipeline executions and suggest fixes via MCP.\n\n## Instructions\n\n### Step 1: Diagnose Execution (Preferred)\n\nUse the dedicated diagnosis tool. It accepts an execution_id, pipeline_id (auto-fetches latest execution), or a Harness URL:\n\n```\nCall MCP tool: harness_diagnose\nParameters:\n  pipeline_id: \"<pipeline_identifier>\"   # or execution_id or url\n  org_id: \"<organization>\"\n  project_id: \"<project>\"\n```\n\nThis returns a structured report with stage/step breakdown, timing, bottlenecks, and failure details in one call. It also automatically follows chained (child) pipeline failures.\n\n### Step 1b: Full Diagnostic Mode\n\nFor deeper analysis, request logs and pipeline YAML:\n\n```\nCall MCP tool: harness_diagnose\nParameters:\n  execution_id: \"<execution_id>\"\n  org_id: \"<organization>\"\n  project_id: \"<project>\"\n  summary: false               # raw diagnostic payload\n  include_yaml: true           # include pipeline definition\n  include_logs: true           # include failed step logs\n  log_snippet_lines: 120       # tail N lines per step (0 = unlimited)\n  max_failed_steps: 5          # cap number of steps to fetch logs for\n```\n\n### Diagnose Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `execution_id` | -- | Specific execution to analyze |\n| `pipeline_id` | -- | Fetch latest execution for this pipeline |\n| `url` | -- | Harness UI URL (auto-extracts IDs) |\n| `summary` | true | Structured report (true) or raw payload (false) |\n| `include_yaml` | false (summary) / true (raw) | Include pipeline YAML definition |\n| `include_logs` | false (summary) / true (raw) | Include failed step logs |\n| `log_snippet_lines` | 120 | Max log lines per step (tail). 0 = unlimited |\n| `max_failed_steps` | 5 | Max steps to fetch logs for. 0 = unlimited |\n\n### Step 2: Project Health Overview\n\nCheck overall project health for context:\n\n```\nCall MCP tool: harness_status\nParameters:\n  org_id: \"<organization>\"\n  project_id: \"<project>\"\n```\n\nShows recent failed executions, running executions, and deployment activity.\n\n### Step 3: Find Failed Executions (if needed)\n\n```\nCall MCP tool: harness_list\nParameters:\n  resource_type: \"execution\"\n  org_id: \"<organization>\"\n  project_id: \"<project>\"\n  search_term: \"<pipeline name>\"\n```\n\n### Step 4: Get Execution Details\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"execution\"\n  resource_id: \"<execution_id>\"\n  org_id: \"<organization>\"\n  project_id: \"<project>\"\n```\n\n### Step 5: Get Execution Logs\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"execution_log\"\n  resource_id: \"<execution_id>\"\n  org_id: \"<organization>\"\n  project_id: \"<project>\"\n```\n\n### Step 6: Get Pipeline Definition\n\n```\nCall MCP tool: harness_get\nParameters:\n  resource_type: \"pipeline\"\n  resource_id: \"<pipeline_identifier>\"\n  org_id: \"<organization>\"\n  project_id: \"<project>\"\n```\n\n## Analysis Framework\n\nCategorize errors and provide targeted fixes:\n\n### Build Failures\n- Missing dependencies - Check package.json/requirements.txt\n- Compilation errors - Review recent code changes\n- Docker build failures - Check Dockerfile and base image\n\n### Infrastructure Errors\n- \"No delegate available\" - Check delegate status, verify tags match\n- Connector failures - Rotate credentials, test connection\n- Resource limits - Check cloud quotas and limits\n\n### Configuration Errors\n- \"Secret not found\" - Verify secret exists at correct scope (account/org/project)\n- \"Could not resolve expression\" - Check expression syntax\n- \"Connector not found\" - Verify connectorRef identifier\n\n### Deployment Errors\n- ImagePullBackOff - Check registry credentials and image tag\n- CrashLoopBackOff - Check container logs, resource limits\n- Readiness probe failed - Review probe configuration\n\n### Timeout Errors\n- Step/stage exceeded timeout - Increase timeout or optimize\n- Delegate task queued too long - Scale up delegates\n\n### Artifact Errors\n- \"Artifact not found\" - Verify artifact path, check upstream build\n\n## Response Format\n\n```\n## Pipeline Failure Analysis\n\n**Pipeline:** <name>\n**Execution:** <id>\n**Failed At:** <timestamp>\n\n### Failure Summary\n**Stage:** <failed_stage>\n**Step:** <failed_step>\n**Error:** <error message>\n\n### Root Cause\n<explanation>\n\n### Fix\n**Immediate:** <specific steps>\n**Prevention:** <how to avoid in future>\n```\n\n## Examples\n\n- \"Why did my build pipeline fail?\" - Use `harness_diagnose` with pipeline_id\n- \"Debug execution abc123\" - Use `harness_diagnose` with execution_id\n- \"Show me recent failures\" - Use `harness_status` then drill into failures\n- \"Analyze the pipeline at https://app.harness.io/...\" - Pass URL directly to `harness_diagnose`\n- \"Which stage is the bottleneck in my pipeline?\" - Use `harness_diagnose` on a successful execution\n- \"Get full logs for the failed deploy step\" - Use `harness_diagnose` with `include_logs: true`\n\n## Performance Notes\n\n- Take your time analyzing logs thoroughly. Read complete error messages and stack traces before diagnosing.\n- Check all failed steps, not just the first one. Multiple failures may share a root cause or reveal a dependency chain.\n- Quality of diagnosis is more important than speed. A wrong diagnosis wastes more time than a thorough one.\n\n## Troubleshooting\n\n### Logs Not Available\n- Logs expire based on retention settings\n- Very recent executions may have delayed logs\n- Aborted executions may not have complete logs\n\n### Cannot Find Execution\n- Verify org/project scope\n- Remove filters to see all executions\n- Check RBAC permissions\n\n### MCP Connection Issues\n- Verify MCP server is running and connected\n- Check API key validity\n- Ensure required toolsets (pipelines, logs) are enabled","tags":["debug","pipeline","harness","skills","agent-skills","agents"],"capabilities":["skill","source-harness","skill-debug-pipeline","topic-agent-skills","topic-agents"],"categories":["harness-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/harness/harness-skills/debug-pipeline","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add harness/harness-skills","source_repo":"https://github.com/harness/harness-skills","install_from":"skills.sh"}},"qualityScore":"0.457","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 15 github stars · SKILL.md body (5,683 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:06:30.014Z","embedding":null,"createdAt":"2026-05-09T01:05:28.682Z","updatedAt":"2026-05-18T19:06:30.014Z","lastSeenAt":"2026-05-18T19:06:30.014Z","tsv":"'/...':527 '/requirements.txt':356 '0':134,214,226 '1':16 '120':128,207 '1b':83 '2':229 '3':259 '4':281 '5':139,219,301 '6':322 'abc123':503 'abort':637 'accept':26 'account/org/project':406 'activ':257 'also':75 'analysi':89,341,473 'analyz':158,521,569 'api':670 'app.harness.io':526 'app.harness.io/...':525 'artifact':458,460,464 'auto':33,172 'auto-extract':171 'auto-fetch':32 'automat':76 'avail':375,623 'base':369,626 'bottleneck':67,538 'breakdown':65 'build':349,364,468,492 'call':41,73,95,239,265,285,305,326 'cannot':644 'cap':140 'categor':343 'caus':484,596 'chain':78,601 'chang':362 'check':233,353,366,376,390,411,423,430,466,581,656,669 'child':79 'cloud':391 'code':361 'compil':357 'complet':573,642 'configur':395,440 'connect':387,660,668 'connector':382,414 'connectorref':418 'contain':431 'context':238 'correct':404 'could':407 'crashloopbackoff':429 'credenti':385,425 'debug':2,4,501 'debug-pipelin':1 'dedic':22 'deeper':88 'default':151 'definit':117,193,325 'delay':635 'deleg':374,377,450,457 'depend':352,600 'deploy':256,420,555 'descript':152 'detail':70,284 'diagnos':6,17,45,99,148,497,506,533,544,559,580 'diagnosi':23,604,612 'diagnost':85,110 'direct':530 'docker':363 'dockerfil':367 'drill':518 'enabl':679 'ensur':673 'error':344,358,372,396,421,442,459,482,574 'exampl':488 'exceed':444 'execut':8,18,28,36,50,101,153,156,163,252,254,262,273,283,293,303,313,475,502,508,548,632,638,646,655 'exist':402 'expir':625 'express':410,412 'extract':173 'fail':122,137,201,217,251,261,437,476,494,554,583 'failur':69,81,350,365,383,472,478,513,520,591 'fals':108,183,186,196 'fetch':34,145,161,223 'filter':651 'find':260,645 'first':588 'fix':11,348,485 'follow':77 'format':470 'found':399,416,462 'framework':342 'full':84,550 'get':282,289,302,309,323,330,549 'har':39,44,98,168,242,268,288,308,329,496,505,515,532,543,558 'health':231,236 'id':29,31,48,51,55,57,102,104,106,154,160,174,246,248,275,277,295,297,299,316,318,320,336,338,340,500,509 'identifi':419 'imag':370,427 'imagepullbackoff':422 'immedi':486 'import':607 'includ':112,115,118,121,184,190,194,200,561 'increas':446 'infrastructur':371 'instruct':14 'issu':661 'key':671 'latest':35,162 'limit':389,394,434 'line':127,131,206,210 'list':269 'log':91,119,124,125,146,195,203,204,209,224,304,314,432,551,562,570,621,624,636,643,677 'long':454 'match':381 'max':136,208,216,220 'may':592,633,639 'mcp':13,42,96,240,266,286,306,327,659,663 'messag':575 'miss':351 'mode':86 'multipl':590 'n':130 'need':264 'note':565 'number':141 'one':72,589,619 'optim':449 'org':54,103,245,274,296,317,337 'org/project':648 'overal':234 'overview':232 'package.json':355 'package.json/requirements.txt':354 'paramet':46,100,149,150,244,270,290,310,331 'pass':528 'path':465 'payload':111,182 'per':132,211 'perform':564 'permiss':658 'pipelin':3,5,7,30,47,80,93,116,159,166,191,324,334,471,474,493,499,523,541,676 'prefer':19 'prevent':487 'probe':436,439 'project':56,105,230,235,247,276,298,319,339 'provid':346 'qualiti':602 'queu':452 'quota':392 'raw':109,181,189,199 'rbac':657 'read':572 'readi':435 'recent':250,360,512,631 'registri':424 'remov':650 'report':62,178 'request':90 'requir':674 'resolv':409 'resourc':271,291,294,311,315,332,335,388,433 'respons':469 'retent':628 'return':59 'reveal':598 'review':359,438 'root':483,595 'rotat':384 'run':253,666 'scale':455 'scope':405,649 'search':278 'secret':397,401 'see':653 'server':664 'set':629 'share':593 'show':249,510 'skill' 'skill-debug-pipeline' 'snippet':126,205 'source-harness' 'specif':155 'speed':609 'stack':577 'stage':480,535 'stage/step':64 'status':243,378,516 'step':15,82,123,133,138,143,202,212,218,221,228,258,280,300,321,481,556,584 'step/stage':443 'structur':61,177 'success':547 'suggest':10 'summari':107,175,187,197,479 'syntax':413 'tag':380,428 'tail':129,213 'take':566 'target':347 'task':451 'term':279 'test':386 'thorough':571,618 'time':66,568,615 'timeout':441,445,447 'tool':24,43,97,241,267,287,307,328 'toolset':675 'topic-agent-skills' 'topic-agents' 'trace':578 'troubleshoot':620 'true':114,120,176,179,188,198,563 'type':272,292,312,333 'ui':169 'unlimit':135,215,227 'upstream':467 'url':40,53,167,170,529 'use':20,495,504,514,542,557 'valid':672 'verifi':379,400,417,463,647,662 'via':12 'wast':613 'wrong':611 'yaml':94,113,185,192","prices":[{"id":"7a69ec36-a1a1-4d58-ab97-710675a76005","listingId":"4e6ee3f3-d378-4bce-8f6b-1dc7a950e672","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"harness","category":"harness-skills","install_from":"skills.sh"},"createdAt":"2026-05-09T01:05:28.682Z"}],"sources":[{"listingId":"4e6ee3f3-d378-4bce-8f6b-1dc7a950e672","source":"github","sourceId":"harness/harness-skills/debug-pipeline","sourceUrl":"https://github.com/harness/harness-skills/tree/main/skills/debug-pipeline","isPrimary":false,"firstSeenAt":"2026-05-09T01:05:28.682Z","lastSeenAt":"2026-05-18T19:06:30.014Z"}],"details":{"listingId":"4e6ee3f3-d378-4bce-8f6b-1dc7a950e672","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"harness","slug":"debug-pipeline","github":{"repo":"harness/harness-skills","stars":15,"topics":["agent-skills","agents"],"license":"apache-2.0","html_url":"https://github.com/harness/harness-skills","pushed_at":"2026-05-13T01:28:28Z","description":"A collection of structured AI agent skills that   enable Claude Code, Cursor, GitHub Copilot, and   other AI coding assistants to create, operate,   debug, and govern Harness CI/CD workflows through   natural language.","skill_md_sha":"416628ad651d8fdec9b32f26c1d13f9319fa5013","skill_md_path":"skills/debug-pipeline/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/harness/harness-skills/tree/main/skills/debug-pipeline"},"layout":"multi","source":"github","category":"harness-skills","frontmatter":{"name":"debug-pipeline","license":"Apache-2.0","description":">-","compatibility":"Requires Harness MCP v2 server (harness-mcp-v2)"},"skills_sh_url":"https://skills.sh/harness/harness-skills/debug-pipeline"},"updatedAt":"2026-05-18T19:06:30.014Z"}}