analyze-performance
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 cachi…
Install / Use
npx skills add microsoft/power-platform-skills --skill analyze-performanceInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of analyze-performance
analyze-performance scores 91/100 on our quality scale, 1086th of 4,651 Development & Engineering skills we index (top 24%).
Its SKILL.md is 20 KB long, well organised into 21 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
It has 919 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 33 days ago, so analyze-performance is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-27. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
analyze-performance compared with similar skills
All 4 of these similar skills score higher than analyze-performance; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| analyze-performance (this skill)by microsoft | 91 | 919 | 33d ago | SKILL.md |
| headroomby headroomlabs-ai | 100 | 78.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 104.6k | 2d ago | MCP Server |
| Scraplingby D4Vinci | 100 | 90.0k | today | MCP Server |
| crawl4aiby unclecode | 100 | 86.4k | 1d ago | MCP Server |
Frequently asked questions
- How do I install analyze-performance?
- Run
npx skills add microsoft/power-platform-skills --skill analyze-performance. The install tabs above show the steps for each supported agent. - Which AI agents does analyze-performance work with?
- It is written for Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is analyze-performance safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is analyze-performance still maintained?
- The repository was last updated 33 days ago, so analyze-performance is actively maintained.
Skill content
View source on GitHubname: analyze-performance description: >- 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". user-invocable: true argument-hint: "[optional: --review <out-dir>]" allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch model: opus
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 th
Truncated for display — read the full file on GitHub.
Related Skills
headroom
78.0kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Agent-Reach
104.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Scrapling
90.0k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
86.4kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key. Join our Discord https://discord.gg/VuxzM8mtf
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
