Logo Power Pages

Power Pages

Cộng đồng
korchard333
power-pages

Power Pages (External Portals). Dùng khi: xây dựng cổng thông tin, vai trò web, quyền bảng, tạo mẫu Liquid, danh sách thực thể, biểu mẫu thực thể, biểu mẫu web, xác thực Microsoft Entra ID B2C, JavaScript cho portal, cài đặt trang web, đoạn nội dung.

Add to TypingMind

Tổng quan

Nhà phát hànhkorchard333
Kho mãclaude-power-platform-community
Tên kỹ năngpower-pages
Sao
50
Bản fork
6
Tệp đi kèm
18
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 18 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được korchard333 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Power Pages trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/korchard333/claude-power-platform-community/tree/main/.claude/skills/power-pages
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/korchard333/claude-power-platform-community.git /tmp/claude-power-platform-community
mkdir -p .claude/skills
cp -r /tmp/claude-power-platform-community/.claude/skills/power-pages .claude/skills/power-pages
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Power Pages trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Power Pages ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Power Pages với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Skill: Power Pages (External Portals)

When to Use

Trigger when building external-facing websites on Dataverse — customer portals, partner portals, self-service portals, community forums, or any authenticated web experience exposing Dataverse data to external users.


When to Use Power Pages vs Alternatives

ScenarioBest ChoiceWhy
External customer self-service portalPower PagesBuilt-in Dataverse integration, external auth
Internal business appModel-Driven or Canvas AppSimpler, no portal overhead
Public marketing websiteAzure Static Web Apps / WordPressPower Pages is overkill
External API for partnersCustom Connector + APIMNo UI needed
Complex custom frontend for externalsCode App + Microsoft Entra ID B2CFull React control
Simple form intake from externalsPower Pages or Microsoft FormsDepends on data destination

Architecture Overview

External User (Browser)
  │
  ├── Authentication (Microsoft Entra ID B2C, local, SAML, OAuth)
  │
  ├── Power Pages Runtime
  │   ├── Pages (HTML + Liquid templating)
  │   ├── Entity Lists (data grids)
  │   ├── Entity Forms (single-record CRUD)
  │   ├── Web Forms (multi-step wizards)
  │   ├── Web Templates (reusable Liquid components)
  │   └── Content Snippets (editable text blocks)
  │
  ├── Security Layer
  │   ├── Web Roles (external user roles)
  │   └── Table Permissions (row-level access control)
  │
  └── Dataverse (data store)
      └── Contact = portal user record

⚠️ REQUIRED: Load Sub-Files Before Implementation

SKILL.md is a summary only — it is NOT sufficient for implementation.

The detailed content (complete payloads, XML templates, working examples, edge-case handling) lives in sub-files in the same directory as this SKILL.md. Before writing any code, you MUST use read_file on the sub-files relevant to your task:

  • Web Roles & Table Permissions — Web roles, table permission scopes (Global/Contact/Account/Parent/Self), page permissions, Append/AppendTo rules
  • Liquid Templating — Variables, conditionals, loops, FetchXML in Liquid, Web API in Liquid, content snippets
  • Entity Lists, Forms & Web Forms — Entity lists (data grids), entity forms (single-record CRUD), form metadata overrides, web forms (multi-step wizards)
  • Authentication — Identity providers, Microsoft Entra ID B2C setup, Contact = User model, auth in Code Sites
  • Custom JavaScript & Portal Web API — Entity form scripts, client-side AJAX via Portal Web API, enabling Web API via site settings, Client APIs (Wave 1 2026) for Form/List/User/Web API
  • Code Sites (SPA) — Framework reference, PAC CLI workflow, Web API client pattern (anti-forgery token), service patterns, lookup rules, table permissions for Code Sites
  • Agent API — Agent API for Power Pages (March 2026), custom chat experiences backed by Copilot Studio agents, API endpoints, authentication, custom UI

Site Settings (Key Configuration)

SettingValuePurpose
Authentication/Registration/EnabledtrueAllow new user registration
Authentication/Registration/RequiresConfirmationtrueEmail verification required
Authentication/Registration/RequiresInvitationtrueInvitation-only portal
Webapi/[table]/enabledtrueEnable Web API for table
Webapi/[table]/fieldsfield1,field2Allowed fields via Web API
Search/EnabledtrueEnable global search
HTTP/X-Frame-OptionsSAMEORIGINPrevent clickjacking

CLI Site Management (Wave 1 2026)

Preview (Wave 1 2026): Create and delete Power Pages sites from the command line.

CommandDescription
pac pages create-siteCreate a new site (CI/CD automation, environment provisioning)
pac pages delete-siteDelete a site (cleanup of test/temporary sites)

ALM for Power Pages

Power Pages sites are solution-aware:
  - Site + all metadata included in solution export
  - Deploy via managed solution like any Power Platform component
  - Site Settings, Web Roles, Table Permissions travel with the solution

