SkillAgentSearch skills...

add-ai-webapi

Integrates Power Pages generative-AI summarization APIs (PREVIEW) into a Single Page Application (SPA) site — the Search Summary API and the Data Summarization API — on any record-detail or list page.

Install / Use

npx skills add microsoft/power-platform-skills --skill add-ai-webapi

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

85/100

Supported Platforms

GitHub Copilot

Our assessment of add-ai-webapi

add-ai-webapi scores 85/100 on our quality scale, 2685th of 4,600 Development & Engineering skills we index.

Its SKILL.md is 50 KB long, well organised into 49 sections with 4 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.

It has 919 GitHub stars, a meaningful sign that others use it.

Substance
21/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 12 days ago, so add-ai-webapi 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.

add-ai-webapi compared with similar skills

All 4 of these similar skills score higher than add-ai-webapi; compare them before choosing.

SkillScoreStarsUpdatedFormat
add-ai-webapi (this skill)by microsoft8591912d agoSKILL.md
Agent-Reachby Panniantong10092.4k21d agoCLAUDE.md
headroomby headroomlabs-ai10074.5ktodayCLAUDE.md
ai-job-searchby MadsLorentzen10045.1k1d agoCLAUDE.md
claude-howtoby luongnv8910041.8k6d agoCLAUDE.md

Frequently asked questions

How do I install add-ai-webapi?
Run npx skills add microsoft/power-platform-skills --skill add-ai-webapi. The install tabs above show the steps for each supported agent.
Which AI agents does add-ai-webapi work with?
It is written for GitHub Copilot, as a SKILL.md file. Other agents that read the same format can often use it too.
Is add-ai-webapi safe to use?
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 add-ai-webapi still maintained?
The repository was last updated 12 days ago, so add-ai-webapi is actively maintained.

name: add-ai-webapi description: >- Integrates Power Pages generative-AI summarization APIs (PREVIEW) into a Single Page Application (SPA) site — the Search Summary API and the Data Summarization API — on any record-detail or list page. Generates per-target service code (CSRF-handled) and AI site settings; delegates Web API settings, table permissions, and web roles to /integrate-webapi and /create-webroles. Use whenever a user wants AI/Copilot output that condenses Dataverse content on a Power Pages site — an AI summary, AI-generated overview or "key insights" across a record or list, a search-results summary, a case/incident summary, or recommendation-chip refinement — even when phrased as "AI-generated paragraph", "insights", or "overview". Do NOT use for: generative pages in model-driven apps (use the model-apps genpage skill), Copilot Studio agents/chatbots, summarizing documents or PDFs, Power BI dashboards, plain keyword search with no AI summary, or plain Dataverse CRUD (use /integrate-webapi). user-invocable: true argument-hint: Optional description of which pages/tables need AI capabilities allowed-tools: Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion, Skill, Task, 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.

Add AI Web API

Note

AI summarization APIs are a preview feature. Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.

Surface this note to the user verbatim during Phase 1 and again in the Phase 8 summary — copy the exact **Note** block above (including its wording about "available before an official release so that customers can get early access and provide feedback"). Do not paraphrase it into your own "Preview-feature note: ..." sentence; the wording matches the Microsoft Learn preview disclaimer and rephrasing it loses that fidelity.

