analyze-performance
Skill1.1k starsChanged 7 days agoMITView on GitHub
Statically scans the entire local Power Pages codebase for performance anti-patterns — unpaginated Power Pages lists, webpages/web templates used as custom data APIs, FetchXML over-fetching / N+1 / advanced query hints / cache bypassing, unbounded Web API queries, disabled header/footer output caching, sign-in and page tracking, main-thread-blocking JS, CSS @import, frequent Web API polling, and oversized assets — then enriches findings with AI-driven suggestions and mitigations grounded in the affected customer-code snippets, reports them, and offers safe auto-fixes with per-fix approval. Use when the user wants to: "check performance", "perf check", "find performance issues", "why is my site slow", "optimize my Power Pages site", "find anti-patterns", "review FetchXML performance", "is my site over-fetching data", or "audit site performance".
4 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- athina-ai/goose-skillstheir own version, first seen Nov 9, 2026
- gooseworks-ai/goose-skillstheir own version, first seen Nov 1, 2026
- r3bl-org/r3bl-open-coretheir own version, first seen Oct 17, 2026
- Upload-Post/upload-post-plugintheir own version, first seen Oct 2, 2026
Who's talking about microsoft/power-platform-skills
- geekfujiwara/CodeAppsDevelopmentStandard“[sdk-update] 自動検知: Power Platform SDK / 公式 skills 更新 (2026-09-06)”GitHub · Sep 6, 2026 · 1 reactions
- geekfujiwara/CodeAppsDevelopmentStandard“[sdk-update] 自動検知: Power Platform SDK / 公式 skills 更新 (2026-08-23)”GitHub · Aug 23, 2026 · 1 reactions
- sudosubin/agents.nix“codex-marketplaces.github.microsoft.power-platform-skills: init at 0-unstable-2026-11-06”GitHub · Nov 7, 2026
- sudosubin/agents.nix“claude-code-marketplaces.github.microsoft.power-platform-skills: 3ffa5b8 → 9d26fde”GitHub · Nov 7, 2026
- sudosubin/agents.nix“agent-skills.github.microsoft.power-platform-skills: 3ffa5b8 → 9d26fde”GitHub · Nov 6, 2026
The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 50
Talked about on GitHub (50 times).
On GitHub · 50
- Sep 6, 2026[sdk-update] 自動検知: Power Platform SDK / 公式 skills 更新 (2026-09-06) — geekfujiwara/CodeAppsDevelopmentStandard1 reaction
- Aug 23, 2026[sdk-update] 自動検知: Power Platform SDK / 公式 skills 更新 (2026-08-23) — geekfujiwara/CodeAppsDevelopmentStandard1 reaction · 2 comments
- Nov 7, 2026codex-marketplaces.github.microsoft.power-platform-skills: init at 0-unstable-2026-11-06 — sudosubin/agents.nix0 reactions
- Nov 7, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 3ffa5b8 → 9d26fde — sudosubin/agents.nix0 reactions
- Nov 6, 2026agent-skills.github.microsoft.power-platform-skills: 3ffa5b8 → 9d26fde — sudosubin/agents.nix0 reactions
45 more on GitHub
- Nov 6, 2026claude-code-plugins.github.microsoft.power-platform-skills: 3ac90e9 → 9d26fde — sudosubin/agents.nix0 reactions
- Nov 6, 2026agent-plugins.github.microsoft.power-platform-skills: 3ac90e9 → 9d26fde — sudosubin/agents.nix0 reactions
- Nov 6, 2026copilot-plugins.github.microsoft.power-platform-skills: 3ac90e9 → 9d26fde — sudosubin/agents.nix0 reactions
- Nov 6, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 3ac90e9 → 3ffa5b8 — sudosubin/agents.nix0 reactions
- Nov 6, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-11-05 → 0-unstable-2026-11-06 — sudosubin/agents.nix0 reactions
- Nov 6, 2026agent-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-05 → 0-unstable-2026-11-06 — sudosubin/agents.nix0 reactions
- Nov 6, 2026claude-code-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-05 → 0-unstable-2026-11-06 — sudosubin/agents.nix0 reactions
- Nov 6, 2026copilot-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-05 → 0-unstable-2026-11-06 — sudosubin/agents.nix0 reactions
- Nov 6, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 0-unstable-2026-11-05 → 0-unstable-2026-11-06 — sudosubin/agents.nix0 reactions
- Nov 6, 2026agent-skills.github.microsoft.power-platform-skills: 22f9137 → 2eb182a — sudosubin/agents.nix0 reactions
- Nov 5, 2026claude-code-plugins.github.microsoft.power-platform-skills: 8821fee → 2eb182a — sudosubin/agents.nix0 reactions
- Nov 5, 2026agent-plugins.github.microsoft.power-platform-skills: 8821fee → 2eb182a — sudosubin/agents.nix0 reactions
- Nov 5, 2026copilot-plugins.github.microsoft.power-platform-skills: 8821fee → 4076781 — sudosubin/agents.nix0 reactions
- Nov 5, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 0-unstable-2026-11-04 → 0-unstable-2026-11-05 — sudosubin/agents.nix0 reactions
- Nov 5, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-11-04 → 0-unstable-2026-11-05 — sudosubin/agents.nix0 reactions
- Nov 5, 2026agent-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-04 → 0-unstable-2026-11-05 — sudosubin/agents.nix0 reactions
- Nov 5, 2026claude-code-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-04 → 0-unstable-2026-11-05 — sudosubin/agents.nix0 reactions
- Nov 5, 2026copilot-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-04 → 0-unstable-2026-11-05 — sudosubin/agents.nix0 reactions
- Nov 4, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-11-03 → 0-unstable-2026-11-04 — sudosubin/agents.nix0 reactions
- Nov 4, 2026claude-code-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-03 → 0-unstable-2026-11-04 — sudosubin/agents.nix0 reactions
- Nov 4, 2026agent-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-03 → 0-unstable-2026-11-04 — sudosubin/agents.nix0 reactions
- Nov 4, 2026copilot-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-03 → 0-unstable-2026-11-04 — sudosubin/agents.nix0 reactions
- Nov 4, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 0-unstable-2026-11-03 → 0-unstable-2026-11-04 — sudosubin/agents.nix0 reactions
- Nov 4, 2026agent-skills.github.microsoft.power-platform-skills: 96d16d0 → da8ea7a — sudosubin/agents.nix0 reactions
- Nov 3, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 0-unstable-2026-11-02 → 0-unstable-2026-11-03 — sudosubin/agents.nix0 reactions
- Nov 3, 2026claude-code-plugins.github.microsoft.power-platform-skills: 4cf6677 → da8ea7a — sudosubin/agents.nix0 reactions
- Nov 3, 2026agent-plugins.github.microsoft.power-platform-skills: 4cf6677 → da8ea7a — sudosubin/agents.nix0 reactions
- Nov 3, 2026agent-skills.github.microsoft.power-platform-skills: fc1625b → 96d16d0 — sudosubin/agents.nix0 reactions
- Nov 3, 2026copilot-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-02 → 0-unstable-2026-11-03 — sudosubin/agents.nix0 reactions
- Nov 3, 2026agent-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-02 → 0-unstable-2026-11-03 — sudosubin/agents.nix0 reactions
- Nov 3, 2026claude-code-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-11-02 → 0-unstable-2026-11-03 — sudosubin/agents.nix0 reactions
- Nov 3, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-11-02 → 0-unstable-2026-11-03 — sudosubin/agents.nix0 reactions
- Nov 2, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-10-30 → 0-unstable-2026-11-02 — sudosubin/agents.nix0 reactions
- Nov 2, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 0-unstable-2026-10-30 → 0-unstable-2026-11-02 — sudosubin/agents.nix0 reactions
- Nov 2, 2026claude-code-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-10-30 → 0-unstable-2026-11-02 — sudosubin/agents.nix0 reactions
- Nov 2, 2026agent-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-10-30 → 0-unstable-2026-11-02 — sudosubin/agents.nix0 reactions
- Nov 2, 2026copilot-plugins.github.microsoft.power-platform-skills: 0-unstable-2026-10-30 → 0-unstable-2026-11-02 — sudosubin/agents.nix0 reactions
- Nov 2, 2026[sdk-update] 自動検知: Power Platform SDK / 公式 skills 更新 (2026-11-02) — geekfujiwara/CodeAppsDevelopmentStandard0 reactions
- Oct 30, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-10-29 → 0-unstable-2026-10-30 — sudosubin/agents.nix0 reactions
- Oct 30, 2026claude-code-marketplaces.github.microsoft.power-platform-skills: 0-unstable-2026-10-29 → 0-unstable-2026-10-30 — sudosubin/agents.nix0 reactions
- Oct 30, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-10-28 → 0-unstable-2026-10-29 — sudosubin/agents.nix0 reactions
- Oct 29, 2026agent-skills.github.microsoft.power-platform-skills: 0a7bf47 → c159268 — sudosubin/agents.nix0 reactions
- Oct 28, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-10-27 → 0-unstable-2026-10-28 — sudosubin/agents.nix0 reactions
- Oct 27, 2026agent-skills.github.microsoft.power-platform-skills: 696cac9 → f39b3bb — sudosubin/agents.nix0 reactions
- Oct 27, 2026agent-skills.github.microsoft.power-platform-skills: 0-unstable-2026-10-26 → 0-unstable-2026-10-27 — sudosubin/agents.nix0 reactions
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- athina-ai/goose-skills★ 1.3ksame name
- gooseworks-ai/goose-skills★ 1.3ksame name
- r3bl-org/r3bl-open-core★ 486same name
- Upload-Post/upload-post-plugin★ 1same 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 repository145 other files it gives its agents.
- AGENTS.mdAGENTS.md
- plugins/canvas-apps/AGENTS.mdAGENTS.md
- plugins/code-apps/AGENTS.mdAGENTS.md
- plugins/mobile-apps/AGENTS.mdAGENTS.md
- plugins/mobile-apps/template/AGENTS.mdAGENTS.md
- plugins/model-apps/AGENTS.mdAGENTS.md
- plugins/pcf/AGENTS.mdAGENTS.md
- plugins/power-apps-mobile-extension/AGENTS.mdAGENTS.md
- plugins/power-automate/AGENTS.mdAGENTS.md
- plugins/power-pages/AGENTS.mdAGENTS.md
- plugins/process-intelligence/AGENTS.mdAGENTS.md
- plugins/mobile-apps/template/CLAUDE.mdCLAUDE.md
- plugins/mobile-apps/template/.github/copilot-instructions.mdCopilot instructions
- add-data-sourceSkill
- canvas-appSkill
- configure-canvas-mcpSkill
- report-issueSkill
- add-azuredevopsSkill
- add-connectorSkill
- add-datasourceSkill
- add-dataverseSkill
- add-excelSkill
- add-mcscopilotSkill
- add-office365Skill
- add-onedriveSkill
- add-sharepointSkill
- add-teamsSkill
- add-workiqSkill
- create-code-appSkill
- deploySkill
- list-connectionsSkill
- report-issueSkill
- generate-codeful-mcp-toolSkill
- generate-mcp-app-uiSkill
- report-issueSkill
- add-connectorSkill
- add-datasourceSkill
- add-dataverseSkill
- add-cameraSkill
- add-geolocationSkill
- add-pdf-reportSkill
- add-pdf-viewerSkill
- add-pen-inputSkill
- add-nativeSkill
- add-sample-dataSkill
- add-sharepointSkill
- add-table-to-offline-profileSkill
- assign-offline-profileSkill
- check-updatesSkill
- create-mobile-appSkill
- debug-appSkill
- deploySkill
- design-systemSkill
- edit-appSkill
- edit-offline-profileSkill
- enable-tables-offlineSkill
- list-connectionsSkill
- open-wrap-urlSkill
- preview-offline-scopeSkill
- preview-screensSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 4 are distinctive, and 18 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
No sign-in, PAC CLI, or Azure CLI is required — the analysis is fully offline.
- Very specific: line 86
Create tasks in three groups.
- Very specific: line 98
Detect review mode first: if $ARGUMENTS contains --review <out-dir>, remember <REVIEW_DIR>.
- Very specific: line 101
If <REVIEW_DIR> itself contains recognizable Power Pages source, use it as both <PROJECT_ROOT> and <REVIEW_DIR>.
- Very specific: line 107
Treat any of these as recognizable Power Pages source: .powerpages-site/, root-level .portalconfig/, website.yml, or a characteristic …
- Very specific: line 112
If <PROJECT_ROOT>/powerpages.config.json exists, tell the user that the selected path is a SPA website and this skill currently supports …
- Very specific: line 115
If no existing directory with recognizable non-SPA Power Pages source can be located, tell the user and recommend /create-site, then stop.
- Very specific: line 126
Run microsoft_docs_search with the query: Power Pages Site Checker performance FetchXML output caching best practices.
- Distinctive: line 132
Run the deterministic analyzer over the whole project:
- Very specific: line 140
If the only finding is PERF-NONE, the codebase is clean — note this and skip Phase 4/5 (still render the report in Phase 6 so the user has …
- Very specific: line 144
Run this after every deterministic scan result that will be presented or written to analyze-performance.json (including review mode).
- Very specific: line 150
Read the file named by finding.location and capture a tight snippet around the line (about 20 lines before/after, capped so the report …
- Very specific: line 152
If the file no longer exists or the finding has no location, use the finding's details and fix only.
- Distinctive: line 154
Add these fields to the finding object:
- Very specific: line 160
Keep the deterministic fields (tag, severity, fix, fixAction, autoFixAvailable) unchanged.
- Distinctive: line 191
Keep the language plain; explain a tag only when asked.
- Very specific: line 199
Only the site-setting and tracking findings are safely automatable (PERF-HEADER-OUTPUTCACHE, PERF-FOOTER-OUTPUTCACHE, PERF-SIGNIN-TRACKING, …
- Very specific: line 217
If it reports the setting already exists, treat it as already handled and switch to the set-site-setting path.
- Very specific: line 219
set-yaml-field: use Edit at the finding's precise location to set <fixAction.field>: <fixAction.value> (e.g., adx_enabletracking: false). - Very specific: line 249
Write the enriched { status, findings, details } object (the Phase 5 re-scan result if a re-scan ran, otherwise the Phase 2 result, with …
- Very specific: line 251
Review mode: write to <REVIEW_DIR>/analyze-performance.json, then stop.
- Very specific: line 252
Interactive mode: write to <TEMP_DIR>/analyze-performance.json where <TEMP_DIR> is a scratch directory containing only this file.
“Common” is measured: kept by at least 6 in 10 of the 4 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
Plugin check: Run
node "${PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
analyze-performance
Statically analyzes the entire local Power Pages codebase for known performance anti-patterns, enriches the static findings with AI-driven, code-aware suggestions and mitigations, presents them by severity in an HTML report + plain-language summary, and offers safe auto-fixes with per-fix approval. Never applies a fix without explicit consent.
This skill reads local source only — it does not call the deployed site. For a live security/vulnerability scan use /scan-site.
Initial request: $ARGUMENTS
Prerequisites
- An existing local non-SPA Power Pages project or PAC CLI site download.
.powerpages-site/, root-level.portalconfig/,website.yml, and portal content folders are useful discovery markers, but they are not all required when the user supplies an existing site folder. - SPA websites are not supported yet.
powerpages.config.jsonis the authoritative local SPA marker; if it exists at the selected project root, tell the user this skill currently supports non-SPA websites only and stop. - Node.js (bundled scripts run under
node).
No sign-in, PAC CLI, or Azure CLI is required — the analysis is fully offline.
What it detects
See references/performance-reference.md for the authoritative rule catalog (tags,
severities, detection, fixes, thresholds, and Microsoft Learn sources). The scan
must cover all of these categories:
- List pagination — Power Pages list definitions with no positive
adx_pagesize/pagesize. - Webpages used as APIs — FetchXML/entity-backed web templates or webpage content that emit JSON/XML instead of a normal HTML page.
- FetchXML anti-patterns —
all-attributes, no explicit columns, too many columns, no paging, oversizedcount/top, N+1 queries inside Liquid loops, unnecessaryreturntotalrecordcount, leading-wildcardlikefilters, and related-table ordering. - FetchXML query controls — advanced query hints (
options,latematerialize,no-lock,useraworderby, filterhint) and request-time values or explicit settings that bypass server-side query caching. - Web API anti-patterns —
$select=*, missing$select, no page bound ($topsafety cap orPrefer: odata.maxpagesize=Ncursor paging), too many selected columns, oversized$top,$count=true,$expandwithout a nested$select,contains/endswithfilters, request-time date filters, related-table ordering, request-per-item/N+1 loops, and short-interval polling. - Rendering and caching — disabled Header/Footer output caching,
render-blocking
<head>scripts, runtime CSS@import, synchronous XHR/jQuery, anddocument.write. - Tracking and volume — sign-in/page/file tracking, excessive web-file or web-role counts, and oversized static assets.
Phases
- Prerequisites — locate the project, confirm the site exists, detect review mode 1.5. Ground in current performance guidance — optional Microsoft Learn cross-check (capped, offline-safe)
- Scan — run the deterministic analyzer over the codebase 2.5. AI mitigation pass — inspect customer-code snippets behind each finding and add code-aware suggestions/mitigations
- Present findings — severity table + coverage stats + AI suggestions
- Offer auto-fixes — per-finding consent loop for the safely-automatable findings
- Verify — re-run the analyzer to confirm fixes resolved their findings
- Report & next action — render the HTML report, summarize, and route follow-ups
Task Tracking
Create tasks in three groups. Mark each in_progress when starting, completed when done.
| Group | When to create | Tasks |
| 1 | At start | Verify prerequisites and locate project |
| 2 | After prerequisites pass | Scan codebase for anti-patterns · Add AI-driven suggestions and mitigations · Present findings |
| 3 | After findings presented (skip all three in review mode) | Offer auto-fixes (only if any autoFixAvailable) · Verify fixes · Render report and route follow-ups |
Phase 1 — Verify Prerequisites and Locate Project
- Detect review mode first: if
$ARGUMENTScontains--review <out-dir>, remember<REVIEW_DIR>. - Resolve
<PROJECT_ROOT>in this order:- If
<REVIEW_DIR>itself contains recognizable Power Pages source, use it as both<PROJECT_ROOT>and<REVIEW_DIR>. This supports orchestrated reviews that pass the downloaded site folder directly. - Otherwise use an explicitly supplied project directory, then the current
working directory. Use
Globto locate**/powerpages.config.json,**/.powerpages-site,**/.portalconfig, or**/website.ymlwhen needed.
- If
- Treat any of these as recognizable Power Pages source:
.powerpages-site/, root-level.portalconfig/,website.yml, or a characteristic portal export layout containing folders such asweb-pages/,web-templates/, orweb-files/. Do not reject an explicitly supplied existing site folder merely because it lacks.powerpages-site/. - If
<PROJECT_ROOT>/powerpages.config.jsonexists, tell the user that the selected path is a SPA website and this skill currently supports non-SPA Power Pages websites only, then stop. - If no existing directory with recognizable non-SPA Power Pages source can be located,
tell the user and recommend
/create-site, then stop. - In review mode Phases 3, 4, and 6-presentation are skipped: Phase 2 runs, Step 6.2 writes JSON only, and the skill stops after writing it.
Report: "Found project: <PROJECT_ROOT>. Scanning for performance anti-patterns."
Phase 1.5 — Ground in current performance guidance
Skip in review mode. Cap this step at ~30 seconds. If MCP search / fetch errors out or is unavailable, log a one-line note and continue — this skill must remain runnable offline.
- Run
microsoft_docs_searchwith the query:Power Pages Site Checker performance FetchXML output caching best practices. - Optionally
microsoft_docs_fetchhttps://learn.microsoft.com/en-us/power-pages/admin/site-checker-performance. - Extract a one-paragraph summary of what Microsoft Learn currently says. Compare it against the rule catalog in
references/performance-reference.md. If Learn documents a performance pattern not covered by any analyzer rule, surface it to the user in Phase 6 as a manual follow-up — do not silently invent findings the analyzer did not produce.
Phase 2 — Scan the codebase
Run the deterministic analyzer over the whole project:
node "${PLUGIN_ROOT}/skills/analyze-performance/scripts/analyze-performance.js" --projectRoot "<PROJECT_ROOT>"The analyzer prints a single JSON object { status, findings, details, severityCounts } to stdout. Parse it. Each finding has id, tag, severity, title, location, details, fix, autoFixAvailable, and (when auto-fixable) fixAction. See references/performance-reference.md for the finding envelope and every tag's meaning.
If the only finding is PERF-NONE, the codebase is clean — note this and skip Phase 4/5 (still render the report in Phase 6 so the user has a record).
Phase 2.5 — Add AI-driven suggestions and mitigations
Run this after every deterministic scan result that will be presented or written
to analyze-performance.json (including review mode). Skip only PERF-NONE.
For each finding, inspect the relevant customer-code context before writing the final JSON:
- Read the file named by
finding.locationand capture a tight snippet around the line (about 20 lines before/after, capped so the report stays readable). If the file no longer exists or the finding has no location, use the finding'sdetailsandfixonly. - Add these fields to the finding object:
aiSuggestion: one or two sentences explaining the best next change for this specific code path, grounded in the snippet and the rule catalog.mitigation: a concrete mitigation plan that preserves behavior. Name the likely code/config edit, the safer alternative when there are tradeoffs, and anything the user must verify manually.
- Keep the deterministic fields (
tag,severity,fix,fixAction,autoFixAvailable) unchanged. Do not downgrade, suppress, or invent analyzer findings during this AI pass. - For heuristic findings (for example webpage-as-API, Web API N+1, cache bypassing, related-column ordering), say that the suggestion is conditional and name the observation that would confirm it.
- For auto-fixable site-setting/tracking findings, keep
mitigationaligned with the existingfixActionand repeat any important caveat, especially the Header/Footer output-cache substitution requirement.
The report renderer displays aiSuggestion and mitigation as separate fields,
so write them into the JSON rather than only mentioning them in chat. If the
current AI context cannot safely inspect a file because it is restricted or too
large, add a conservative mitigation based on details/fix and explicitly say
the source snippet was not inspected.
Phase 3 — Present findings
Skip in review mode (go straight to Step 5.1's JSON write).
Present all findings grouped by severity, highest first. Include the AI suggestion and mitigation under each row (or immediately after the table for long items) so the user sees both the static check and the code-aware recommendation:
| # | Severity | Tag | Issue | Location | Auto-fix? |
| 1 | high | PERF-FETCHXML-ALLATTR | FetchXML retrieves all attributes | ...:2 | No |
| 2 | warning | PERF-HEADER-OUTPUTCACHE | Header output caching disabled | ...sitesetting.yml | Yes |
Then show the coverage stats from details.entries (FetchXML/Liquid, list,
Web API/script and CSS files scanned; web-file/web-role counts; total findings).
Keep the language plain; explain a tag only when asked. Make clear that AI
suggestions are grounded in the local snippet but still require developer
judgment for business-specific behavior.
Phase 4 — Offer auto-fixes
Skip in review mode. Skip entirely if no finding has
autoFixAvailable: true.
Only the site-setting and tracking findings are safely automatable (PERF-HEADER-OUTPUTCACHE, PERF-FOOTER-OUTPUTCACHE, PERF-SIGNIN-TRACKING, PERF-WEBPAGE-TRACKING, PERF-WEBFILE-TRACKING). List pagination, webpage-as-API, FetchXML, Web API, query-hint, cache-bypass, and asset findings require human judgment — present those as manual fixes only.
For each finding with autoFixAvailable: true, in order:
<!-- gate: analyze-performance:4.auto-fix | category=consent | cancel-leaves=nothing -->🚦 Gate (consent · analyze-performance:4.auto-fix): Per-finding consent before applying any auto-fix. Loops once per
autoFixAvailablefinding — each gets its own Yes / No / Skip-allAskUserQuestionnaming the finding's tag and the exact change. Never batch fixes — three fixable findings = three separate prompts (unless the user picks "Skip all", which short-circuits the loop). Each fix has its own blast radius (a different site setting or YAML file), so approving one does not approve the next.Trigger: Phase 4, once per fixable finding. Why we ask: Enabling output caching alone can break header/footer rendering unless the web templates also use
{% substitution %}(see caveat below); toggling tracking edits committed YAML. The user must consent to each concrete change. Cancel leaves: Nothing — declining a fix leaves that finding untouched and reported as manual.
For the approved finding, apply its fixAction:
create-site-setting(setting is absent from a per-record.powerpages-sitelayout): create it with the shared helper —
If it reports the setting already exists, treat it as already handled and switch to thenode "${PLUGIN_ROOT}/scripts/create-site-setting.js" --projectRoot "<PROJECT_ROOT>" --name "<fixAction.name>" --value "<fixAction.value>" --type boolean --description "<short why>"set-site-settingpath.set-site-setting(setting exists but is wrong): useEditon the finding'slocationfile to flip thevalue:line (false→true, or trackingtrue→false). Do not callcreate-site-setting.js— it refuses to overwrite.set-yaml-field: useEditat the finding's preciselocationto set<fixAction.field>: <fixAction.value>(e.g.,adx_enabletracking: false). For a non-SPA aggregatesitesetting.yml,fixAction.recordNameidentifies the setting record and the location points at its exactadx_valueline. Do not replace another record's matching boolean.
Output-cache caveat (always surface this): enabling
Header/Footer/OutputCache/Enabledis not sufficient on its own — the Header, Footer, and Languages-Dropdown web templates must also use the{% substitution %}Liquid tag, or those regions stop rendering. After applying an output-cache fix, tell the user to update those templates and verify the site still renders.
Mark each finding Fixed, Skipped, or Manual required as you go.
Phase 5 — Verify fixes
Skip in review mode. Skip if no auto-fix was applied.
Re-run the analyzer to confirm the applied fixes resolved their findings:
node "${PLUGIN_ROOT}/skills/analyze-performance/scripts/analyze-performance.js" --projectRoot "<PROJECT_ROOT>"Confirm each fixed finding's tag/location is gone (or downgraded from warning to info for the absent→present caching case). If a fix did not take, report it and offer to retry or hand it to the user. Use this re-scanned result set as the basis for the Phase 6 report so it reflects the post-fix state.
Phase 6 — Report & next action
6.1 Review mode short-circuit
Handled at Step 6.2 below — review mode never reaches the HTML render or the follow-up walk-through.
Step 6.2 — Write the review JSON
Write the enriched { status, findings, details } object (the Phase 5 re-scan result if a re-scan ran, otherwise the Phase 2 result, with Phase 2.5 aiSuggestion/mitigation fields applied) to a JSON file:
- Review mode: write to
<REVIEW_DIR>/analyze-performance.json, then stop. The orchestrating skill (e.g.,security-review) handles presentation. - Interactive mode: write to
<TEMP_DIR>/analyze-performance.jsonwhere<TEMP_DIR>is a scratch directory containing only this file.
The filename must be analyze-performance.json — that is the key
build-review-data.js maps to the Performance section.
Step 6.3 — Render the HTML report
Skip in review mode. Reuse the shared report pipeline (same template as the security review and site scan):
The final HTML report is a persistent website artifact under
<PROJECT_ROOT>/docs/, consistent with the other review reports. Only
analyze-performance.json and data.json are temporary scratch files; delete their
temporary directory after the HTML render succeeds.
node "${PLUGIN_ROOT}/scripts/build-review-data.js" \
--reportName "Performance Analysis" \
--inputDir "<TEMP_DIR>" \
--siteName "<SITE_NAME>" \
--goalLabel "Performance" \
--scopeLabel "Local codebase" \
--summary "<SUMMARY_TEXT>" \
--output "<TEMP_DIR>/data.json"
node "${PLUGIN_ROOT}/scripts/render-review.js" \
--data "<TEMP_DIR>/data.json" \
--output "<PROJECT_ROOT>/docs/performance-analysis-<YYYY-MM-DD-HHMMSS>.html"
node "${PLUGIN_ROOT}/skills/analyze-performance/scripts/validate-analyze-performance.js" \
--reportPath "<PROJECT_ROOT>/docs/performance-analysis-<YYYY-MM-DD-HHMMSS>.html"<SITE_NAME> comes from the site's website.yml; fall back to the folder name.
The filename must include the local timestamp (e.g.,
performance-analysis-2026-05-14-053805.html). Delete <TEMP_DIR> after the
render and explicit validation succeed, then open the report in the browser.
Step 6.4 — Summarize and route follow-ups
<!-- gate: analyze-performance:6.next-action | category=plan | cancel-leaves=nothing -->🚦 Gate (plan · analyze-performance:6.next-action): After the report, recommend the single most useful next step and let the user accept or choose differently via
AskUserQuestion— walk through the manual (non-auto-fixable) findings one at a time, re-scan, or finish. Reviewing findings and re-scanning are read-only; nothing is changed without a later Phase 4 consent.Trigger: Phase 6, after the report is rendered (interactive mode only). Why we ask: The manual list, webpage-as-API, FetchXML, Web API, query-hint, cache-bypass, and asset fixes need edits the user must drive; auto-walking every finding would be noisy if they only wanted the report. Cancel leaves: Nothing — the report is already written; declining ends the skill cleanly.
Give a plain-language summary: total findings, count by severity, and how many were auto-fixed. For manual findings (list pagination, webpage-as-API patterns, FetchXML/Web API anti-patterns, query hints, cache bypassing, volume counts, and large assets), offer to walk through them one at a time with the concrete edit each needs. If nothing meaningful remains, end the skill — do not ask just to ask.
Record Skill Usage
Reference:
${PLUGIN_ROOT}/references/skill-tracking-reference.mdUse
--skillName "AnalyzePerformance".
Constraints
- Read-only until consent. The analyzer never mutates anything. The only writes are the HTML report, the scratch JSON, and auto-fixes the user explicitly approves in Phase 4.
- High-signal findings. Heuristics (Web API N+1, missing-but-defaultable caching) are intentionally conservative to avoid false positives. When a finding is a heuristic, say so.
- Plain language. Explain a tag only when asked; lead with the impact, not the internal name.
- Offline-safe. Phase 1.5 is best-effort; the skill must complete with no network access.
References
references/performance-reference.md— authoritative rule catalog: tags, severities, detection logic, fixes, auto-fix actions, thresholds, manual-only checks, key nuances, and Microsoft Learn sources. Read when explaining a finding or deciding whether a fix is safe.
Progress Tracking Table
| Task subject | activeForm | Description |
| Verify prerequisites and locate project | Verifying prerequisites | Locate an explicit/current code-site or PAC-download folder, confirm recognizable Power Pages source, detect review mode |
| Scan codebase for anti-patterns | Scanning codebase | Run analyze-performance.js over the project, parse findings JSON |
| Present findings | Presenting findings | Show severity table and coverage stats |
| Offer auto-fixes | Applying auto-fixes | Per-finding consent loop; apply site-setting/tracking fixes, surface substitution caveat |
| Verify fixes | Verifying fixes | Re-run analyzer, confirm fixed findings are gone |
| Render report and route follow-ups | Rendering report | Build review JSON, render HTML, summarize, route manual follow-ups |
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.

