Creates and configures web roles for a Power Pages code site. Web roles control access and permissions for site users, including authenticated and anonymous roles. Use when the user wants to create, add, set up, or manage web roles for their site.
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "create-webroles" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/power-platform-skills/main/plugins/power-pages/skills/create-webroles/SKILL.md 2. 保存为 ~/.claude/skills/create-webroles/SKILL.md 3. 装好后重载技能,告诉我可以用了
Plugin check: Run
node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Create web roles for a Power Pages code site. Web roles define the permissions and access levels for different types of site users.
${CLAUDE_PLUGIN_ROOT}/scripts/generate-uuid.js to produce valid UUID v4 values for each web role.anonymoususersrole: true and only one can have authenticatedusersrole: true. Always check existing roles before setting these flags.Prerequisite: The site must be deployed at least once before web roles can be created, since deployment creates the
.powerpages-sitefolder structure that stores web role definitions.
Initial request: $ARGUMENTS
.powerpages-site/web-roles/ directoryGoal: Confirm the .powerpages-site/web-roles/ directory exists and is ready for web role files
Actions:
Locate the project root (**/powerpages.config.json) and check for .powerpages-site/web-roles/.
If .powerpages-site does NOT exist: Ask the user to deploy first via AskUserQuestion (options: "Yes, deploy now (Recommended)", "No, I'll do it later"). If yes, invoke /deploy-site then resume from Phase 2. If no, stop.
If .powerpages-site exists but web-roles/ does NOT: Create the <PROJECT_ROOT>/.powerpages-site/web-roles/ directory.
If both exist: Proceed to Phase 2.
Output: Confirmed .powerpages-site/web-roles/ directory exists and is ready
Goal: Identify all web roles already defined for the site
Actions:
Read all YAML files in the .powerpages-site/web-roles/ directory. Each file represents one web role with this format:
anonymoususersrole: false
authenticatedusersrole: false
id: 778fa3d0-a2ef-4d2b-98b8-e6c7d8ce1444
name: Administrators
Parse each file and compile a list of existing web roles (name, id, and flags).
Present the existing roles to the user:
"I found the following existing web roles in your site:"
- Administrators (id:
778fa3d0-..., authenticated: false, anonymous: false)- (etc.)
If no roles exist yet, inform the user:
"No web roles are currently defined for your site."
Output: Complete list of existing web roles with their names, IDs, and flags
Goal: Decide which new web roles to create based on site needs and user input
Actions:
Based on the site's purpose and the existing roles, suggest appropriate web roles. Use AskUserQuestion to confirm with the user.
Common web roles for Power Pages sites include:
authenticatedusersrole: true)anonymoususersrole: true)…
检查并配置 Power Pages 站点安全响应头,定位风险并指导修复设置。
对 Power Pages 站点执行端到端安全审查,并汇总生成完整 HTML 报告。
用于对已部署的 Power Pages 网站进行运行时浏览、爬取与接口验证测试。
帮助你为 Power Apps 代码应用添加数据源或连接器,并引导到合适操作流程。
为 Power Apps 代码应用接入 Azure DevOps 连接器,便于查询工单、提报缺陷与管理流水线。
帮助你快速搭建 Power Platform 管道,实现 Power Pages 自动化部署。