The DCP Generate Skill is an AI skill package that teaches coding assistants — Claude Code, GitHub Copilot, Cursor, and any MCP-compatible tool — how to generate complete, working DocumentsCorePack document generation code. No placeholders, no API documentation to read, no trial and error.
The skill supports five Power Platform targets — Power Apps Code Apps, Generative Pages, PCF components, model-driven web resources, and Canvas apps — and ships in variants for Claude Code, GitHub Copilot, Cursor, and any other AI tool.
This article walks through what we showed in the webinar: using the skill in Claude Code inside VS Code to add document generation to two of those targets:
- A Generative Page in a model-driven app
- A Power Apps Code App
The same workflow applies to the other three targets.
What the skill does for you:
- Checks prerequisites automatically — detects your Power Platform environment, verifies DCP is installed, and binds any missing Dataverse tables.
- Asks only what it can’t detect — entity, template selection, output format, result UI, placement, record source.
- Generates working code — the full DCP pipeline with error handling, loading states, and document retrieval, styled to your app
No manual setup steps, no API documentation to read, no placeholders to fill in.
Download: The skill package (v2.1) is attached at the bottom of this article.
What the skill does
When you invoke /dcp-generate in Claude Code, the skill runs a fixed sequence — detecting what it can, asking only what it can’t, and generating the component at the end.

Green= detection and generation the skill does automatically. Purple = optional questions based on project type. Questions = questions you need to answer.
The generated code implements the full DCP pipeline: load templates → create working item → poll for completion → retrieve the document. It handles both note-stored and Azure Blob-stored documents, and correctly distinguishes a failed merge from a successful one.
Prerequisites
Before you start, confirm:
- DCP is installed in your target environment. Run
pac solution listand look forAutoMergeServerCore. - At least one active DCP template exists for the entity you are targeting.
- PAC CLI is authenticated. Run
pac auth list— one profile must be marked active. - Claude Code is installed and running inside VS Code.
- For the Code App scenario: an existing Power Apps Code App project with
power.config.json.
Note: The skill will check if all prerequisites are met automatically
Installing the skill
- Download and unzip the skill package.
- Copy the entire
dcp-generatefolder — not just the file — into your Claude Code skills directory:
| OS | Path |
|---|---|
| Windows | C:\Users\<you>\.claude\skills\dcp-generate\SKILL.md |
| Mac / Linux | ~/.claude/skills/dcp-generate/SKILL.md |
- Restart Claude Code so the slash command list picks up the skill.
- Open your project in VS Code and type
/dcp-generate.
Scenario 1 — Generative Page in a model-driven app
Generative Pages run inside a model-driven app and have ambient record context, so the skill does not need to ask where the record comes from.
Steps:
- Open your Generative Page project in VS Code.
- Type
/dcp-generatein Claude Code. - The skill detects no
power.config.jsonand asks for the target type. Select Generative page. - Answer the configuration questions:
- Entity: e.g. Quote
- Output format: PDF
- Template selection: Searchable dropdown
- Result UI: Download + inline preview
- Placement: Where the panel goes on the page
- Record source: How the page gets the record ID — from page context, a selected row, or a picker
- The skill generates the component using the
dataApiAPI style.
What you get: A component that loads active templates for the entity, creates the working item, assigns the template via SOAP (required for hosted targets — OData fails), polls until complete, and renders the PDF inline with a download control.
Scenario 2 — Power Apps Code App
A Code App is a standalone React SPA with no ambient record context. The skill handles this differently — it binds the DCP tables and asks where the record ID comes from.
Steps:
- Open your Code App project in VS Code.
- Type
/dcp-generatein Claude Code. - The skill finds
power.config.json, identifies the app root, and reads the environment ID. It skips the target-type question. - It checks which of the four DCP tables are already bound and lists any missing ones.
- Answer the configuration questions:
- Entity: e.g. Lead
- Template selection: Searchable dropdown
- Result UI: Download + inline preview
- Placement: Panel on an existing page — the skill reads your routes and offers the real page files
- Record source: Route parameter (for a detail page) or selected row (for a list page)
- Bind missing tables now? Yes
- The skill runs
pac code add-data-sourcefor each missing table, then generates the code.
The folder imports nothing from your app except the generated services — it drops into any other Code App unchanged.