Integrate Power Pages generative-AI summarization APIs into a SPA site. This skill focuses on the AI layer (Layer 3): the summarization service code and the Summarization/* site settings. The underlying Web API prerequisites — Webapi/<table>/enabled, Webapi/<table>/fields, table permissions, and web roles — are delegated to /integrate-webapi and /create-webroles so there is a single source of truth for every layer.

The two APIs covered

| # | API | URL | Body | Response | |---|-----|-----|------|----------| | 1 | Search Summary | POST /_api/search/v1.0/summary | { userQuery } | { Summary, Citations } | | 2 | Data Summarization | POST /_api/summarization/data/v1.0/<entitySet>(<id>)?$select=...&$expand=... | { InstructionIdentifier } or { RecommendationConfig } | { Summary, Recommendations } |

Example: Microsoft-shipped Copilot summary on a support-case page. Data Summarization can be called with any combination of entity set, columns, and prompt — but Microsoft documents and ships one specific configuration for the standard incident table: POST /_api/summarization/data/v1.0/incidents(<caseId>)?$select=description,title&$expand=incident_adx_portalcomments($select=description) with body { "InstructionIdentifier": "Summarization/prompt/case_summary" }. This is sometimes called the "Case-page Copilot preset" in Microsoft Learn. Treat it as one possible Data Summarization recipe — useful when the user explicitly wants to mirror the Microsoft sample — not as an automatic recommendation. A custom case-like table (cr363_servicerequest, adx_case), or the standard incident table summarised on different facets (priority, owner, SLA timer), is just a regular Data Summarization call with maker-defined values.

Reference: ${PLUGIN_ROOT}/skills/add-ai-webapi/references/ai-api-reference.md — canonical API shapes, required headers, site-setting names, error codes, and the documented support-case example. Read this at the start of the workflow; fetch the Microsoft Learn source pages with mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch if the user asks for the latest.

Admin governance hierarchy: both APIs are gated by a three-level admin hierarchy — tenant PowerShell setting (enableGenerativeAIFeaturesForSiteUsers), Copilot Hub environment/site governance, and the site-level maker toggle (for Search Summary: Set up workspace → Copilot → Site search (preview) → Enable Site search with generative AI (preview)). Each level overrides the one below it, so "the maker toggle is on but the API still says disabled" is a real scenario — admin-level governance wins.

The two endpoints surface disablement differently:

  • Search Summary → HTTP 200 with an embedded envelope { Code: 400, Message: "Gen AI Search is disabled." }. The generated fetchSearchSummary detects this and throws SearchSummaryApiError; the UI renders a remediation card.
  • Data Summarization → HTTP 400 with error.code = 90041001 (admin-level disabled) or 90041003 (per-site Summarization/Data/Enable=false).

Full troubleshooting checklist (tenant → environment → site, plus runtime version, Bing dependency, and cross-region data movement) lives in references/ai-api-reference.md §1 "Troubleshooting: AI feature appears disabled (admin hierarchy)" — point users there when either disablement shape surfaces. Mention this governance hierarchy explicitly to the user before Phase 7, and again in the Phase 8 summary.

Built-in search control vs. custom code path: if the site uses the Microsoft-shipped Power Pages search control and only wants AI-summarised search results on that page, they don't need this skill — just the Copilot workspace toggle and the Search/Summary/Title content snippet. This skill is for sites that build their own search UI or need to call /_api/search/v1.0/summary from custom code. Confirm which path the user is on in Phase 1.

Core principles

  • Layer 3 only, delegate the rest. Web API site settings, table permissions, and web roles all belong to /integrate-webapi and /create-webroles. This skill creates the summarization service code and the Summarization/* site settings — nothing else.
  • Sequential agent spawning. Per plugins/power-pages/AGENTS.md, spawn the ai-webapi-integration agent sequentially per target (never in parallel). The first call establishes the shared summarization service file and CSRF helper; subsequent calls extend it. ai-webapi-settings-architect runs alone, after all code integrations land.
  • Raw fetch + CSRF. Every summarization request attaches __RequestVerificationToken (from /_layout/tokenhtml) and X-Requested-With: XMLHttpRequest. Never route through an OData wrapper.
  • Skip /integrate-webapi when it's not needed. If every confirmed target is Search Summary (which has no per-table Web API prerequisites), or every Layer 1/2 prerequisite already exists on disk, the skill goes straight from Phase 3 to Phase 5.
  • Use TaskCreate/TaskUpdate — create the todo list upfront with all phases before starting.

Prerequisites:

  • An existing Power Pages SPA site created via /create-site
  • A Dataverse data model (tables + columns) set up via /setup-datamodel or manually — for any Data Summarization target
  • The site must have been deployed at least once (.powerpages-site folder must exist) for the settings phase

Initial request: $ARGUMENTS


Workflow

(Phase headings below the workflow keep the technical "Layer 1+2 / Layer 3" names because they describe the runtime layering and are what maintainers grep for. The titles here mirror the user-facing task list.)

  1. Check site is ready — locate project, detect framework, check data model, deployment status, and web-role presence.
  2. Find where AI summaries fit — scan code for search / data summarization candidates.
  3. Confirm what to add — review the manifest and pick which APIs / targets to integrate.
  4. Set up data access for AI — invoke /create-webroles if needed, then invoke /integrate-webapi in AI-only read mode for data/case targets. Skip entirely for search-only or when prerequisites already exist.
  5. Add AI summary code — invoke the ai-webapi-integration agent sequentially per target.
  6. Register AI prompts — invoke the ai-webapi-settings-architect agent.
  7. Verify everything — header-contract grep, $select grep, npm run build, validator script.
  8. Review and deploy — record skill usage, summarise, offer /deploy-site.

Iteration mode (after first run)

This skill is a one-shot setup skill — Phases 1–8 run end-to-end the first time the user asks to integrate a summarization API. Once an AI surface is in place (service file, framework wrapper, UI call site, and Summarization/* settings all exist), follow-up requests to tweak the rendered UI (colours, spacing, copy, moving a button, a different empty-state message, wiring a second recommendation into the hook, etc.) are not a reason to re-enter this skill mentally and run every phase again. Doing so triggers a full pac pages upload-code-site and a chain of git commits for each tweak, which is exactly the noisy cadence the Phase 5.5 / 6.4 prompts above are there to avoid.

When the user asks for follow-up UI changes to an already-integrated AI surface:

  • Edit the file(s) and run npm run build locally to verify the tweak compiles. That is the whole validation loop for a UI change.
  • Do NOT automatically run pac pages upload-code-site. Uploading should happen once, at the end of the session, when the user has finished tweaking.
  • Do NOT automatically git commit. Let the user batch related tweaks into a single commit.
  • Batch the deployment and commit into a single end-of-session prompt once the user signals they're done (or when you've completed the last requested change).
<!-- gate: add-ai-webapi:iter.deploy-commit | category=consent | cancel-leaves=nothing -->

🚦 Gate (consent · add-ai-webapi:iter.deploy-commit): End-of-iteration batched deploy + commit prompt — avoids a noisy per-tweak upload/commit cadence.

Trigger: User signals they're done with UI tweaks for the session. Why we ask: Auto-deploying or committing after every small edit produces one git commit + one pac pages upload-code-site per tweak; batching keeps history readable and avoids redundant deploys. Cancel leaves: Nothing — source files already edited; no deploy or commit fired.

Use AskUserQuestion:

| Question | Header | Options | |----------|--------|---------| | All the UI tweaks look good. Deploy the site and commit the changes now? | Deploy & commit | Yes, deploy and commit (Recommended), Just commit — I'll deploy later, Just deploy — I'll commit later, Neither — I'll handle both myself |

Re-enter the full skill flow only when the user is adding a new AI surface (a new page, a new table, a second API). If you're unsure whether a request is a tweak or a new surface, ask.


Phase 1: Verify Site Exists

Goal: Locate the Power Pages project root and confirm prerequisites.

1.0 Detect iteration mode (before anything else)

Re-entry detection comes first because the rest of the skill assumes a first-time setup. Capture two signals about the project state:

  1. Service signal: a summarization service exists — src/services/aiSummaryService.*, or any source file under src/ that contains /_api/search/v1.0/summary or /_api/summarization/data/v1.0/. When the signa

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars919
CategoryDevelopment
Updated12d ago
Forks186

Languages

JavaScript

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions
add-ai-webapi — GitHub Copilot Skill: Install & Safety Check | SkillAgent