powercat-overflow

作者: microsoft

审查Power Platform解决方案(.zip)中的每个Power Automate云端流,对照微软编码指南,并生成一份…

npx skills add https://github.com/microsoft/power-cat-skills --skill powercat-overflow

PowerCAT-Overflow

Review every Power Automate cloud flow in a Power Platform solution ZIP against Microsoft's coding guidelines, write a single solution-level findings JSON next to the uploaded solution, then open the hosted PowerCAT-Overflow viewer with both files loaded.

Hosted viewer: https://microsoft.github.io/power-cat-skills/PowerCAT-Overflow.html

Step 0 — Load the authoritative source list

Before doing any analysis, fetch the canonical source list with web_fetch (raw: true):

https://raw.githubusercontent.com/microsoft/power-cat-skills/refs/heads/main/Common/PowerCAT%20OverFlow/sources.md

Parse the Markdown link list and treat that set as the only anchor citations allowed in findings. If the fetch fails (network error, 404, empty body), stop and tell the user the source list is unreachable — do not proceed with a review. Cache the parsed list in memory for the rest of this run.

Step 1 — Locate the input solution

  1. Prefer a .zip path in <tagged_files>. Use the most recent match.
  2. If none, ask via m_ask_user: "Please attach the Power Platform solution .zip you'd like me to review."
  3. Reject anything that isn't a ZIP. The skill does not accept loose JSON files in this mode.

Remember the absolute path of the ZIP and its parent directory — both are needed later.

Step 2 — Unpack & enumerate flows

Unpack the solution to a temp working directory (Expand-Archive on Windows, unzip elsewhere).

A valid Power Platform solution ZIP contains:

  • solution.xml at the root
  • a Workflows/ folder with one or more <FriendlyName>-<GUID>.json files (and matching .xml sidecars you can ignore for analysis)

Read solution.xml and extract:

  • Display name → solution.name
  • Unique name (publisher-prefixed, the UniqueName element) → solution.uniqueName
  • Version (the Version element) → solution.version

For each *.json in Workflows/:

  • Compute the friendly name by stripping the trailing -<GUID>.json suffix (e.g. cf_AcknowledgeCaseId-1234abcd-...-....json → cf_AcknowledgeCaseId). This friendly name is the key under which the flow's findings will be stored.
  • Load the JSON, then unwrap properties.definition → definition if present, exactly as before.

If Workflows/ is missing or empty, stop and tell the user the ZIP isn't a flow-bearing solution.

Step 3 — Analyse each flow

For every flow, walk all actions recursively (actions, else.actions, cases.*.actions, default.actions) and assign each finding an impact of low, medium, or high. Where a finding clearly points at a specific action, capture its name in the action field (must match the action key exactly, case-sensitive; triggers count). Cite only URLs from the Step 0 source list — never invent or paraphrase URLs.

Complexity

  • Total action count over 50, or nesting depth over 4 → high.
  • Many top-level Initialize_Variable actions, or many sibling Scopes that could be split into child flows → medium/high.

Maintainability

  • Hardcoded URLs / tenants / phone numbers / email addresses → high.
  • Magic numbers driving business policy (license cost, approval thresholds, quotas, poll intervals) → high.
  • Inconsistent action naming or missing description / peek-code notes → medium.
  • Flow not authored inside a solution (no env-var references) → medium.
  • Duplicate flows (Copyof-…, Test, Test2, MayankTest, etc.) shipped alongside originals → high (also surface at solution level).

Security

  • Generated credentials/secrets in HTTP bodies without runtimeConfiguration.secureData.properties covering inputs and/or outputs → high.
  • A single $authentication parameter reused across distinct external vendors → high.
  • OData $filter or SQL fragments built by interpolating triggerBody() / user input → high.
  • Request trigger without auth posture (no Entra/SAS/IP allow-list) → high.
  • Sensitive PII (salary, SSN, DOB, phone) in HTTP body without secureInputs → high.
  • HTML/email bodies built via raw concat() of user input → medium.
  • Instrumentation keys / connection strings in request bodies → medium.

