ArcGIS Blog

Developers

ArcGIS Pro SDK

Teaching GitHub Copilot in VS Code to build ArcGIS Pro add-ins

By Vedant Bajaj

How custom agents, instructions, skills and a documentation MCP server help Copilot scaffold and explain ArcGIS Pro SDK add-ins.

Open an empty folder in VS Code, open Copilot Chat and type “Make me an addin.” About a minute later, an ArcGIS Pro add-in project is sitting in your workspace. Ask for “a new tool that can do feature selection” and a map tool appears, wired into the ribbon, with code that follows Pro’s threading rules.

We recorded exactly this for the ArcGIS Pro 3.8 SDK. This post walks through how it works and explains the jargon as we go: agents, instructions, skills and MCP.

VS Code Copilot Chat with "/arcgis" typed and a menu listing the item-generator, project-creator and fix-pro-references skills
The Copilot prompt picker in VS Code showing the ArcGIS Pro SDK skills: item-generator, project-creator and fix-pro-references.

Why we built this

The ArcGIS Pro SDK is deep, and that depth is the first wall new developers hit. Before writing any code you choose between an Add-in, a Configuration, a Plugin Datasource and a CoreHost app. Then you learn Pro’s rules, like running work on the Main CIM Thread through QueuedTask.Run. An AI assistant that hasn’t been taught those rules can only guess.

We want to lower the barrier to extending ArcGIS Pro so developers can ship good solutions faster. We’re working on two fronts. The first is meeting developers in VS Code, with templates and Copilot customizations for creating projects and items. The second is making the SDK itself AI-ready: documentation that models can read, a documentation MCP server, and best-practice guidance written for coding agents.

Everything in this post lives in the public arcgis-pro-sdk-copilot repo, so you can open the files and see for yourself.

The AI jargon, decoded

Four terms keep coming up. Here is what each one means and where you’ll find it in the Pro SDK workspace.

Agent mode

In VS Code, Copilot Chat’s Agent mode plans a task, edits files and runs terminal commands for you. In our demo it generates a project, runs dotnet build and fixes whatever the compiler complains about.

Custom agents

A custom agent is a role-specific setup (instructions, allowed tools and optionally a model) saved as an .agent.md file in the .github/agents folder. You pick one from the Agent dropdown in chat. The workspace ships three:

Agent What it does
arcgis-pro-sdk-pattern-help Answers “which extensibility pattern should I use?” and explains the tradeoffs between Add-ins, Configurations, Plugin Datasources and CoreHost apps
arcgis-pro-sdk-project-creator Scaffolds new SDK projects using the installed VS Code extension
arcgis-pro-sdk-referral Points you to the right official SDK documentation links for your question

GitHub file list for the .github/agents folder showing the pattern-help, project-creator and referral agent files
The .github/agents folder in the arcgis-pro-sdk-copilot repo, showing the three .agent.md files.

Instructions

Custom instructions are Markdown files Copilot reads to learn how your team works. In this workspace, a top-level copilot-instructions.md routes each request to whatever owns it. Pattern questions go to the pattern-help agent. Requests for code examples go to the example-resources instructions, and generated code is checked against the best-practices instructions. Those hold the practices themselves, such as how to respect the Main CIM Thread, how to use QueuedTask, and how to update the UI safely.

Skills

A skill is a folder with a SKILL.md file that describes a repeatable workflow. Copilot loads the full playbook only when your request matches, which keeps the context window light. The repo has five:

  • Project creator scaffolds Add-in, Managed Configuration, CoreHost and Plugin Datasource projects, then builds them.
  • Item generator adds new items, like a button or a map tool, to an existing Add-in or Managed Configuration project. Its instructions call for confirming the plan with you first.
  • Pattern help and referral back the agents of the same names.
  • Fix Pro references repairs broken DLL paths, targets imports and launch profiles in an existing project, keeps rollback copies and runs a build check afterward.

The snippets repo has a skill of its own that checks whether code references in the snippets still resolve.

MCP

The Model Context Protocol is an open standard for connecting AI applications to outside tools and data. An MCP server exposes those capabilities to any MCP-aware client, VS Code included.

Ours is the Esri MCP server for developer documentation, part of the ArcGIS agentic developer toolkit. Esri hosts it, and it gives the agent three tools: fetch_esri_developer_focus_areas lists the products you can search within, search_esri_developer_docs searches the documentation, and fetch_esri_developer_doc returns a full page as Markdown. pro-sdk is one of the focus areas, so the agent can look up the official Pro SDK documentation when it needs it, instead of relying on whatever the model remembers from training.

If the server isn’t already listed in VS Code, add one entry to your mcp.json. It needs no authentication:

{
  "servers": {
    "esri-developer-docs": {
      "type": "http",
      "url": "https://developers-mcp.arcgis.com/mcp"
    }
  }
}

The way I think about the pieces: instructions tell the agent how to behave, skills tell it how to do a task, and the documentation server tells it what is true right now.

VS Code MCP servers panel showing the Esri documentation server enabled, above its JSON configuration pointing to developers-mcp.arcgis.com/mcp
The Esri MCP server for developer documentation in VS Code: the server list and its configuration.

That’s the setup done. With the MCP server connected and the skills installed, you can ask Copilot what it has to work with and check the answer against what you installed:

Copilot chat answer listing the Esri MCP server's three tools and a table of five installed ArcGIS Pro SDK skills
Copilot confirming the Esri MCP server is connected and listing its tools and the installed Esri developer agent skills.

Let’s watch it work

