/copilot-managed-runtime:init-appfrom copilot-managed-runtime
Registers an existing web app on Copilot Managed Runtime using `ms app init` and native Git, without scaffolding over source. Use when bringing existing code, a cloned sample, or an exported app to the platform.
Ships in copilot-managed-runtime. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
📋 Shared Instructions: shared-instructions.md — Cross-cutting concerns.
References:
Package baseline: this workflow targets @microsoft/cmr-cli 1.0.0 and the CMR
1.0.0 app package baseline. Backend apps also require @microsoft/cmr-apps
1.0.0 or later. See CMR package baseline;
verify installed versions before continuing if registry tags lag behind the release.
This is the package baseline, not the version that introduced init.
This skill registers an existing web app without scaffolding over its source.
The default outcome is a running local dev server, not a deployed cloud app.
Deploying is a separate, explicit user choice via /deploy.
Check for memory-bank.md per shared-instructions.md.
Use the known project path or discover the existing app root. If CMR configuration
already exists, resume /dev or /deploy as requested; do not delete configuration
or rerun init. Inspect unfamiliar config layouts before creating another registration.
Use /create-app only when the user wants a new app from a template.
Run prerequisite checks first, following the shared prerequisites reference. Node.js 24.11.0+, Git 2.27.0+ and Git Credential Manager are required.
node --version
git --version
ms --version
If Node or Git is missing or unsupported, report the requirement and STOP.
If ms is missing, ask before installing npm install -g @microsoft/cmr-cli@latest,
then re-probe it. Otherwise run the shared
CLI freshness gate;
reuse a calling skill's outcome rather than checking or prompting again.
Let the CLI's native-flow preflight validate GCM installation and configured
helpers: it supports both manager and manager-core. Do not reject an
installation based on a single git credential-manager --version probe.
Infer the display name from existing source, package.json,
lockfiles and framework configuration. Preserve the UI, scripts, package manager
and business logic. Inspect Git root, branch, status and remotes, including hidden
entries. Ask only when the app root remains ambiguous or progress requires
information that cannot be discovered or safely inferred.
For an app inside a parent repository or linked worktree, agree on a standalone
copy before init rather than nesting repositories or changing shared remotes.
Confirm the app produces browser-hostable assets. SSR/server-dependent apps need an agreed adaptation; init does not convert them. For Power Apps or another platform's SDK/configuration, identify the necessary migration and connector bindings instead of assuming registration migrates them.
Follow the planning policy. Present one plan:
existing app root/name, native Git setup, necessary integration changes, build
verification and local dev. Use the CLI's build/local defaults unless the
existing app needs an override; do not ask for optional settings separately.
Include a /deploy handoff only if requested. Do not redesign the app.
Native platform-managed Git is the recommended path. When no origin is detected,
plain ms app init selects native. With an existing origin, omission follows
remote detection and accepts that remote in non-interactive mode. Obtain approval
to preserve the old remote under an unused name and use --repo native for this
native-rebinding case. Never discard an existing URL or change branches silently.
If native onboarding is not approved, clarify rather than choosing another mode.
ms auth status
Use auth status as the source of truth. If signed out, run ms auth login.
Ask before switching a signed-in account; otherwise continue.
Run ms app init with no environment flags and let the CLI resolve the environment
automatically. Pass --environment-id <id> only when explicitly provided by the
user; never infer one from a memory bank or another app. Surface routing errors
rather than attempting an environment workaround.
From the existing app root, run with the display name, quoted for the
active shell. Do not create a child/sibling template or substitute ms app create.
ms app init --display-name "<name>" --non-interactive
For approved native rebinding, first preserve the old remote as agreed and append
--repo native. Otherwise omit --repo when no origin is detected.
Let the CLI supply build/local defaults. Add optional build/local overrides only
when requested or needed for the existing app, not to fill every available flag.
Read ms.config.json back and verify app/environment IDs, repoType: "native",
repository ID and build/dev settings. Verify actual Git root, branch, origin
and preserved source remote: init can warn about Git setup failure after creating
the app. Preserve its automatic CLI pin in package.json.
If registration succeeded but local setup failed, keep the app/config and repair
only that setup using the returned native remote. Do not rerun init or create a
duplicate app. For first-run Git authentication failure, use git fetch origin
per the shared troubleshooting reference, then retry the failed Git operation.
Record the app identity and setup results in the memory bank.
Init does not rewrite SDK imports, configure Vite, add connectors or migrate
connection references. Make only the approved compatibility changes. For Vite
runtime integration, follow installed @microsoft/cmr-apps-vite-plugin docs and
use copilotManagedRuntime() alongside existing plugins; do not force a framework
rewrite. Add the SDK only when app features require it.
Use matching /add-* skills for required data sources and /add-backend only
when explicitly requested. Forward approved identifiers, project root and CLI
freshness outcome. Preserve migrated bindings, resolve shared-connection policies
before cloud preview/deploy, and complete backend startup prerequisites.
Restore dependencies with the existing package manager after init's manifest change. Run the existing build and verify the configured output/HTML entry point; fix or report failures before starting local dev.
Invoke /dev with the app root and CLI freshness outcome; verify the existing app
loads and required interactions work. If called from /dev, return that context
so the caller starts it once. If called from /deploy, return after verification
instead of invoking deploy recursively.
Report app name/GUID, project path, verified local App Player URL and blockers.
State that nothing has been deployed to the cloud. Follow the shared
Ready-to-Ship Gate when the user signals readiness, or resume /deploy for an
explicit deployment request, retaining its confirmation. Do not claim completion
while Git setup, build or runtime verification is blocked.
Create/update memory-bank.md per the shared template. Record app identity,
CLI-resolved environment, native and preserved source remotes, branch, build/dev
settings, integration changes and actual verification results.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub microsoft/copilot-managed-runtime --plugin copilot-managed-runtime25 skills in this plugin
/add-azuredevopsAdds Azure DevOps by delegating to `/add-data-source` with `api-id=shared_visualstudioteamservices` and action mode. Use when adding Azure DevOps integration./add-backendAdd a Fabric backend (preview) with `ms app add backend --provider fabric`. Covers database entities and client integration using the Rayfin runtime. Use only when the user explicitly requests a database, /add-backend, Fabric, or Rayfin./add-data-sourceCanonical add flow for Copilot Managed Runtime. Use when adding any data source through `ms app add data-source` (with `--as table` or `--as action`), or when the user wants help discovering which connector / api-id to use./add-dataverseAdds Microsoft Dataverse through `/add-data-source` with `api-id=shared_commondataserviceforapps`. Use for existing table bindings or Dataverse actions./add-excelAdds Excel Online (Business) by delegating to `/add-data-source` with `api-id=shared_excelonlinebusiness` and table mode. Use when binding Excel tables./add-mcscopilotAdds Microsoft Copilot Studio by delegating to `/add-data-source` with `api-id=microsoftcopilotstudio` and action mode. Use when integrating Copilot Studio agents.Other plugins' skills for the same job