为 Power Pages 编写、配置并部署安全的服务器端逻辑与接口。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "add-server-logic" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/power-platform-skills/main/plugins/power-pages/skills/add-server-logic/SKILL.md 2. 保存为 ~/.claude/skills/add-server-logic/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为我的 Power Pages 站点创建一个服务器端 Logic 文件,提供 POST /api/contact-submit 接口。它要校验姓名、邮箱和留言内容,过滤明显恶意输入,把数据写入 Dataverse 的 Contact Requests 表,并返回统一的 JSON 成功或失败响应。请同时说明需要的站点设置和部署步骤。
可直接部署的服务器端 JavaScript、所需配置项说明,以及接口行为与返回格式说明。
我现在在浏览器里调用外部价格计算服务并暴露了密钥,请帮我把这段逻辑迁移到 Power Pages Server Logic。要求:由服务端安全调用外部 API,前端只传产品 ID 和数量;服务端返回最终价格、折扣和错误信息。请重构代码并列出前后端改动点。
迁移后的服务端实现方案、前端调用方式调整建议,以及更安全的架构说明。
请检查我现有的 Power Pages Server Logic 文件,找出为什么在提交表单后会偶发 500 错误。请分析输入校验、异步调用、异常处理和日志记录是否有问题,并给出修复后的完整代码。如果需要,也请补充推荐的站点设置。
问题定位结果、修复后的完整代码,以及提升稳定性的配置与排错建议。
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.
…
帮助你为当前协作会话配置 Canvas Authoring MCP 服务器并排查连接问题
帮助用户将 canvas-apps 插件问题整理并提交为规范的 GitHub issue。
为 Power Apps 代码应用接入 Azure DevOps 连接器,便于查询工单、提报缺陷与管理流水线。
帮助你为 Power Apps 代码应用添加数据源或连接器,并引导到合适操作流程。
为 Power Apps 代码应用快速接入任意 Power Platform 连接器。
为 Power Apps 代码应用添加 Excel Online 连接器,便于读写 OneDrive 或 SharePoint 中的表格数据。
为 Power Pages 代码站点补齐 SEO 基础配置,提升搜索可见性与分享展示效果。
分析业务需求并推荐 Power Pages 最合适的后端集成方案与实施路径。
帮助你将 Power Pages Web API 集成到前端,并完成权限配置与部署上线。
帮助你从需求梳理到部署上线,快速创建全新的 Power Pages 代码网站。
将现有 Power Pages 代码站点构建并部署到目标环境,完成认证与上传流程。
帮助你将 Power Automate 云端流程接入 Power Pages 站点并生成调用代码