The first demo starts with an empty workspace that holds only the Copilot customizations and the Pro SDK extension. Behind the scenes, Copilot in Agent mode receives your prompt, the instructions route it to the right agent or skill, and that agent uses the VS Code extension and the documentation as its source of truth. It asks for the details it needs, builds the project and shows you the diff.

Ask first

We began with “Tell me how I can extend ArcGIS Pro.” The agent explained the four extensibility patterns with a table that maps your goal to a pattern. New tools, panes, commands or workflows inside Pro point to an Add-in. A custom startup or start page, a role-based UI or a streamlined Pro points to a Configuration. Showing proprietary or unsupported data in Pro, read-only, points to a Plugin Datasource, and geodatabase or geometry processing without opening Pro points to CoreHost. It finished with links to the official documentation for each pattern.

Then we asked about the differences between add-ins and configurations. The side-by-side table covered what each one can change (a Configuration can replace the splash screen and start page, customize the Quick Access Toolbar and rebrand the application, and an Add-in can’t), the project structure, the package file (.esriAddinX versus .ProConfigX), how each gets turned on, when it loads, and how many can run in one Pro session. It also gave a rule of thumb worth remembering: prefer an Add-in unless you need to control startup or govern the broader application UI.

Copilot chat table mapping goals to the Add-in, Configuration, Plugin Datasource and CoreHost patterns
Copilot's answer to "Tell me how I can extend ArcGIS Pro": a table that maps your goal to a pattern.
Copilot chat table comparing Add-ins and Configurations by purpose, splash screen, project structure, package file and loading
Copilot's side-by-side comparison of Add-ins and Configurations.

Make me an addin

The agent asked one question, the project name, and we answered ProAppModule1. It used the SDK extension’s project generator and finished in six steps and about 22 seconds. When it was done, config.daml, Module1.cs and a .csproj were sitting in the Explorer, next to light and dark icon folders and a Properties folder. The agent’s summary also lists a launchSettings.json for launching Pro from the project, and notes that the add-in has no buttons or tools yet. It offered to add one.

VS Code Explorer showing the ProAppModule1 project files next to Copilot's summary of what it created
The new ProAppModule1 project in the Explorer, next to the agent's summary.

Add a feature selection tool

We typed “add a new tool that can do feature selection.” The agent read the item-generation guidance, decided on a Map Tool, and asked what to name the class. It suggested FeatureSelectionTool, and we accepted.

About 54 seconds and 12 steps later, the add-in built successfully. The tool:

  • selects features that intersect a dragged rectangle,
  • runs the selection on the Main CIM Thread through QueuedTask.Run,
  • replaces the current selection,
  • reports failures on the UI thread, and
  • is added to the ribbon in config.daml with a caption and a tooltip.
Copilot chat asking for the new tool's class name, with FeatureSelectionTool filled in
The agent asks for the tool's class name before it generates anything.

The agent also told us what it hadn’t done: it built the project but hadn’t tested the tool in ArcGIS Pro, and the tool works only in 2D maps, so 3D scenes would need a small change.

C# code for FeatureSelectionTool with an awaited QueuedTask.Run call that selects features in the map view
FeatureSelectionTool.cs as generated, with the QueuedTask.Run call that makes the selection on the Main CIM Thread.

These timings come from a single recorded run, so yours will vary.

What keeps it on the rails

Letting an agent write code in your project only works if it stays inside the lines. Three things do that work here.

Each agent has one job, so a pattern question doesn’t turn into surprise code generation, and the agent asks for what it needs, like the project name or the tool name, before it generates anything. The item generator skill is also written to confirm its plan with you before implementing. When guidance conflicts, the workspace’s best practices win, then official ArcGIS Pro SDK documentation, then generic C# and WPF guidance. And samples count as starting points. The instructions treat official samples and snippets as a place to begin, not proof that an implementation fits your SDK version.

Try it yourself

You’ll need Windows with ArcGIS Pro installed (project creation and local builds depend on it), GitHub Copilot Chat in VS Code 1.129 or later, and the .NET SDK that matches your Pro version.

  1. Install VS Code and GitHub Copilot Chat.
  2. Install the ArcGIS Pro SDK for .NET extension from Esri (3.8 release) in VS Code, then reload the window. If the agent ever says the project-creation tool isn’t available, the extension probably isn’t loaded yet.
  3. Get the customizations into your project. Either copy the repo’s .github folder into your repository root, merging the routing rules into your own copilot-instructions.md if you already have one, or install it as a Copilot plugin:
    copilot plugin marketplace add Esri/arcgis-pro-sdk-copilot
    copilot plugin install arcgis-pro-sdk@arcgis

    The plugin doesn’t include the workspace routing instructions, so copy the folder if you want those.

  4. Open Copilot Chat in Agent mode and ask: “Tell me how I can extend ArcGIS Pro.”
  5. Say “Make me an addin,” then “Add a button to my addin.”

Keep these handy: the ArcGIS Pro SDK documentation, the snippets repository and the community samples. The workspace is built for GitHub Copilot Chat in VS Code, though the guidance may help with other AI development tools. It’s provided as-is under the Apache 2.0 license, so adopt all of it or borrow the pieces you like.

What’s next

This is an early step toward making the Pro SDK AI-ready. Try the workspace on a real add-in idea and tell us where the agent helps and where it stumbles. You can leave a comment on this post or share your feedback on the Esri Community. If your team has best practices you’d like an agent to enforce, we’d like to hear those too.

Share this article

Leave a Reply