debug-agent
Provides end-to-end triage and diagnostic support for CI/CD failures or customer issues.
Install
mkdir -p .claude/skills/debug-agent && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12196" && unzip -o skill.zip -d .claude/skills/debug-agent && rm skill.zipInstalls to .claude/skills/debug-agent
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Diagnose a pipeline failure or customer issue end-to-end. Accepts a log path, error text, ADO work item ID, or GitHub issue URL.Key capabilities
- →Ingest log files, error text, ADO work item IDs, or GitHub issue URLs
- →Identify PPBT (Power Platform Build Tools) involvement in failures
- →Classify the failure layer (e.g., pac CLI, service connection)
- →Provide quick-reference error-to-fix mappings
- →Produce a precise triage package for engineering teams
How it works
The skill ingests various inputs, determines the input type, checks for PPBT involvement, classifies the failure, and provides a triage package or resolution.
Inputs & outputs
When to use debug-agent
- →Debug pipeline failure
- →Analyze error log
- →Triage customer issue
- →Verify deployment results
About this skill
Debug Agent
Diagnose a pipeline failure or customer issue end-to-end. Accepts a log file path, pasted error text, ADO work item ID, or GitHub issue URL. Determines ownership, resolves if PPBT-owned, or produces a precise triage package for the right team.
Invoke as: /debug-agent <log-file-path | error-text | issue-url | ado-id>
Works autonomously through all steps. One exception: pauses to request pipeline logs if they are referenced in an ICM/work item but not yet provided — log evidence is required before classifying the failure layer.
Step 0 — Ingest the input
Determine input type:
- File path (
.txt,.log, or similar): read it with theReadtool - ADO work item (
dev.azure.com/...URL or bare integer):az boards work-item show --id <id> 2>&1 - GitHub issue (
github.com/.../issues/<n>):gh issue view <n> --comments 2>&1 - Pasted text: use as-is
Extract and print:
Input summary:
- Type: <file | ado | github | text>
- Task/tool identified: <name from log header, or "unknown">
- Error snippet: <first clear error line, or "none found">
- Timestamp range: <start → end>
- Deployment result: <SUCCESS | FAILED | unknown>
Step 0b — Check for missing logs
If input is an ICM or ADO work item AND any of the following are true:
- Custom field
LogsAttached="Yes" - Description mentions "logs attached" or "see attachment"
- Issue cannot be diagnosed from text alone (no error snippet, no pac CLI output visible)
AND no log file path or log content was provided by the user:
→ STOP. Prompt the user:
Pipeline logs are attached to this ICM/work item but aren't accessible via API.
Please download the logs from the portal and provide the folder path.
Example: C:\Users\<you>\Downloads\
Once you share the path, I'll read the logs and continue the analysis from Step 1.
Do not proceed to Step 1 until log content is available. Do NOT classify the failure layer, assign ownership, or draw conclusions based solely on the ICM title or description — log evidence is mandatory.
If the user confirms no logs exist or they are unavailable, continue with Confidence: low noted throughout.
Step 1 — Verify PPBT is involved
ADO (Azure DevOps) — PPBT task identifiers
Every PPBT v2 task follows the pattern: microsoft-IsvExpTools.PowerPlatform-BuildTools.<task-id>.<TaskClass>@2
| Display Name | Task ID (in YAML/log) | Task Class |
|---|---|---|
| Power Platform Tool Installer | tool-installer | PowerPlatformToolInstaller@2 |
| Power Platform WhoAmI | whoami | PowerPlatformWhoAmi@2 |
| Power Platform Checker | checker | PowerPlatformChecker@2 |
| Power Platform Import Solution | import-solution | PowerPlatformImportSolution@2 |
| Power Platform Export Solution | export-solution | PowerPlatformExportSolution@2 |
| Power Platform Unpack Solution | unpack-solution | PowerPlatformUnpackSolution@2 |
| Power Platform Pack Solution | pack-solution | PowerPlatformPackSolution@2 |
| Power Platform Delete Solution | delete-solution | PowerPlatformDeleteSolution@2 |
| Power Platform Add Solution Component | add-solution-component | PowerPlatformAddSolutionComponent@2 |
| Power Platform Apply Solution Upgrade | apply-solution-upgrade | PowerPlatformApplySolutionUpgrade@2 |
| Power Platform Publish Customizations | publish-customizations | PowerPlatformPublishCustomizations@2 |
| Power Platform Set Solution Version | set-solution-version | PowerPlatformSetSolutionVersion@2 |
| Power Platform Set Connection Variables | set-connection-variables | PowerPlatformSetConnectionVariables@2 |
| Power Platform Deploy Package | deploy-package | PowerPlatformDeployPackage@2 |
| Power Platform Create Environment | create-environment | PowerPlatformCreateEnvironment@2 |
| Power Platform Delete Environment | delete-environment | PowerPlatformDeleteEnvironment@2 |
| Power Platform Assign User | assign-user | PowerPlatformAssignUser@2 |
| Power Platform Reset Environment | reset-environment | PowerPlatformResetEnvironment@2 |
| Power Platform Backup Environment | backup-environment | PowerPlatformBackupEnvironment@2 |
| Power Platform Copy Environment | copy-environment | PowerPlatformCopyEnvironment@2 |
| Power Platform Restore Environment | restore-environment | PowerPlatformRestoreEnvironment@2 |
| Export Dataverse Data | export-data | PowerPlatformExportData@2 |
| Import Dataverse Data | import-data | PowerPlatformImportData@2 |
| Power Platform Download PAPortal | download-paportal | PowerPlatformDownloadPaportal@2 |
| Power Platform Upload PAPortal | upload-paportal | PowerPlatformUploadPaportal@2 |
PPBT signals (any one is sufficient):
- Task class matches any entry in the table above
- Author is
Microsoft(notWael Hamzeor other community authors) - Log contains
POWERPLATFORMTOOLS_PACCLIPATHorPP_TOOLS_AUTOMATION_AGENT - pac CLI invoked: lines containing
pac solution,pac auth,pac env,pac admin,pac package BuildTools.EnvironmentUrlpipeline variable present
GitHub Actions — PPBT action identifiers
All PPBT GitHub Actions use: microsoft/powerplatform-actions/<action-name>@v1
| Action | uses: value |
|---|---|
| Install Power Platform Tools | microsoft/powerplatform-actions/actions-install@v1 |
| WhoAmI | microsoft/powerplatform-actions/whoAmI@v1 |
| Import Solution | microsoft/powerplatform-actions/import-solution@v1 |
| Export Solution | microsoft/powerplatform-actions/export-solution@v1 |
| Unpack Solution | microsoft/powerplatform-actions/unpack-solution@v1 |
| Pack Solution | microsoft/powerplatform-actions/pack-solution@v1 |
| Publish Customizations | microsoft/powerplatform-actions/publish-solution@v1 |
| Clone Solution | microsoft/powerplatform-actions/clone-solution@v1 |
| Check Solution | microsoft/powerplatform-actions/check-solution@v1 |
| Upgrade Solution | microsoft/powerplatform-actions/upgrade-solution@v1 |
| Deploy Package | microsoft/powerplatform-actions/deploy-package@v1 |
| Upload PAPortal | microsoft/powerplatform-actions/upload-paportal@v1 |
| Catalog Install | microsoft/powerplatform-actions/install@v1 |
| Catalog Submit | microsoft/powerplatform-actions/submit@v1 |
| Catalog Status | microsoft/powerplatform-actions/status@v1 |
Not-PPBT signals — deflect immediately:
- Author:
Wael Hamze→ CRM Build Tools (community) Microsoft.Xrm.Tooling.*PowerShell → old XRM ToolingPackageDeployerPowerShell task (v12.x) → Wael Hamze legacy tooling- Task version
@v1and nomicrosoft/powerplatform-actionsprefix → unrelated action
If not PPBT: skip to Step 5 (non-PPBT triage) immediately.
Step 2 — Identify the failing task and classify the layer
2a — Map the failing task to its inputs
Use the tables below to check whether required inputs are present in the log or YAML.
Helper tasks
Tool Installer (tool-installer) — must be FIRST task in every pipeline/workflow
- No required inputs beyond defaults
- Critical: if missing → all other tasks fail with "pac.exe not found" or
POWERPLATFORMTOOLS_PACCLIPATH not set - Optional:
AddToolsToPath: true(adds pac to PATH for script tasks)
WhoAmI (whoami / whoAmI)
- Required:
authenticationType+ one ofPowerPlatformEnvironmentorPowerPlatformSPN - GitHub:
environment-url+ auth credentials (user-name/password-secretORapp-id/client-secret/tenant-id) - Use: connectivity check early in pipeline — failure here = auth or network issue, not solution issue
Quality check
Checker (checker / check-solution)
- Required:
PowerPlatformSPN(SPN only — username/password NOT supported for checker) - Required:
RuleSetGUID - Optional:
UseDefaultPACheckerEndpoint(default true) — if false, must setCustomPACheckerEndpoint - Output: SARIF file as pipeline artifact (
ArtifactDestinationName) - Common issue: checker fails for username/password connections — SPN required
Solution tasks
Import Solution (import-solution)
- Required: service connection +
SolutionInputFile - Key options:
AsyncOperation: true(recommended for large solutions — avoids 4-min timeout),HoldingSolution(for upgrade pattern),UseDeploymentSettingsFile(for connection references + env vars) - Common issue: sync import times out on large solutions → set
AsyncOperation: true,MaxAsyncWaitTime: 60 - Common issue: connection references not set → use
DeploymentSettingsFile
Export Solution (export-solution)
- Required: service connection +
SolutionName+SolutionOutputFile - Note: use solution Name not Display Name
Managed: trueexports as managed
Apply Solution Upgrade (apply-solution-upgrade)
- Required: service connection +
SolutionName - Use after Import with
HoldingSolution: true
Pack / Unpack Solution — local operations, no service connection needed
SolutionType: Managed | Unmanaged | Both
Set Solution Version (set-solution-version)
- Required: service connection +
SolutionName+SolutionVersionNumber - Tip: use
$(Build.BuildId)as version number
Set Connection Variables (set-connection-variables)
- Sets pipeline variables:
BuildTools.TenantId,BuildTools.ApplicationId,BuildTools.ClientSecret,BuildTools.DataverseConnectionString - Username/password auth also requires
ApplicationIdandRedirectUri
Deploy Package (deploy-package)
- Required: service connection +
PackageFile(.dll) - GitHub Actions: Windows runner only (
runs-on: windows-latest)
Environment management tasks
Create Environment (create-environment)
- Required:
DisplayName,LocationName,EnvironmentSku,CurrencyName,LanguageName,DomainName - Side effect: sets
BuildTools.EnvironmentUrlpipeline variable — subsequent tasks use this automatically - Note:
BuildTools.EnvironmentUrloverrides
Content truncated.
When not to use it
- →When log evidence is not available or cannot be provided
- →When diagnosing issues unrelated to pipeline failures or customer issues
- →When the user explicitly states not to perform diagnosis
Limitations
- →Requires log evidence before classifying the failure layer
- →Cannot proceed if logs are referenced but not accessible
- →Diagnosis based solely on ICM title or description will have low confidence
How it compares
This skill automates the end-to-end diagnosis of pipeline failures and customer issues, providing precise failure analysis and triage, unlike manual log review.
Compared to similar skills
debug-agent side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| debug-agent (this skill) | 0 | 4mo | Review | Advanced |
| analyzing-logs | 14 | 27d | Review | Beginner |
| sentry | 10 | 4mo | Caution | Beginner |
| obsidian-incident-runbook | 3 | 27d | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by microsoft
View all by microsoft →You might also like
analyzing-logs
jeremylongshore
Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.
sentry
openai
Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.
obsidian-incident-runbook
jeremylongshore
Troubleshoot Obsidian plugin failures with systematic incident response. Use when plugins crash, data is corrupted, or users report critical issues with your Obsidian plugin. Trigger with phrases like "obsidian crash", "obsidian plugin broken", "obsidian incident", "debug obsidian failure", "obsidian emergency".
obsidian-observability
jeremylongshore
Set up comprehensive logging and monitoring for Obsidian plugins. Use when implementing debug logging, tracking plugin performance, or setting up error reporting for your Obsidian plugin. Trigger with phrases like "obsidian logging", "obsidian monitoring", "obsidian debug", "track obsidian plugin".
langsmith-observability
davila7
LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.
network-info
UKGovernmentBEIS
Gather network configuration and connectivity information including interfaces, routes, and DNS