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.
JavaScript claude-code-pluginclaude-code-skillscode-appsgithub-copilot-pluginpower-appspower-pagespower-platform
Revert "Add hook to Canvas plugin to encourage using the sync tool on every t…" (#327)
McCall Saltzman384363f8c897
diff --git a/plugins/canvas-apps/.claude-plugin/plugin.json b/plugins/canvas-apps/.claude-plugin/plugin.jsonindex 260060c85..adedd4c4a 100644--- a/plugins/canvas-apps/.claude-plugin/plugin.json+++ b/plugins/canvas-apps/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "canvas-apps",- "version": "2.2.0",+ "version": "2.1.1","description": "Build Power Apps Canvas Apps using the Canvas Authoring MCP server.","author": {"name": "Microsoft",@@ -9,7 +9,6 @@"homepage": "https://github.com/microsoft/power-platform-skills/","repository": "https://github.com/microsoft/power-platform-skills/","license": "MIT",- "hooks": "hooks/hooks.json","keywords": ["canvas-apps","power-apps",diff --git a/plugins/canvas-apps/.plugin/plugin.json b/plugins/canvas-apps/.plugin/plugin.jsonindex 260060c85..adedd4c4a 100644--- a/plugins/canvas-apps/.plugin/plugin.json+++ b/plugins/canvas-apps/.plugin/plugin.json@@ -1,6 +1,6 @@{"name": "canvas-apps",- "version": "2.2.0",+ "version": "2.1.1","description": "Build Power Apps Canvas Apps using the Canvas Authoring MCP server.","author": {"name": "Microsoft",@@ -9,7 +9,6 @@"homepage": "https://github.com/microsoft/power-platform-skills/","repository": "https://github.com/microsoft/power-platform-skills/","license": "MIT",- "hooks": "hooks/hooks.json","keywords": ["canvas-apps","power-apps",diff --git a/plugins/canvas-apps/AGENTS.md b/plugins/canvas-apps/AGENTS.mdindex aa59874d6..3494b7e70 100644--- a/plugins/canvas-apps/AGENTS.md+++ b/plugins/canvas-apps/AGENTS.md@@ -19,13 +19,10 @@ claude --plugin-dir /path/to/plugins/canvas-apps## Architecture```-.plugin/plugin.json ← Open Plugins metadata and Copilot hook path+.plugin/plugin.json ← Open Plugins metadata (name, version, keywords).mcp.json ← MCP server config (canvas-authoring, auto-registered)AGENTS.md ← Plugin guidance for AI agents (this file)CLAUDE.md ← Symlink → AGENTS.md-hooks/- hooks.json ← Claude and Copilot prompt hook registration- inject-sync-reminder.cs ← File-based .NET app that injects a cross-host sync reminderreferences/TechnicalGuide.md ← YAML syntax, control selection, layout strategies, Power Fx patternsDesignGuide.md ← Aesthetic guidelines, anti-patterns, design process@@ -78,20 +75,6 @@ The `canvas-authoring` MCP server exposes the following tools:| `list_data_sources` | Lists all available data sources in the current authoring session || `sync_canvas` | Syncs the current coauthoring session state from the server to a local directory, writing all YAML files |-## Hooks--Hook registration is centralized in `hooks/hooks.json`. It registers Claude Code's-`UserPromptSubmit` event and Copilot's `userPromptTransformed` event. Both invoke the-file-based .NET app at `hooks/inject-sync-reminder.cs` with `dotnet run --file`; the app-emits `modifiedTransformedPrompt` for Copilot and-`hookSpecificOutput.additionalContext` for Claude Code. This avoids requiring Node.js at-plugin runtime. Both paths remind the agent to call `sync_canvas` (targeting the app's-working directory) before acting, so it never edits stale local `.pa.yaml` files. The-reminder is conditional in wording — the agent skips the sync when no coauthoring session-is active or the request is unrelated to a canvas app. Keep the Copilot event name-lowercase: Copilot ignores the PascalCase variant, while Claude Code ignores the-Copilot-only event and continues loading `UserPromptSubmit`.-## PrerequisitesBefore the MCP server will start, you need:diff --git a/plugins/canvas-apps/hooks/hooks.json b/plugins/canvas-apps/hooks/hooks.jsondeleted file mode 100644index eeb662aaa..000000000--- a/plugins/canvas-apps/hooks/hooks.json+++ /dev/null@@ -1,27 +0,0 @@-{- "description": "Canvas Apps lifecycle hooks",- "hooks": {- "UserPromptSubmit": [- {- "hooks": [- {- "type": "command",- "command": "dotnet run --file \"${CLAUDE_PLUGIN_ROOT}/hooks/inject-sync-reminder.cs\"",- "timeout": 30- }- ]- }- ],- "userPromptTransformed": [- {- "hooks": [- {- "type": "command",- "command": "dotnet run --file \"${PLUGIN_ROOT}/hooks/inject-sync-reminder.cs\"",- "timeout": 30- }- ]- }- ]- }-}diff --git a/plugins/canvas-apps/hooks/inject-sync-reminder.cs b/plugins/canvas-apps/hooks/inject-sync-reminder.csdeleted file mode 100644index 33e2fbf27..000000000--- a/plugins/canvas-apps/hooks/inject-sync-reminder.cs+++ /dev/null@@ -1,63 +0,0 @@-#:property PublishAot=false--using System.Text.Json;--// Prompt hook for the canvas-apps plugin.-//-// The hook injects guidance instead of calling sync_canvas directly because it only-// receives the session cwd, not the per-app working directory. A blanket sync could-// overwrite the wrong directory or clobber local edits that have not been pushed.-const string Reminder =- "Canvas Apps coauthoring reminder: " +- "Before acting on this request, if a Canvas Authoring session is " +- "active (i.e. `connect` has already been called for a canvas app), first call " +- "the `sync_canvas` MCP tool targeting the app's working directory to pull the " +- "current session state into the local .pa.yaml files. This avoids editing stale " +- "YAML. If no coauthoring session is active yet, or this request is unrelated to " +- "a canvas app, skip the sync.";--try-{- var rawInput = await Console.In.ReadToEndAsync();- string? transformedPrompt = null;-- try- {- using var input = JsonDocument.Parse(rawInput);- if (input.RootElement.ValueKind == JsonValueKind.Object &&- input.RootElement.TryGetProperty("transformedPrompt", out var prompt) &&- prompt.ValueKind == JsonValueKind.String)- {- transformedPrompt = prompt.GetString();- }- }- catch (JsonException)- {- // Hook failures must not block the user's prompt. If parsing fails, emit the- // Claude Code additional-context shape (Copilot will ignore it).- }-- using var writer = new Utf8JsonWriter(Console.OpenStandardOutput());- writer.WriteStartObject();-- if (transformedPrompt is not null)- {- writer.WriteString(- "modifiedTransformedPrompt",- $"{transformedPrompt}\n\n{Reminder}");- }- else- {- writer.WriteStartObject("hookSpecificOutput");- writer.WriteString("hookEventName", "UserPromptSubmit");- writer.WriteString("additionalContext", Reminder);- writer.WriteEndObject();- }-- writer.WriteEndObject();- writer.Flush();-}-catch-{- // Hooks are advisory and must never prevent the host from processing a prompt.-}diff --git a/plugins/canvas-apps/skills/generate-canvas-app/SKILL.md b/plugins/canvas-apps/skills/generate-canvas-app/SKILL.mdnew file mode 100644index 000000000..62ccaeaca--- /dev/null+++ b/plugins/canvas-apps/skills/generate-canvas-app/SKILL.md@@ -0,0 +1,16 @@+---+name: generate-canvas-app+version: 2.0.0+description: "[DEPRECATED — use canvas-app instead] Generate a complete Power Apps canvas app."+author: Microsoft Corporation+user-invocable: true+allowed-tools: Read+---++# ⚠️ Deprecated — Use `canvas-app`++This skill has been replaced by the unified **`canvas-app`** skill, which handles both+creating and editing canvas apps.++Please use `/canvas-app` instead. It will automatically detect that the app is empty and+run the full generation workflow.