Performance

  • Reference to outputs('X') / body('X') where X belongs to a sibling Switch case or sibling parallel branch → high.
  • Compensation/rollback logic that doesn't cover every resource the flow created → high.
  • Reference to fields not declared in the trigger schema → high.
  • HTTP action with no explicit retryPolicy → medium (group similar ones per flow).
  • Wait actions with long fixed delays, or Until loops with > 30 iterations / > 1 h total → medium.
  • Foreach without explicit runtimeConfiguration.concurrency → medium.
  • Catch / final scopes that only inspect a subset of upstream scopes → medium.
  • Explicit, sensible concurrency on Foreach loops → low (positive callout).

For each flow, produce 1–4 category objects (Complexity, Maintainability, Security, Performance in that order). Each category's impact = the highest impact among its items. 3–10 items per category is ideal; don't pad.

For every finding item, always include a fix field — a single actionable sentence (≤ 30 words, start with a verb) telling the developer exactly what to change. Examples:

  • "Enable secure inputs on HTTP action 'Send_Request' via Settings → Secure Inputs."
  • "Replace the hardcoded URL in 'Initialize_Variable_Endpoint' with an environment variable."
  • "Add concurrency (recommend: 10) to the Apply-to-each in its Settings panel."

Step 4 — Build the solution-level roll-up

Collect across all flows:

  • Per-category roll-up (1–4 entries): for each category that has at least one finding anywhere in the solution, compute the highest impact seen, write a 1–2 sentence summary, and set flowsAffected = how many flows had at least one item in that category.
  • topRisks: 3–8 cross-flow high-priority items (mostly impact: high, a few medium if they affect the executive verdict). Each risk has label, desc, impact, optional category, optional fix (same single-sentence remediation convention as per-flow items), and — when applicable — flow (friendly name) and action (so the viewer can deep-link).
  • stats: flowCount, totalActions (sum of action counts across flows), highImpactFlows (flows where any category rolled up to high), flowsReviewed (= flowCount unless one failed to parse).
  • summary: a narrative paragraph (markdown OK) giving the overall verdict, the top 1–3 priorities, and any patterns (duplicate flows, naming drift, security posture).

Step 5 — Write the Solution Findings file

Schema (authoritative): https://raw.githubusercontent.com/microsoft/power-cat-skills/refs/heads/main/Common/PowerCAT%20OverFlow/solution.findings.schema.json Example: https://raw.githubusercontent.com/microsoft/power-cat-skills/refs/heads/main/Common/PowerCAT%20OverFlow/solution.findings.sample.json

Shape:

{
  "solution": {
    "name": "...",
    "uniqueName": "...",
    "version": "...",
    "summary": "...",
    "categories": [ { "category": "...", "impact": "...", "summary": "...", "flowsAffected": 0 } ],
    "topRisks":   [ { "label": "...", "desc": "...", "fix": "...", "impact": "...", "category": "...", "flow": "...", "action": "..." } ],
    "stats":      { "flowCount": 0, "totalActions": 0, "highImpactFlows": 0, "flowsReviewed": 0 }
  },
  "flows": {
    "<FriendlyFlowName>": [
      { "category": "Complexity",      "impact": "low|medium|high", "items": [ { "label": "...", "desc": "...", "fix": "...", "impact": "...", "action": "..." } ] },
      { "category": "Maintainability", "impact": "...", "items": [ ... ] },
      { "category": "Security",        "impact": "...", "items": [ ... ] },
      { "category": "Performance",     "impact": "...", "items": [ ... ] }
    ]
  }
}

Output filename: <OriginalSolutionZipBaseName>.findings.json Output location: the same folder as the uploaded .zip.

Validate the output against the JSON Schema before saving (at minimum: required keys present, category enum values, impact enum values, additionalProperties=false respected). If validation fails, fix and re-validate before continuing.

Step 6 — Launch the hosted viewer and load both files

