A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.
Power Platform Skills - Development Guidelines
This file provides guidance to AI Agents when working with code in this repository.
What This Repo Is
A plugin marketplace for Power Platform development by Microsoft. The Open Plugins marketplace manifest (marketplace.json) references individual plugins in plugins/. Each plugin has its own AGENTS.md with plugin-specific guidance.
This Repo Is PUBLIC — keep internal detail out of it
Everything here — code, docs, commit messages, PR descriptions, and branch names — is world-readable. Write for a reader outside Microsoft who cannot see any internal system.
Do not commit:
- Internal hosts, repos or paths —
*.ghe.comlinks, internal repo names, or a path into an internal repo's doc tree. Naming one discloses its existence and its structure. - References to internal documents, including indexes into them — "spec rank 14", "Group N P1", "(resolves C2, I1)", "see the R1 review". A reader who cannot open the document gets nothing from the pointer, and it advertises the document.
- Real environment, tenant or org identifiers — Dataverse environment names/URLs, tenant GUIDs,
subscription ids. These name real infrastructure. In examples use an obvious placeholder
(
https://contoso.crm.dynamics.com,<envUrl>); to record that something was live-verified, keep the claim and drop the environment ("live-verified", not "live-verified on "). - Internal review process — who or which model reviewed something, how many rounds, internal finding ids. "Adversarially reviewed" is a useful signal; the rest is internal.
- Exploratory design docs for UNBUILT work — roadmaps, prioritisation, and candid notes on
limitations. A design doc for something that shipped is fine and often valuable (see
plugins/model-apps/docs/); a proposal for something that has not is internal. - Pointers to files that are not in the repo — a citation nobody can resolve is noise at best.
Fine to commit: ADO / AB# work-item ids (opaque, and AB# is the standard Azure Boards ↔
GitHub link syntax): they carry real "why" context and disclose no content. A vendored bundle built
from an internal repository is cited by its source commit (SDK commit <sha>), with a placeholder
such as <sdk-repo> for the repository — never by the internal repository's name or a path in it.
When you must record internal context, put it in the PR conversation or an internal doc — not in a committed file. When editing an existing doc, keep this rule in mind for the lines around your change, not just the ones you add.
CI enforcement (partial). node scripts/validate-no-real-environments.js (wired into the
validate-repository-metadata workflow) fails the build when a real Dataverse host, tenant, or
previously-removed identifier appears under plugins/model-apps/**, evals/model-apps/**, plugins/pcf/**, or evals/pcf/**. It
matches on shape — org<8 hex> is what Dataverse auto-generates, so it is rejected even though it
starts with the otherwise-allowed word org — rather than only re-catching known strings. Run it
locally after touching eval fixtures or any file that quotes an environment URL.
The scan is scoped to model-apps and pcf only, and this is a real gap rather than an oversight: other
plugins still carry pre-existing references of this class (for example real org<8 hex> orgs cited
in power-pages provenance comments), so widening the scan today would fail unrelated PRs. Scrub a
plugin first, then add it to SCAN_PATHS. The guard also cannot see the local part of a UPN, so
[email protected] passes — use a role word (maker@, tester@).
Captured pac auth list transcripts are the most common source of all three; when scrubbing one,
prefer an equal-length placeholder so the fixed-width table stays aligned.
Repository Structure
power-platform-skills/
├── marketplace.json # Open Plugins marketplace manifest (lists all available plugins)
├── .claude-plugin/ # Legacy manifest mirrors for existing subscriptions
│ └── marketplace.json
├── .agents/plugins/
│ └── marketplace.json # Codex catalog for the adapted Code Apps package only
├── plugins/ # Directory containing individual plugins
│ └── <plugin-name>/ # Individual plugin (e.g., power-pages)
│ ├── .plugin/
│ │ └── plugin.json # Plugin manifest
│ ├── .claude-plugin/
│ │ └── plugin.json # Legacy manifest mirror
│ ├── AGENTS.md # Plugin-specific development guidelines
│ ├── agents/ # Agent persona files
│ ├── commands/ # Command entry points
│ ├── shared/ # Shared resources and documentation
│ └── skills/ # Skill workflows (SKILL.md in subdirectories)
├── shared/ # Cross-plugin shared resources
│ └── skills/ # Shared skill definitions
│ └── <skill-name>/ # SKILL.template.md + workflow .md files
├── site/ # Plugin showcase site for GitHub Pages (see site/README.md)
│ └── catalog.json # Plain-language content for each marketplace plugin
├── docs/ # Developer docs moved out of the README (repository layout, installer notes)
├── AGENTS.md # Generic development guidelines (this file)
└── README.md # Repository overview, written for makers as well as developers
The README is for people who use the plugins, and its first half is for people who are not
developers: plain words, outcomes before technology, and install steps before internals. Material
for people who work on the plugins (local loading, repository layout) goes in
docs/development.md, which the README links from Contributing. The README's Telemetry section is
the short user-facing summary; field-level detail belongs in shared/telemetry/README.md and each
plugin's README. The README's install links are checked against site/lib/install-links.js, so a new
marketplace plugin also needs a site/catalog.json entry and README install links.
Keep large binaries off main. Every marketplace install clones main, and every update
downloads each new version of a file again. The site's video and poster live on the never-merged
site-media branch, pinned by hash in site/media.json (see site/README.md, "Site media"). A
site test rejects audio, video, or any file over 256 KB under site/.
Local Development
Test a plugin locally by launching your AI agent with the plugin path:
claude --plugin-dir /path/to/plugins/<plugin-name>
No root-level build, lint, or test commands exist. Build/test tooling lives inside each plugin.
CI
Only two workflows run on every PR — validate-keyword-case and validate-repository-metadata.
Both are repo-wide and enforce metadata/marketplace rules. validate-repository-metadata also
runs standalone installer regression tests on Linux and Windows.
code-apps-validation checks the portable Code Apps package on Windows and Ubuntu.
Its path filter covers Code Apps, its Codex catalog, and the compatibility validators.
Every test workflow is path-filtered — to a single plugin (power-pages → plugins/power-pages/**;
model-apps → plugins/model-apps/** + evals/model-apps/** + the shared/ sources it bundles;
pcf → plugins/pcf/** + evals/pcf/** + the model-apps/shared sources it bundles), or,
for code no plugin owns, to that code (shared-telemetry-tests → shared/telemetry/**;
showcase-site → site/** plus every input the site reads: marketplace.json, plugin manifests and
skills, evaluation sources, README.md and scripts/install.js). showcase-site also deploys the site to GitHub Pages from main.
This is deliberate — a PR should not spend CI on a plugin it never touched — but it has a corollary:
a green PR does not mean the repo is green, only that the paths you touched are. A plugin that ships
copies of shared/ sources may list those sources too, so a change to one runs that plugin's drift
test in the PR that made it rather than in the plugin's next, unrelated PR.
A test suite with no workflow silently never runs. When you add tests to a plugin, add or extend that plugin's own path-filtered workflow in the same PR; do not widen another plugin's filter to cover yours.
A plugin that has adopted telemetry must also set its opt-out env var on any job that could execute a
telemetry-emitting hook or script (see ## Shared Telemetry) — e.g.
POWER_PLATFORM_SKILLS_TELEMETRY_MODEL_APPS_OPTOUT: "1". It suppresses transmission only, so it
cannot change what a test asserts.
Skill evaluations
When changing Power Pages evaluation cases, graders, isolation or published evidence, read evals/README.md.
power-pages-eval-validation runs deterministic checks across Linux, Windows and macOS.
Paid power-pages-evals measurements are default-branch manual dispatches using native Copilot Actions authentication; they are report-only, offline, and never connect to a Power Pages environment.
The showcase dashboard consumes sanitized summaries and marks source mismatches or missing evidence explicitly.
Plugin Conventions
When a plugin copies code from another plugin, add it to the COPY_SETS in scripts/validate-plugin-copies.js. That validator runs on every PR and in both affected plugins' suites, so a source-side or copy-side edit fails until the bundled copy is refreshed.
Each plugin follows this structure:
.plugin/plugin.json— Open Plugins metadata (name, version, keywords).claude-plugin/plugin.json— legacy mirror of.plugin/plugin.jsonkept for existing subscriptions.mcp.json— MCP server configuration (optional)plugin.jsonandmcp.json— optional additive Agent Plugins 1.0.0 files at the individual plugin root (currentlyprocess-intelligenceandcode-appsuseplugin.json); retain the legacy files aboveagents/— Agent definitions (.mdfiles with YAML frontmatter)skills/— Skill definitions, each in its own subdirectory with aSKILL.mdscripts/— Shared utility scripts referenced by skills and agentsreferences/— Shared reference documents used by multiple skills
Skills are defined in SKILL.md files with YAML frontmatter (name, description, allowed-tools, model, hooks). The allowed-tools field must use a comma-separated list (e.g., allowed-tools: Read, Write, Edit, Bash, Glob, Grep) — not JSON array syntax (["Read", "Write"]) or YAML list syntax. Each skill may include a validation script in a scripts/ subdirectory (the first validate*.js, discovered automatically). It is run by the plugin's PostToolUse hook on the Skill tool — hooks/run-skill-posttool-validation.js looks the script up and executes it after the Skill tool returns, propagating its exit code. Note this fires when the skill is invoked, not when its work finishes, so a validator must no-op (approve) when the artifacts it checks are not present yet.
Cross-Plugin Shared Skills
Skills that apply to all plugins live in shared/skills/<skill-name>/. The workflow logic is written once in a shared .md file, and each plugin has a thin skills/<skill-name>/SKILL.md that contains only the YAML frontmatter and a reference to the workflow path bundled inside that plugin at install time.
Pattern:
shared/skills/<skill-name>/<workflow>.md— Full workflow (phases, instructions, field definitions)shared/skills/<skill-name>/SKILL.template.md— Template SKILL.md (frontmatter + reference to workflow); supports{{PLUGIN_NAME}}placeholderplugins/<plugin>/skills/<skill-name>/SKILL.md— Per-plugin wrapper generated from the template aboveplugins/<plugin>/skills/<skill-name>/<workflow>.md— Copied workflow file bundled with the plugin so it works after installing only its own plugin directory
This keeps the skill discoverable in each plugin while preserving install-time portability. Marketplace installs copy only the plugin directory, so per-plugin wrappers must not reference repo-root shared/ paths at runtime. Instead, point the wrapper at ${PLUGIN_ROOT}/skills/<skill-name>/<workflow>.md and keep a physical copy of the shared workflow at that per-plugin path. Do not use Git symlinks for shared content; Windows and plugin-host installs can materialize them as plain link files. When updating a shared skill, edit the workflow file and/or SKILL.template.md in shared/, then refresh the per-plugin wrappers (frontmatter + bundled workflow reference, with {{PLUGIN_NAME}} substituted) and copy the workflow content into each adopting plugin. Commit the shared source and per-plugin copies together.
Shared Telemetry
1DS telemetry code for all plugins lives at shared/telemetry/. Each adopting plugin keeps a physical copy of the library in its own tree at plugins/<plugin>/scripts/lib/telemetry/lib, alongside that plugin's real ikey.json. Do not use Git symlinks for this copy; plugin hosts may not dereference them reliably.
Edit shared/telemetry/ first, then refresh every adopting plugin's copied scripts/lib/telemetry/lib directory in the same change so the canonical source and bundled plugin content stay in sync.
eventInfo is a dynamic escape hatch whose nested keys are not enforced by FIELD_TYPES. Follow the approved schema in shared/telemetry/README.md; do not add nested fields or arbitrary payloads without privacy review and coordinated disclosure, schema, and test updates.
Never reuse another plugin's instrumentation key or event stream. The sole sanctioned key-sharing exception is model-apps + pcf: the same team owns both plugins and their 1DS tenant, and PCF ships a byte-identical copy of model-apps' ikey.json, enforced by scripts/validate-plugin-copies.js. Both use the Power Apps client event shape, with rows separated by clientType/pluginName. For every other adopter, copy only the routing-agnostic library (shared/telemetry/lib → plugins/<plugin>/scripts/lib/telemetry/lib) — do not copy an existing adopter's real ikey.json (or its resolver.js). Each plugin's ikey.json carries its instrumentation key(s), collector routing, and event_stream_name; start from the placeholder shared/telemetry/ikey.json (every region key is PLACEHOLDER_REPLACE_BEFORE_SHIPPING and it ships disabled: true) and provision a fresh, plugin-specific key before shipping. Copying another adopter's key outside the sanctioned pair mis-attributes events and pollutes its stream.
This invariant is CI-enforced: node scripts/validate-telemetry-ikeys.js (wired into the validate-repository-metadata workflow) scans every plugins/*/**/ikey.json and ignores placeholder/empty values. A shared key is allowed only when all its plugin owners belong to one SHARED_KEY_GROUPS entry, currently exactly model-apps + pcf; any outsider still fails, even if both group members own the key. Adding a group is a deliberate, reviewed change. The copy check also enforces byte-identical configs, so a model-apps key rotation must refresh pcf in the same PR. A single plugin reusing one key across regions is allowed. The independent stream-name exemption remains event: it is the shared Power Apps client telemetry table, so several plugins may send to it, provided each makes its rows separable with its own clientType and pluginName in customDimensions. Every other cross-plugin stream-name reuse fails. Run both validators locally after touching either shared config.
Per-plugin iKey/collector routing is pluggable via a resolver.js placed next to the plugin's ikey.json (implementing the resolve/isProvisioned contract); the shared library ships only that contract plus a static-key fallback, not any routing logic. A per-plugin opt-out env var POWER_PLATFORM_SKILLS_TELEMETRY_<PLUGIN>_OPTOUT (derived as the uppercased plugin name with non-alphanumerics collapsed to _, suffixed _OPTOUT; the name is the manifest's name, not the directory — plugins/mobile-apps is mobile-app, so its variable ends _MOBILE_APP_OPTOUT) disables transmission for automation when set to 1/true (dotnet *_TELEMETRY_OPTOUT convention); it has the highest precedence, overriding both the persisted config.json choice and /<plugin>:telemetry on.
CI must opt out of telemetry transmission
A transmitting adopter's committed ikey.json ships enabled (disabled: false) with a real production instrumentation key, so any process that runs a telemetry-emitting hook or script without isolating emission will POST a real (but fake-in-content) event to the production collector. CI runs are not real usage, and such events pollute the production telemetry stream.
Therefore: every GitHub Actions job that runs the test suite — or any step that could execute a telemetry-emitting hook/script for an adopting plugin — MUST set the plugin's opt-out env var at the job (or workflow) level. For power-pages:
jobs:
<job-name>:
runs-on: <runner>
env:
POWER_PLATFORM_SKILLS_TELEMETRY_POWER_PAGES_OPTOUT: "1"
steps: ...
This opt-out suppresses transmission only (the local diagnostic mirror is still written), so it is safe and has no effect on what the job actually tests. Tests that need to assert that emission happens clear the var in their own spawned-process env and route the event to a local POWER_PLATFORM_SKILLS_FAKE_HTTPS probe instead of the real collector — so the job-level opt-out never breaks them. Existing reference: .github/workflows/power-pages-script-tests.yml. When you add a new such workflow (or a new emitting step to an existing one), add this env var in the same change; treat a CI job that runs the tests without it as a production-telemetry leak.
Current adopters: power-pages, mobile-apps, model-apps, pcf, power-automate, and power-apps-mobile-extension (all transmitting; pcf shares model-apps' tenant). Others adopt on demand. The library's own tests (shared/telemetry/tests) run in .github/workflows/shared-telemetry-tests.yml on a change to the source or to any bundled copy, and its bundled-copies.test.js fails when any adopter's plugins/<plugin>/scripts/lib/telemetry/lib differs from shared/telemetry/lib. The workflow sets every adopter's opt-out — add a new adopter's variable there too. power-pages and model-apps also keep a scripts/tests/telemetry-lib-copy.test.js that runs the same comparison in their own suites (model-apps also checks its shared skill copies, and lists shared/telemetry/** in its workflow's path filter so a source edit runs it too).
Legacy Marketplace Compatibility
Keep the root .claude-plugin/marketplace.json and each plugin's
.claude-plugin/plugin.json as JSON mirrors of their Open Plugins counterparts.
The shared root marketplace must stay dual-compatible while keeping per-plugin
entries minimal: each plugin entry should include only the required name and
repository-root-relative source fields. Keep marketplace-level owner and
metadata because they describe the collection, but store per-plugin display/update
metadata (description, version, license, keywords, etc.) in each .plugin/plugin.json
instead of duplicating or overriding it in the marketplace index. Existing marketplace
subscriptions may still resolve the legacy paths during auto-update, so removing or
drifting these files can force users to reinstall. Because mirrors are committed
files (not symlinks), update both source and legacy copies together, then run
node scripts/validate-legacy-compatibility.js after metadata changes.
Plugins adopting Agent Plugins 1.0.0 also keep root plugin.json metadata synchronized with
the legacy manifests' common fields, excluding $schema. Their root mcp.json uses the matching
canonical schema and explicit transport type while preserving the legacy launcher. Both formats
share skills/runtime files. A recognized portable root manifest takes precedence; clients do not
merge the two component sets. Do not migrate siblings or remove legacy mirrors merely because
one plugin adopts the portable format.
External plugins
A plugin maintained in another repository (today dataverse, from microsoft/Dataverse-skills) is listed with a remote source object instead of a ./plugins/<name> path.
Its metadata and legacy mirrors live in that repository, so nothing for it is committed under plugins/.
This is the one place where the two marketplace files intentionally differ, because each host reads a different file and spells a subdirectory source differently:
marketplace.json(read by Copilot CLI):{ "source": "github", "repo": "owner/repo", "path": "sub/dir" }. Copilot CLI rejectsgit-subdirand then refuses the whole marketplace, breaking every plugin in it..claude-plugin/marketplace.json(read by Claude Code):{ "source": "git-subdir", "url": "owner/repo", "path": "sub/dir" }. Claude Code'sgithubsource ignorespath, installs the repository root, and loads no skills while still reporting success.
Carry any ref or sha pin into both entries.
The validator enforces the pairing, and scripts/tests/validate-legacy-compatibility.test.js covers it.
After adding or changing an external entry, install it from a local checkout in both hosts (copilot plugin marketplace add <checkout> and claude plugin marketplace add <checkout>) and confirm its skills load.
Code Conventions
DRY (Don't Repeat Yourself): Never duplicate logic across files. Each plugin has shared utilities (e.g., scripts/lib/) and shared reference docs (e.g., references/). Always check for and reuse existing helpers before writing new code. When adding shared logic, put it in the plugin's shared modules — not in individual skill directories.
Code comments
Most code in this repo is Node.js scripts and hooks that shell out to pac/az, call the Dataverse and Power Platform APIs, and parse loosely structured CLI output. The reasoning behind a line is rarely obvious from the line alone, so comments matter.
- Err on the side of over-commenting code when the reasoning is not obvious. Comments should explain WHY code is written a particular way; the WHY is the most important part.
- Do comment non-obvious implementation details: concurrency hazards, lifecycle constraints, compatibility requirements, platform quirks, upstream PAC CLI / Dataverse workarounds, and intentional deviations from the obvious helper or API.
- When parsing strings, logs, CLI output, OData payloads, or other loosely structured data, include a comment with an example of the raw format being parsed. Show edge cases, escaping rules, delimiters, optional fields, or malformed-but-observed inputs when they affect the parser.
- When code follows an external standard, protocol, or Power Platform convention (Dataverse status codes, OData error shapes, telemetry field contracts), include valid links to the relevant Microsoft Learn or specification source so future readers can verify the rule and understand why the code follows it.
- When code touches telemetry, auth tokens, or anything privacy/security-sensitive, explain the scope, the opt-in/fail-closed behavior, and why — not just what it does.
- Do not add comments that simply narrate clear code, such as "set the interval" immediately before assigning an interval.
- Keep workaround comments close to the workaround. Include an issue link when the workaround is tied to an upstream bug, and describe the condition for removing it when that is known.
Good comments explain the constraint or tradeoff:
// `pac auth who` cold-starts the .NET runtime (~4s on Windows), so cache the parsed
// result per process — repeated hook invocations must only fork the CLI once.
let cachedAuth;
// Refresh the bearer token roughly every 60s instead of on every poll. A long solution
// export outlives the token's lifetime, but refreshing each 5s cycle would hammer the
// az CLI for no benefit.
const tokenRefreshEvery = Math.max(1, Math.floor(60000 / intervalMs));
// Telemetry must never break the hook it runs inside, so this is fail-closed: a missing
// executable, a timeout, or an unparseable banner all resolve to null rather than throw.
return null;
// Allowlist-only scrubbing: the event spec already restricts payload fields to values
// that cannot carry PII, so this is a documented seam for a future regex pass — not a
// no-op left unfinished by mistake.
function scrub(value) {
return value;
}
Code that follows an external standard or convention should link the source:
// Dataverse asyncoperations terminal states: statecode 3 (Completed) with statuscode 30
// (Succeeded) means done; 31 (Failed) and 32 (Canceled) are the failure terminals.
// See: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/reference/entities/asyncoperation
if (statecode === 3 && statuscode === 30) {
return { status: 'Succeeded' };
}
Keep workaround comments next to the workaround and link the tracking issue:
// Workaround: `pac solution export` can exit 0 while the Dataverse async job is still
// running, so ignore the exit code and poll asyncoperations to a terminal state instead.
// Remove once the CLI blocks on the job result.
// Tracking: https://github.com/microsoft/power-platform-skills/issues/1234 (use the real issue)
const status = await pollAsyncOperation(asyncJobId, envUrl, token);
Parsing comments should show the raw shape and important edge cases:
// Parse the `pac auth who` banner, a label/value block, e.g.:
// Authority: https://login.microsoftonline.com/<tenant>
// Tenant ID: 00000000-0000-0000-0000-000000000000
// User: [email protected]
// Values can themselves contain ':' (URLs), so match only up to the first colon after
// the label, then trim. The JSON profile files are intentionally NOT parsed — that
// format is internal and varies across PAC CLI versions.
// `label` is a fixed, code-controlled string (e.g. 'Tenant ID'), so it is safe to
// interpolate into the pattern. If a label ever comes from untrusted input, escape it
// first to avoid regex injection.
const re = new RegExp('^\\s*' + label + '\\s*:\\s*(\\S.*?)\\s*$', 'im');
// Dataverse OData errors arrive as:
// { "error": { "code": "0x80040217", "message": "..." } }
// but some PAC surfaces capitalize the envelope as "Error", so check both before
// falling back to plain-text pattern matching.
const odataError = parsed.error || parsed.Error;
Avoid comments that restate the code:
// Set the interval to five seconds.
const intervalMs = 5000;
// Loop over the findings.
for (const finding of findings) {
report(finding);
}
Maintaining This File
When you add new plugins or change the repository-level structure, update this file. For plugin-specific changes, update the plugin's own AGENTS.md (e.g., plugins/power-pages/AGENTS.md).