Official agent skill

Diagnose Deployment

by microsoft in microsoft/power-platform-skills

Surfaces PAC CLI upload errors and Dataverse async operation errors, pattern-matches against a known failure catalog, and optionally auto-fixes identified issues.

OfficialMITAuto-check: notesDevOps & Cloud

Install Diagnose Deployment

skills CLI
$ npx skills add microsoft/power-platform-skills --skill diagnose-deployment -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/power-platform-skills diagnose-deployment --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/power-pages/skills/diagnose-deployment .claude/skills/diagnose-deployment && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diagnose-deployment
GitHub stars
967
Token cost
~2.6k tokens
SKILL.md length
1,075 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Surfaces PAC CLI upload errors and Dataverse async operation errors, pattern-matches against a known failure catalog, and optionally auto-fixes identified issues.

  • Works in 8 steps: Verify Prerequisites and Locate Project → 5 — Ground in current ALM documentation → Collect Deployment Artifacts → …
  • Asked to: diagnose deployment
  • SKILL.md covers Prerequisites, Phases, Key Decision Points (Wait for… and Error Handling, plus 1 more section
  • Calls node, az and npm; reaches learn.microsoft.com

What it does

Diagnose Deployment is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Surfaces PAC CLI upload errors and Dataverse async operation errors, pattern-matches against a known failure catalog, and optionally auto-fixes identified issues. Use when asked to: "diagnose deployment", "debug deployment", "deployment failed", "show deployment errors", "fix deployment issues", "show upload logs", "why did my deploy fail", or "troubleshoot upload".

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Deployment. It works with Microsoft Azure. The repository describes itself as: A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and… The licence is MIT.

When your agent uses it

  • Asked to: diagnose deployment
  • Debug deployment
  • Deployment failed
  • Show deployment errors

Example prompts

  • “diagnose deployment”
  • “debug deployment”
  • “deployment failed”
  • “/diagnose-deployment”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskUpdate, TaskList, AskUserQuestion, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Verify Prerequisites and Locate Project
  2. 5 — Ground in current ALM documentation
  3. Collect Deployment Artifacts
  4. Surface Upload Errors
  5. Query Solution Import Status
  6. Auto-Diagnose Known Issues
  7. Offer Auto-Fixes
  8. Present Findings Summary

What it can do on your machine

Read from SKILL.md and the folder at commit 5ef4e4f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash
    • Glob
    • Grep
    • TaskCreate
    • TaskUpdate
    • TaskList
    • AskUserQuestion

    …and 2 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • az
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diagnose Deployment loads about 2.6k tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 1,075 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskUpdate, TaskList, AskUserQuestion, mcp__plugin_

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/power-platform-skills at commit 5ef4e4f, republished under its MIT licence (© microsoft). 1,075 words, ~2,601 tokens.

Download SKILL.mdSave it as .claude/skills/diagnose-deployment/SKILL.md (or your agent's skills folder).
name
diagnose-deployment
description
Surfaces PAC CLI upload errors and Dataverse async operation errors, pattern-matches against a known failure catalog, and optionally auto-fixes identified issues. Use when asked to: "diagnose deployment", "debug deployment", "deployment failed", "show deployment errors", "fix deployment issues", "show upload logs", "why did my deploy fail", or "troubleshoot upload".
allowed-tools
Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskUpdate, TaskList, AskUserQuestion, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch
user-invocable
true
model
opus

Plugin check: Run node "${PLUGIN_ROOT}/scripts/check-version.js" — if it outputs a message, show it to the user before proceeding.

diagnose-deployment

Surfaces and pattern-matches deployment errors against a known failure catalog. For each identified error with an available auto-fix, asks explicit user permission before applying any changes. Never auto-applies fixes without confirmation.

Prerequisites

  • Project root with powerpages.config.json
  • PAC CLI installed (will report if missing)

Phases

Phase 1 — Verify Prerequisites and Locate Project

Create all tasks upfront at the start of this phase.

Tasks to create:

  1. "Verify prerequisites and locate project"
  2. "Collect deployment artifacts"
  3. "Surface upload errors"
  4. "Query solution import status"
  5. "Diagnose and categorize findings"
  6. "Offer auto-fixes"
  7. "Present findings summary"

Steps:

  1. Locate project root: search for powerpages.config.json in cwd and parent directories
  2. Check PAC CLI: pac --version (report version or "not installed")
  3. Check PAC CLI auth: pac env who (report environment URL or "not authenticated")
  4. Check Azure CLI: az account show (report subscription or "not logged in")

Auth failures are non-blocking — report them as findings, continue collecting other artifacts.

Phase 1.5 — Ground in current ALM documentation

Reference: ${PLUGIN_ROOT}/references/alm-docs-grounding.md

Cap this step at ~30 seconds. If MCP search / fetch errors out, log a one-line note and continue — this skill must remain runnable offline.

  1. Run microsoft_docs_search with the query: Power Pages deployment errors solution import troubleshooting.
  2. Fetch https://learn.microsoft.com/en-us/power-platform/alm/solution-concepts-alm (and at most one sister page on troubleshooting or known import errors) in parallel via microsoft_docs_fetch.
  3. Extract a one-paragraph summary of what Microsoft Learn currently says about common deployment failures and their resolution. Compare against ${PLUGIN_ROOT}/references/deployment-error-catalog.md and flag any new error patterns not yet captured in the catalog.
  4. Use the summary to inform pattern-matching in Phase 5. If a new pattern is documented on Learn that isn't in the catalog, surface it to the user as a candidate addition rather than silently extending the catalog.
Phase 2 — Collect Deployment Artifacts

Gather all available context:

  1. Read powerpages.config.json — extract siteName, websiteRecordId, compiledPath
  2. Check .powerpages-site/ folder exists
  3. Glob for manifest files: .powerpages-site/*-manifest.yml — list all found, note their environment hostnames
  4. Check if .solution-manifest.json exists (for solution-related diagnostics)
  5. Check if docs/alm/last-import.json exists (for recent import failures)
  6. Check build output: confirm {compiledPath}/ exists and is non-empty

Report: "Found project: {siteName}. Artifacts collected."

Phase 3 — Surface Upload Errors

Re-run pac pages upload-code-site in capture mode to get fresh error output:

bash
pac pages upload-code-site --rootPath "." 2>&1

Note: This intentionally triggers the upload to capture any errors. If the upload succeeds cleanly, that is also a valid diagnostic result ("no errors found").

Capture stdout+stderr as a single string. Pass to scripts/parse-deployment-errors.js:

bash
echo "{escaped-output}" | node "${PLUGIN_ROOT}/scripts/parse-deployment-errors.js"

Parse the JSON findings array. If the upload succeeded with no errors, note this and skip to Phase 5 with an empty findings list.

Phase 4 — Query Solution Import Status

Only run if .solution-manifest.json exists.

  1. Acquire Azure CLI token for environment URL
  2. Check recent async operations (last 24 hours):
    GET {envUrl}/api/data/v9.2/asyncoperations?$filter=statecode eq 3 and statuscode eq 31 and createdon gt {yesterday}&$select=asyncoperationid,name,message,friendlymessage,statuscode,completedon&$orderby=completedon desc&$top=5
  3. Check recent import jobs:
    GET {envUrl}/api/data/v9.2/importjobs?$select=solutionname,completedon,progress&$orderby=completedon desc&$top=3
  4. If failed operations found, pass each message field through parse-deployment-errors.js

Skip gracefully if auth is not available (auth failure in Phase 1).

Phase 5 — Auto-Diagnose Known Issues

Consolidate all findings from Phases 3 and 4. For each finding, categorize:

  • Error: Blocks deployment
  • Warning: May cause issues
  • Info: Informational

Also add findings for missing artifacts discovered in Phase 2:

  • Missing websiteRecordId → Error (patternId: missing-website-record-id)
  • Empty build output → Error (patternId: empty-build)
  • Multiple environment manifests → Warning (may indicate environment confusion)

Present all findings in a table:

#SeverityTypeIssueAuto-fix?
1ErroruploadJavaScript uploads blockedYes
2WarningconfigMultiple manifest files foundNo
Show full SKILL.md (556 more words)Show less
Phase 6 — Offer Auto-Fixes

For each Error finding with autoFixAvailable: true, in order:

<!-- gate: diagnose-deployment:6.auto-fix | category=consent | cancel-leaves=nothing -->

🚦 Gate (consent · diagnose-deployment:6.auto-fix): Per-finding consent before applying any auto-fix. Loops once per Error finding with autoFixAvailable: true — each finding gets its own Yes / No / Skip-all AskUserQuestion. The pattern ID surfaces in the prompt. Never batch fixes — three findings = three separate consent prompts (unless the user picks "Skip all" on the first, which short-circuits the loop). The Yes from finding 1 does NOT cover finding 2; each fix has its own blast radius (different files, different settings, different reversibility).

  1. Explain the issue and proposed fix

  2. Ask explicit permission via AskUserQuestion:

    "Issue: {message} Proposed fix: {suggestedFix} Apply this fix? Yes / No / Skip all auto-fixes"

  3. If approved, execute the fix:

    stale-manifest: Delete *-manifest.yml file(s) in .powerpages-site/

    bash
    # Ask which manifest to delete if multiple found, then:
    rm ".powerpages-site/{manifestFile}"

    blocked-js: Update blockedattachments setting

    bash
    # Get current setting first
    pac env list-settings | grep -i blocked
    # Remove .js from the blocked list (preserve other blocked types)
    pac env update-settings --name blockedattachments --value "{updated-value}"

    missing-website-record-id: Retrieve and update record ID

    bash
    pac pages list
    # Parse output, find matching site by name, then update powerpages.config.json

    auth-expired: Guide re-authentication

    bash
    pac auth create --environment "{envUrl}"
    az login

    empty-build: Run build

    bash
    npm run build
  4. After each fix, re-run the relevant check to verify it resolved the issue. Update finding status to "Fixed" or "Manual required".

Key Constraint: Never apply any fix without explicit user permission. Each fix requires a separate confirmation.

Phase 7 — Present Findings Summary

Display a final summary table of all findings:

#SeverityTypeIssueStatus
1ErroruploadJS uploads blockedFixed
2ErrorconfigMissing websiteRecordIdManual required
3WarningconfigMultiple manifest filesInformational

Status values:

  • Fixed: Auto-fix was applied and verified
  • Manual required: No auto-fix available — show manual steps
  • Skipped: User declined the fix
  • Informational: Warning/Info, no action needed

If all errors are resolved: suggest retrying deployment with /power-pages:deploy-site.

If manual steps remain: list them explicitly with commands or links.

Record Skill Usage

Reference: ${PLUGIN_ROOT}/references/skill-tracking-reference.md

Follow the skill tracking instructions in the reference to record this skill's usage. Use --skillName "DiagnoseDeployment".

Key Decision Points (Wait for User)

  1. Phase 6: Each individual auto-fix requires explicit confirmation before applying
  2. Phase 6: If user says "Skip all auto-fixes", stop offering fixes and go to summary

Error Handling

  • If pac pages upload-code-site produces no output: report "No upload errors detected in current state"
  • If Azure CLI token unavailable: skip Phase 4, note in summary
  • If parse-deployment-errors.js returns no findings: report "No known error patterns detected" and show raw output for manual review

Progress Tracking Table

Task subjectactiveFormDescription
Verify prerequisites and locate projectVerifying prerequisitesCheck PAC CLI, Azure CLI, locate project root and powerpages.config.json
Collect deployment artifactsCollecting deployment artifactsRead config, list manifests, check build output, check solution manifest
Surface upload errorsSurfacing upload errorsRe-run pac pages upload-code-site in capture mode, parse stdout/stderr
Query solution import statusQuerying solution import statusCheck recent failed async operations and import jobs in Dataverse
Diagnose and categorize findingsDiagnosing findingsPattern-match all errors against deployment-error-catalog, assign severity
Offer auto-fixesApplying auto-fixesFor each fixable error, ask permission and execute fix, verify result
Present findings summaryPresenting summaryShow all findings table with severity and fix status, list manual steps

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/power-pages/skills/diagnose-deployment of microsoft/power-platform-skills.

Open the folder on GitHubat commit 5ef4e4f

Compare with similar skills

Diagnose Deployment next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diagnose Deployment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diagnose Deployment this skillmicrosoft/power-platform-skills967—~2.6kAutomated safety check: NotesMIT
Azure Architecture Autopilotgithub/awesome-copilot40k1 repos~1.9kAutomated safety check: PassMIT
Aspiremicrosoft/aspire.dev1964 repos~1.1kAutomated safety check: PassMIT
Capacitymicrosoft/GitHub-Copilot-for-Azure2552 repos~1.7kAutomated safety check: PassMIT
Azure AI Agent App DeploymentAzure-Samples/get-started-with-ai-agents374—~4.7kAutomated safety check: NotesMIT
Aspire MonitoringCommunityToolkit/Aspire629—~3.5kAutomated safety check: PassMIT

Similar skills

  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    DevOps & CloudAuto-check passed
  • Aspire

    microsoft/aspire.dev

    Official

    Orchestrates Aspire distributed applications using the Aspire CLI for running, debugging, and managing distributed apps.

    196 GitHub starsUsed in 4 repos~1.1k tokens
    DevOps & CloudAuto-check passed
  • Capacity

    microsoft/GitHub-Copilot-for-Azure

    Official

    Discovers available Azure OpenAI model capacity across regions and projects.

    255 GitHub starsUsed in 2 repos~1.7k tokens
    DevOps & CloudAuto-check passed
  • Azure AI Agent App Deployment

    Azure-Samples/get-started-with-ai-agents

    Official

    Creates an azd environment, checks RBAC and model quota, provisions an AI agent app on Azure with azd up and health-checks the deployed app.

    374 GitHub stars~4.7k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Aspire Monitoring

    CommunityToolkit/Aspire

    ANALYSIS SKILL - Observe Aspire apps: logs, traces, metrics, resource state, telemetry export, browser telemetry, and the standalone dashboard.

    629 GitHub stars~3.5k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Deploy Model

    microsoft/GitHub-Copilot-for-Azure

    Official

    Unified Azure OpenAI model deployment skill with intelligent intent-based routing.

    255 GitHub starsUsed in 1 repo~1.8k tokens
    DevOps & CloudAuto-check passed

More from microsoft/power-platform-skills

All 87 skills in this repo
  • Manage Firewall

    microsoft/power-platform-skills

    Official

    Inspects and configures the web application firewall (WAF) in front of a Power Pages production site.

    967 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check: notes
  • Manage Headers

    microsoft/power-platform-skills

    Official

    Inspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection, cross-origin sharing, cookie behavior, and related…

    967 GitHub stars~3k tokensUpdated yesterday
    Auto-check: notes
  • Scan Code

    microsoft/power-platform-skills

    Official

    Scans a Power Pages site project for security issues in source code and dependencies.

    967 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check: notes
  • Scan Site

    microsoft/power-platform-skills

    Official

    Runs a security scan on a deployed Power Pages site, fetches the latest scan report, and produces a plain-language summary.

    967 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check: notes
  • Setup Datamodel

    microsoft/power-platform-skills

    Official

    Creates Dataverse tables, columns, and relationships for a Power Pages site based on a data model proposal.

    967 GitHub stars~4k tokensUpdated yesterday
    Auto-check: notes
  • Add Server Logic

    microsoft/power-platform-skills

    Official

    Creates, edits, and manages Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime.

    967 GitHub stars~18k tokensUpdated yesterday
    Auto-check: notes

Works with

Categories

Questions about Diagnose Deployment

What does Diagnose Deployment do?

Surfaces PAC CLI upload errors and Dataverse async operation errors, pattern-matches against a known failure catalog, and optionally auto-fixes identified issues. Diagnose Deployment is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Surfaces PAC CLI upload errors and Dataverse async operation errors, pattern-matches against a known failure catalog, and optionally auto-fixes identified issues.

When should I use Diagnose Deployment?

Diagnose Deployment fits situations like: asked to: diagnose deployment; debug deployment; deployment failed; show deployment errors.

How do I install Diagnose Deployment in Claude Code?

Run `npx skills add microsoft/power-platform-skills --skill diagnose-deployment -a claude-code`. Or copy the skill folder (plugins/power-pages/skills/diagnose-deployment in microsoft/power-platform-skills) into .claude/skills/diagnose-deployment in your project. Claude Code loads it when a task matches its description.

How do I install Diagnose Deployment in Codex?

Run `npx skills add microsoft/power-platform-skills --skill diagnose-deployment -a codex`. Or copy the skill folder (plugins/power-pages/skills/diagnose-deployment in microsoft/power-platform-skills) into .agents/skills/diagnose-deployment in your project. Codex loads it when a task matches its description.

Can I use Diagnose Deployment in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/power-platform-skills --skill diagnose-deployment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diagnose-deployment, .gemini/skills/diagnose-deployment, .github/skills/diagnose-deployment and .opencode/skills/diagnose-deployment in your project.

What does Diagnose Deployment need to run?

Going by SKILL.md and its folder, Diagnose Deployment needs the command-line tools its instructions call (node, az and npm). Its frontmatter pre-approves these tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskUpdate, TaskList, AskUserQuestion, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch.

Does Diagnose Deployment access the network?

SKILL.md names 1 domain. In commands or code: learn.microsoft.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Diagnose Deployment safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Diagnose Deployment use?

Diagnose Deployment is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diagnose Deployment use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Diagnose Deployment?

Skills that share tags, products or a category with Diagnose Deployment: Azure Architecture Autopilot (github/awesome-copilot, 40k stars), Aspire (microsoft/aspire.dev, 196 stars), Capacity (microsoft/GitHub-Copilot-for-Azure, 255 stars) and Azure AI Agent App Deployment (Azure-Samples/get-started-with-ai-agents, 374 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diagnose Deployment?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/power-platform-skills, which has 967 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/power-platform-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.