Build, configure, and deploy secure server-side logic for Power Pages.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "add-server-logic" skill from askskill: 1. Download https://raw.githubusercontent.com/microsoft/power-platform-skills/main/plugins/power-pages/skills/add-server-logic/SKILL.md 2. Save it as ~/.claude/skills/add-server-logic/SKILL.md 3. Reload skills and tell me it's ready
Create a Power Pages Server Logic file for my site that exposes a POST /api/contact-submit endpoint. It should validate name, email, and message fields, filter obviously malicious input, write the data to a Dataverse Contact Requests table, and return a consistent JSON success or error response. Also explain the required site settings and deployment steps.
Deployable server-side JavaScript, required configuration details, and a description of endpoint behavior and response formats.
I currently call an external pricing service in the browser and expose the API key. Help me move this logic into Power Pages Server Logic. Requirements: the server should securely call the external API, while the frontend only sends product ID and quantity; the server should return final price, discount, and error information. Please refactor the code and list the required frontend and backend changes.
A server-side implementation plan, updated frontend integration guidance, and a safer architecture explanation.
Review my existing Power Pages Server Logic file and find out why it intermittently returns a 500 error after form submission. Analyze whether there are issues with input validation, async calls, error handling, and logging, then provide the corrected full code. If needed, also include recommended site settings.
Root-cause findings, corrected full code, and configuration and debugging recommendations to improve reliability.
Plugin check: Run
node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Create and manage one or more Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime, hidden from the browser and protected by web roles and table permissions. Server Logic enables secure external API integrations, Dataverse operations, and custom business logic without exposing sensitive code or credentials to the client.
fetch, XMLHttpRequest, setTimeout, or any DOM API. No npm packages are available.get, post, put, patch, del. The name delete is a reserved word in JavaScript and cannot be used.JSON.stringify() when returning objects or arrays.Prerequisites:
- An existing Power Pages code site created
- The site must be deployed at least once (
.powerpages-sitefolder must exist) — server logic files live inside.powerpages-site/server-logic/, so deployment is required before any server logic can be created
Initial request: $ARGUMENTS
.js and .serverlogic.yml files in .powerpages-site/server-logic/<name>/Goal: Locate the Power Pages project root and confirm prerequisites
Actions:
Look for powerpages.config.json in the current directory or immediate subdirectories
If not found: Tell the user to create a site first with /create-site.
Read powerpages.config.json to get the site name and configuration:
Read package.json to determine the frontend framework (React, Vue, Angular, or Astro). This is needed for Phase 8 (client-side integration guidance). See ${CLAUDE_PLUGIN_ROOT}/references/framework-conventions.md for the full framework detection mapping.
…
Review and fix Power Pages security headers, CSP, CORS, cookies, and embedding settings.
Run an end-to-end Power Pages security review with a consolidated HTML report.
Test deployed Power Pages sites with browsing, crawling, and API verification.
Add a data source or connector to a Power Apps code app.
Add Azure DevOps to Power Apps for work items, bugs, pipelines, and API calls.
Set up Power Platform Pipelines for automated Power Pages deployments.
Add essential SEO settings to Power Pages sites for better visibility and sharing.
Analyzes needs and recommends the best backend integration path for Power Pages.
Integrate Power Pages Web API into frontend with permissions and deployment.
Create and launch a new Power Pages code site from concept to deployment.
Build and deploy an existing Power Pages code site to a target environment.
Integrate Power Automate cloud flows into Power Pages with generated metadata and code.