Open the hosted PowerCAT-Overflow viewer and upload the two files using the Playwright browser tools:

  1. playwright-browser_navigate → https://microsoft.github.io/power-cat-skills/PowerCAT-Overflow.html
  2. playwright-browser_snapshot to discover the two file inputs (one for the solution .zip, one for the findings .json). The labels in the UI clearly distinguish them.
  3. playwright-browser_file_upload once per input, passing the absolute paths in the right order. If the page exposes a single chooser that opens twice, call the upload tool twice with the appropriate path each time.
  4. playwright-browser_snapshot again to confirm both files are accepted (look for the rendered solution overview / flow list).

If Playwright is unavailable, fall back to Start-Process "https://microsoft.github.io/power-cat-skills/PowerCAT-Overflow.html" and tell the user the two exact file paths to upload manually.

Step 7 — Hand over

Write a short chat message (≤150 words) containing:

  1. A 4-row score table (Complexity / Maintainability / Security / Performance — solution roll-up impact).
  2. The top 3 risks from solution.topRisks (one line each, with the flow name when present).
  3. The absolute path of the .findings.json file you wrote.
  4. The viewer URL.
  5. One-line note that source citations were loaded fresh from upstream sources.md.

End with: "Handing over — explore the solution in the open viewer tab."

Hard rules

  • Never invent action names. Only use names that appear in the flow's actions / triggers keys.
  • Never paste secrets, tokens, or full PII payloads back into chat.
  • Never write the user's flow JSON or solution ZIP to any external destination; all artefacts stay local.
  • Never cite a guideline URL that isn't in the Step 0 source list.
  • The output JSON must validate against the published solution.findings.schema.json.
  • Friendly flow names in flows keys must match the rule: ZIP filename minus the trailing -<GUID>.json.

来自 microsoft 的更多技能

oss-growth
microsoft
OSS增长黑客角色
agent-framework-azure-ai-py
microsoft
使用Microsoft Agent Framework Python SDK(agent-framework-azure-ai)构建Azure AI Foundry代理。在创建使用AzureAIAgentsProvider的持久化代理、使用托管工具(代码解释器、文件搜索、网络搜索)、集成MCP服务器、管理对话线程或实现流式响应时使用。涵盖函数工具、结构化输出和多工具代理。
development
airunway-aks-setup
microsoft
在AKS上设置AI Runway——从裸集群到运行模型。涵盖集群验证、控制器安装、GPU评估、提供商设置和首次部署。适用场景:“设置AI Runway”、“接入AKS集群”、“安装AI Runway”、“airunway设置”、“将模型部署到AKS”、“在AKS上进行GPU推理”、“在AKS上配置KAITO”、“在AKS上运行LLM”、“在AKS上使用vLLM”、“在AKS上设置模型服务”、“AI Runway控制器”。
devops
appinsights-instrumentation
microsoft
使用Azure Application Insights对Web应用进行插桩的指南。提供遥测模式、SDK设置和配置参考。适用场景:如何对应用进行插桩、App Insights SDK、遥测模式、什么是App Insights、Application Insights指南、插桩示例、APM最佳实践。
devops
applicationinsights-web-ts
microsoft
使用Application Insights JavaScript SDK(@microsoft/applicationinsights-web)为浏览器/Web应用添加检测。用于真实用户监控(RUM)——页面视图、点击、AJAX/fetch依赖项、异常、自定义事件,以及与后端OpenTelemetry追踪关联的浏览器端GenAI代理追踪。涵盖SDK加载器脚本和npm设置、框架扩展(React、React Native、Angular)、点击分析、遥测初始化器,以及从浏览器发出的代理/工具/模型跨度所遵循的OTel GenAI语义约定。
devops
azure-ai-anomalydetector-java
microsoft
使用适用于 Java 的 Azure AI 异常检测器 SDK 构建异常检测应用程序。在实现单变量/多变量异常检测、时间序列分析或 AI 驱动的监控时使用。
development
azure-ai-language-conversations-py
microsoft
使用azure-ai-language-conversations Python SDK实现对话语言理解(CLU)。当使用ConversationAnalysisClient分析对话意图和实体、构建NLP功能或将语言理解集成到应用程序中时使用。
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python。用于机器学习工作区、作业、模型、数据集、计算资源和管道。 触发词:“azure-ai-ml”、“MLClient”、“工作区”、“模型注册表”、“训练作业”、“数据集”。
development