Receber por email
← Voltar para o catálogo

create-code-app

Creates Power Apps code apps using React and Vite. Use when building code apps, scaffolding projects, or deploying to Power Platform.

375estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add microsoft/power-platform-skills

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/create-code-app/svg)](https://www.skillteca.com.br/skills/create-code-app)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

📋 Shared Instructions: [shared-instructions.md](${CLAUDE_PLUGIN_ROOT}/shared/shared-instructions.md) - Cross-cutting concerns.

References:

  • [prerequisites-reference.md](./references/prerequisites-reference.md) - Prerequisites and required permissions
  • [troubleshooting.md](./references/troubleshooting.md) - Common issues, npm scripts, resources

Create Power Apps Code App

Workflow

  1. Prerequisites → 2. Gather Requirements → 3. Plan → 4. Scaffold → 5. Initialize → 6. Build & Deploy (baseline) → 7. Add Data Sources → 8. Implement App → 9. Final Build & Deploy → 10. Summary

Step 0: Check Memory Bank

Check for memory-bank.md per [shared-instructions.md](${CLAUDE_PLUGIN_ROOT}/shared/shared-instructions.md). Skip completed steps.

Step 1: Validate Prerequisites

Run prerequisite checks first -- no point gathering requirements if the environment isn't ready. See [prerequisites-reference.md](./references/prerequisites-reference.md) for details.

Check Node.js and Git (runs natively in bash):

node --version   # Must be v22+
git --version    # Optional but recommended
  • Missing Node.js: Report "Install Node.js v22+ from https://nodejs.org/" and STOP.
  • Node.js below v22: Report "Node.js 22+ is required. Please upgrade or switch with nvm use 22." and STOP.
  • Missing Git: Report "Recommended but optional." Continue if approved.
  • All present: Report versions and proceed.

Step 2: Gather Requirements

Skip questions the user already answered in their initial instruction.

If the user has not described what they want to build (i.e., /create-code-app was invoked with no arguments or a vague prompt), start with a single open-ended question before asking anything else:

"What would you like to build? Describe it in your own words — what it does, who uses it, and what problem it solves."

Wait for their answer. Use it to frame all follow-up questions. Do NOT present a multiple-choice list of app types before the user has described their idea.

Once you have their description:

  1. Confirm the app name and clarify the purpose if needed
  2. Ask about data -- focus on what the app needs to do, not specific technologies:
  3. "What data does your app need to work with?" (e.g., company emails, project tasks, custom business records)
  4. "Does your app need to search existing information, manage its own data, or both?"
  5. Based on their answers, recommend the best approach:
  6. Store and manage custom business data (tables, forms, CRUD) → Dataverse (/add-dataverse)
  7. Interact with specific services (send emails, post messages, manage files) → the appropriate connector
  8. If they mention existing Dataverse tables, SharePoint lists, or connectors by name, use those directly
  9. Ask about UI requirements: key screens, layout, interactions, theme preference
  10. Ask any clarifying questions now -- resolve all ambiguity before entering plan mode

Step 3: Plan

  1. Enter plan mode with EnterPlanMode
  2. Design the full implementation approach:
  3. Which /add-* skills to run for data sources
  4. App architecture: components, pages, state management
  5. Feature list with priority order
  6. Present plan for approval, include allowedPrompts from [prerequisites-reference.md](./references/prerequisites-reference.md)
  7. Exit plan mode with ExitPlanMode when approved

Step 4: Scaffold

Ask the user for a folder name. Default to powerapps-{app-name-slugified}-{timestamp} if they don't have a preference.

IMPORTANT: Use npx degit to download the template. Do NOT use git clone, do NOT manually create files, do NOT download from GitHub UI. degit downloads the template without git history.

npx degit microsoft/PowerAppsCodeApps/templates/vite {folder} --force
cd {folder}
npm install

Notes:

  • Use --force to overwrite if the directory already has files (e.g., .claude from a planning session)
  • If targeting an existing directory, use . as the folder name: npx degit microsoft/PowerAppsCodeApps/templates/vite . --force
  • If npx degit fails (network issues, npm not found), retry once, then ask the user to run manually

Verify: package.json exists, node_modules/ created.

Step 5: Initialize

npx power-apps init -n '{user-provided-app-name}' -e <environment-id>

Finding the environment ID: It's the GUID in the make.powerapps.com URL: https://make.powerapps.com/environments/<env-id>/home. If you don't pass -e, the CLI will prompt for it interactively.

Authentication: On first run, a browser window opens for Microsoft sign-in. Complete the login and the command continues. No separate auth setup is needed.

See [preferred-environment.md](${CLAUDE_PLUGIN_ROOT}/shared/preferred-environment.md) for environment selection details.

npx power-apps init failure:

  • Non-zero exit: Report the exact output and STOP. Do not continue to Step 6.
  • "environmentId not found" or environment validation error: Verify the environment ID is correct and the user has maker permissions in that environment, then retry.
  • Example: _"The npx power-apps init command failed: [error text]. Please check that environment ID 32a51012-... is correct and that you have maker permissions in that environment."_

Critical: Read power.config.json after init and verify environmentId is set correctly.

Step 6: Build & Deploy (baseline)

Pre-approved: This baseline deploy is part of the scaffold flow and does not require a separate confirmation prompt.

Build and deploy the bare template to verify the pipeline works before adding data sources.

npm run build

Verify dist/ folder created with index.html and assets/.

npx power-apps push

Capture app URL from output: https://apps.powerapps.com/play/e/{env-id}/app/{app-id}

Common deploy errors: See [troubleshooting.md](./references/troubleshooting.md).

Create or update memory-bank.md in the project root now -- don't wait until the end. Include:

  • Project path, app name, environment ID, app URL
  • Completed steps: scaffold, init, baseline deploy
  • Data sources planned (from Step 2)

This ensures progress is saved even if the session ends unexpectedly.

Step 7: Add Data Sources

Invoke the /add-* skills identified in the plan (Step 3). Run each in sequence. Pass context as arguments so sub-skills skip redundant questions (project path, connector name, etc.):

| App needs to... | Invoke | | ------------------------------------------ | ------------------ | | Store/manage custom business data | /add-dataverse | | Track work items, bugs, pipelines | /add-azuredevops | | Send or read Teams messages | /add-teams | | Read/write Excel spreadsheet data | /add-excel | | Upload, download, or manage files | /add-onedrive | | Work with SharePoint lists or docs | /add-sharepoint | | Send emails, read inbox, manage calendar | /add-office365 | | Invoke a Copilot Studio agent | /add-mcscopilot | | Connect to another service | /add-connector |

Each /add-* skill runs npm run build to catch errors. Do NOT deploy yet.

If no data sources needed: Skip to Step 8.

Step 8: Implement App

This is the core step. Build the actual app features described in the plan from Step 3.

  1. Review generated services: Use Grep to find methods in generated service files (they can be very large -- see [connector-reference.md](${CLAUDE_PLUGIN_ROOT}/shared/connector-reference.md#inspecting-large-generated-files)). Do NOT read entire generated files.
  2. Build components: Create React components for each screen/feature in the plan
  3. Connect data: Wire components to generated services (use *Service.getAll(), *Service.create(), etc.)
  4. Apply theme: Use
Compartilhar X LinkedIn