Per-environment configuration:
  - Authentication provider settings differ per environment
  - Use site settings + environment variables for environment-specific values
  - B2C tenant may differ between dev/test/prod

Performance

  • Enable CDN (Content Delivery Network) in portal admin for static assets
  • Enable server-side caching for entity lists and web templates
  • Use {% substitution %} blocks for content that should NOT be cached
  • Minimize FetchXML queries in Liquid — each one is a Dataverse round-trip
  • Use Portal Web API for client-side data loading (reduces server rendering)
  • Set appropriate page sizes on entity lists (don't load 100+ records)

Server Logic (Wave 1 2026)

GA (Wave 1 2026): Secure server-side custom logic in Power Pages using TypeScript/JavaScript.

Server logic enables custom server-side code execution within Power Pages — no Azure Functions required. Key capabilities:

  • TypeScript/JavaScript — familiar languages
  • pac pages CLI authoring via VS Code
  • Web role-scoped API access — endpoints respect web roles
  • Dataverse access — read/write with elevated or user-scoped permissions
ScenarioBest ChoiceWhy
Simple field validationEntity form metadataNo code needed
Complex business rules on submitServer logicSecure, server-side, no Azure dependency
External API integrationServer logic or Azure FunctionsServer logic if simple; Functions for complex orchestration
Client-side interactivityClient APIs / JavaScriptRuns in browser

Impact: Reduces the need for Azure Functions as a backend-for-frontend layer for portal-scoped business logic.


Web Application Firewall (WAF) — Preview

  • DDoS protection and bot mitigation
  • OWASP rule sets for common attack patterns
  • Configurable via Power Platform Admin Center
  • Available as a preview feature — evaluate for production readiness

Anti-Patterns

  • No table permissions defined (users see nothing — silent failure)
  • Global scope table permissions on sensitive data (everyone sees everything)
  • Using Dataverse security roles for portal access (they don't apply — use web roles + table permissions)
  • Direct DOM manipulation with jQuery when entity form metadata would suffice
  • Hardcoded record GUIDs in Liquid templates
  • Not enabling CSRF token validation on Web API calls (__RequestVerificationToken)
  • Missing HTTP/X-Frame-Options site setting (clickjacking vulnerability)
  • Authentication without email verification (spam accounts)
  • Not testing as anonymous user (unauthenticated page exposure)
  • Complex business logic in client-side JavaScript (should be in plugins or flows)
  • FetchXML queries in Liquid without top limit (unbounded queries)
  • Embedding secrets in web templates (visible in page source)
  • Using polymorphic lookups in parent-child table permissions (not supported)
  • Not associating web roles with table permissions (permissions without roles are ineffective)

Power Pages Plugin for GitHub Copilot / Claude Code

A Power Pages plugin is available (preview) that provides 9 skills for building Power Pages Code Sites from AI-assisted CLI tools:

#SkillCommandDescription
1Create site/create-siteScaffolds a site (React/Vue/Angular/Astro), applies design, builds pages
2Deploy site/deploy-siteBuilds and uploads via PAC CLI
3Activate site/activate-siteProvisions website record and assigns public URL
4Set up data model/setup-datamodelCreates Dataverse tables, columns, relationships
5Add sample data/add-sample-dataPopulates tables with realistic test records
6Integrate Web API/integrate-webapiGenerates typed API client, services, table permissions
7Set up authentication/setup-authAdds sign-in/sign-out and role-based access
8Create web roles/create-webrolesGenerates web role YAML files
9Add SEO/add-seoGenerates robots.txt, sitemap.xml, meta tags

Install from microsoft/power-platform-skills. Targets SPA (single-page application) Power Pages Code Sites.

More info: Create a code site using Claude Code


Related Skills

  • security — Web roles and table permissions for portal access
  • dataverse-web-api — Portal Web API calls to Dataverse
  • copilot-studio — Copilot Studio agents that back Power Pages chat experiences

Eval Files

The evals/ directory contains 11 evaluation test cases for Power Pages skill validation — covering site creation, authentication setup, web roles, data modeling, Web API integration, SEO, permissions auditing, deployment, and testing workflows.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Power Pages làm được gì?

Power Pages (External Portals). Dùng khi: xây dựng cổng thông tin, vai trò web, quyền bảng, tạo mẫu Liquid, danh sách thực thể, biểu mẫu thực thể, biểu mẫu web, xác thực Microsoft Entra ID B2C, JavaScript cho portal, cài đặt trang web, đoạn nội dung.

Vì sao nên dùng Power Pages trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Power Pages là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Power Pages trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/korchard333/claude-power-platform-community/tree/main/.claude/skills/power-pages. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Power Pages?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Power Pages với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Power Pages với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Power Pages có miễn phí không?

Có. Kỹ năng này được korchard333 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