microsoft/power-platform-skills / plugins/power-pages/skills/create-webroles
create-webroles
VerifiedCreates and configures web roles for a Power Pages SPA 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. Also supports PAC-downloaded non-SPA sites with nested or directly opened metadata roots.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.2 KB |
| references/non-spa-site-workflow.md | markdown | 5.9 KB |
| scripts/create-web-role.js | script | 4.9 KB |
| scripts/validate-webroles.js | script | 1.6 KB |
scripts/validate-webroles.js
View on GitHub#!/usr/bin/env node
// Validates that new web role YAML files were created for an SPA or non-SPA site.
// Runs as a PostToolUse(Skill) hook to verify the skill produced output.
const fs = require('fs');
const path = require('path');
const {
approve,
block,
runValidation,
findProjectRoot,
resolvePowerPagesSiteRoot,
} = require('../../../scripts/lib/validation-helpers');
const { validateWebRoles } = require('../../../scripts/lib/web-roles-validator');
runValidation((cwd) => {
const projectRoot = findProjectRoot(cwd);
if (!projectRoot) approve(); // Not a Power Pages project
const siteRoot = resolvePowerPagesSiteRoot(projectRoot);
const webRolesDir = siteRoot && path.join(siteRoot, 'web-roles');
const aggregateWebRolesFile = siteRoot && path.join(siteRoot, 'webrole.yml');
const hasPerRecordStorage = webRolesDir && fs.existsSync(webRolesDir);
const hasAggregateStorage = aggregateWebRolesFile && fs.existsSync(aggregateWebRolesFile);
if (!hasPerRecordStorage && !hasAggregateStorage) {
approve(); // No downloaded/deployed web-role metadata — not a web roles session
}
const validation = validateWebRoles(projectRoot);
const errors = validation.findings
.filter(finding => finding.severity === 'error')
.map(finding => finding.filePath ? `${finding.message} (${path.basename(finding.filePath)})` : finding.message);
if (errors.length > 0) {
block('Web roles validation failed:\n- ' + errors.join('\n- '));
}
// The hook runs when the skill is invoked, before it necessarily creates output.
// Empty aggregate files or per-record directories therefore remain a safe no-op.
approve();
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |