Skip to content

feat(extension): add VS Code extension and extension bundle for GitHub Copilot Chat - #98

Open
Andrew Coates (coatsy) wants to merge 78 commits into
microsoft:mainfrom
coatsy:coatsy/vscode-extension
Open

feat(extension): add VS Code extension and extension bundle for GitHub Copilot Chat#98
Andrew Coates (coatsy) wants to merge 78 commits into
microsoft:mainfrom
coatsy:coatsy/vscode-extension

Conversation

@coatsy

Copy link
Copy Markdown

Summary

This PR adds a VS Code extension that packages the existing agents and skills from this repository for use inside GitHub Copilot Chat. Instead of requiring a Claude Code CLI or GitHub Copilot CLI setup, users can install a single VS Code extension (or an extension bundle) and immediately access all four Copilot Studio agents — Author, Manage, Test, and Troubleshoot — directly in the VS Code chat panel.

What's included

Copilot Studio Skills extension (extension/)

A VS Code Chat extension that takes the agents (.agent.md files) and skills (SKILL.md files + supporting references) from this repository and packages them as a .vsix for the VS Code Marketplace. At build time, a template-driven process (package.template.json) discovers all agents, skills, hooks, templates, scripts, and reference files and registers them as extension contributions. This means:

  • All four agents (Author, Manage, Test, Troubleshoot) are available as chat participants in GitHub Copilot Chat
  • All skills are bundled and available for the agents to invoke
  • Reference schemas, connector definitions, templates, and bundled scripts are included — the extension is self-contained
  • No manual file copying or plugin installation required

Copilot Studio Development Bundle (extension-pack/)

An extension pack that installs both:

  1. Copilot Studio Skills (this extension)
  2. Copilot Studio (ms-copilotstudio.vscode-copilotstudio) — the official Microsoft extension for push/pull/clone operations

This gives users a one-click install for the complete agent development experience.

Build and CI/CD

  • extension/test-local.sh — local build script that stages artifacts from across the repo, generates package.json from the template by discovering agents and skills, strips YAML frontmatter from the README, and packages the VSIX. Supports --package-only (build without installing) or full build-and-install into VS Code.
  • .github/workflows/build-extension.yml — CI workflow that builds and validates the VSIX on every push
  • .github/workflows/publish-extension.yml — publish workflow for pushing to the VS Code Marketplace

Local testing with a dev build of VS Code

For contributors who want to debug and test the extension in an isolated environment, this PR includes tooling to build VS Code from source and use it as a dedicated extension debug host:

  • extension/setup-devhost.sh — idempotent script that clones the VS Code repository, installs dependencies, and builds a self-hosted VS Code instance. Supports --shallow for faster initial clone, --skip-launch for CI, and configurable --vscode-dir, --user-data-dir, and --extensions-dir paths.
  • .vscode/launch.json — pre-configured debug configurations:
    • "Launch Extension (Dev Host)" — launches the Extension Development Host using the locally built VS Code with isolated user data and extensions directories, with a pre-launch task that packages the extension first
    • "Attach to Extension Host" — attaches the debugger to an already-running Extension Development Host
  • .vscode/tasks.json — build tasks for "Package Extension" and "Build and Install Extension" that drive test-local.sh

The dev host approach avoids cross-contamination with the developer's primary VS Code installation — extension state, settings, and other extensions remain completely separate, giving a clean environment for reproducing issues and stepping through integration code.

Dev host prerequisites

Requirement Version Notes
Git + Git LFS 2.x+ Required by the VS Code repo for binary assets
Node.js 22+ Check vscode/.nvmrc for the exact minor version
Python 3.11+ Required by native module compilation (node-gyp)
C++ toolchain Platform-specific VS 2022 Build Tools on Windows, Xcode CLT on macOS, build-essential on Linux

Documentation

  • README.md — updated with the VS Code extension bundle as the recommended installation method, with Claude Code / Copilot CLI instructions preserved as alternatives
  • SETUP_GUIDE.md — expanded with VS Code extension walkthrough
  • CONTRIBUTING.md — updated with extension build instructions
  • extension/PACKAGING.md — detailed packaging and publishing guide
  • extension/docs/LOCAL_DEV_HOST.md — full guide to building VS Code from source for extension debugging
  • extension/docs/DEBUG_CONFIG.md — launch.json configuration reference
  • Architecture Decision Records:
    • ADR-001: Artifact file strategy (how the build discovers and stages files)
    • ADR-002: Dev host tooling location (why setup scripts live in extension/)

How the build works

The extension build process (test-local.sh):

  1. Creates a clean .staging directory
  2. Copies agents from agents/*.md, renaming them to *.agent.md for VS Code compatibility
  3. Copies skills/, scripts/, templates/, reference/, and hooks/ directories
  4. Reads extension/templates/package.template.json as the base manifest
  5. Runs a Node.js script that scans staged directories, extracts agent names/descriptions from YAML frontmatter, and populates the contributes section of package.json
  6. Strips YAML frontmatter from Markdown files (required for Marketplace rendering)
  7. Packages everything into a .vsix using @vscode/vsce

This means the extension stays in sync with the repo — when new skills or agents are added upstream, the build automatically discovers and includes them.

TODOs

  • Update publisher from coatsy to the official Microsoft publisher
  • Remove/change all coatsy references (repo, etc)
  • Get Marketplace publishing token for the new publisher
  • Update the PAT secret used by the publish workflow

Stats

32 files changed, ~2,400 lines added

@GiorgioUghini

Copy link
Copy Markdown
Contributor

Lots of commits -- thank you Andrew!

I'd love to know more about this: from my understanding this will package the plugin into a VS Code Extension, which would mean we would need to manage updates by our own? If we accept this in the main branch, would it mean that people would not need the Copilot Studio Extension anymore?

@coatsy

Andrew Coates (coatsy) commented Apr 1, 2026

Copy link
Copy Markdown
Author

Hi Giorgio Ughini (@GiorgioUghini)

this will package the plugin into a VS Code Extension

Correct

which would mean we would need to manage updates by our own?

The CI/CD pipeline publishes the extension and the bundle automatically each time we (you) do a release

would it mean that people would not need the Copilot Studio Extension anymore?

No, the copilot studio extension is still a pre-requisite, but installing the bundle would mean that people get both the copilot studio extension and the agents/skills extension

@coatsy

Copy link
Copy Markdown
Author

@ChrisGarty

Copy link
Copy Markdown
Contributor

Andrew Coates (@coatsy), perhaps this would be ideal as a separate repository that builds upon the standard VS Code Extension for Copilot Studio and these skills? That would allow VS Code users to take advantage of it without adding substantially to the code base of this repository. Then it could be iterated separately to evolve the VS Code capabilities.
Thoughts?

@coatsy

Andrew Coates (coatsy) commented Apr 6, 2026

Copy link
Copy Markdown
Author

Chris Garty (@ChrisGarty) - this could make sense. We might even include it in the suite of hve-core extensions (see https://marketplace.visualstudio.com/search?term=hve%20core&target=VSCode&category=All%20categories&sortBy=Relevance).

I guess we can add a workflow that watches this repo and rebuilds/republishes whenever a new release is pushed here.

@ChrisGarty Chris Garty (ChrisGarty) added the type/feature New skill, agent, or capability label Apr 7, 2026
Andrew Coates and others added 24 commits July 26, 2026 09:46
- add phased plan for declarative VS Code extension (issue #1)
- document HVE Core pattern findings and compatibility challenges
- outline 7 phases: compatibility, scaffold, packaging, testing, CI/CD, publisher, docs

📋 - Generated by Copilot
- add package.template.json with declarative Chat extension metadata
- add .vscodeignore with exclude-first pattern for VSIX packaging
- add LICENSE copy for extension directory
- add test-local.sh for local build-and-install testing
- gitignore extension build artifacts (package.json, README.md, *.vsix)

🧱 - Generated by Copilot
…stration

- stage agents with .md → .agent.md rename at build time
- strip Claude Code-specific frontmatter from skill copies
- generate .vscodeignore into staging directory
- remove committed .vscodeignore (now transient)
- update .gitignore for build artifacts
- update ADR-001 to reflect transient approach

🔧 - Generated by Copilot
- resolve ${CLAUDE_SKILL_DIR} references in staged skill files (19 files)
- add --package-only flag to test-local.sh for CI environments
- add GitHub Actions workflow for build validation and VSIX artifact
- add extension README with agents, skills, prerequisites, and quick start
- fix .gitignore to track extension/README.md

📦 - Generated by Copilot
VS Code extension view renders frontmatter as visible text.

🔧 - Generated by Copilot
- create extension/PACKAGING.md with structure, build, publish, and troubleshooting
- update README.md with VS Code Marketplace installation as primary path
- add extension development section to CONTRIBUTING.md (agents, skills, CI)
- make SETUP_GUIDE.md platform-neutral with VS Code and Claude Code paths
- add YAML frontmatter to root community Markdown files

📝 - Generated by Copilot
- update prerequisites table in extension/PACKAGING.md
- update troubleshooting table in extension/PACKAGING.md
- update prerequisites in extension/README.md
- update prerequisites table in SETUP_GUIDE.md
- update prerequisites in README.md

🔧 - Generated by Copilot
- add LOCAL_DEV_HOST.md with step-by-step VS Code from-source build guide
- add DEBUG_CONFIG.md with launch.json entries for self-hosted debugging
- add setup-devhost.sh helper script for automated dev host setup
- add Development Debugging section to PACKAGING.md with CODE_CMD reference
- add Advanced Debugging section to SETUP_GUIDE.md with cross-references

📝 - Generated by Copilot
- add .vscode-dev-data/, .vscode-dev-extensions/, vscode/ to .gitignore
- add ADR-002 documenting decision to keep dev host tooling in extension/

📝 - Generated by Copilot
- add lint-scripts job to build-extension.yml validating shell syntax
- add launch.json with dev host, attach, and stable extension host configs
- update .gitignore to track .vscode/launch.json while ignoring other settings

📝 - Generated by Copilot
- add ShellCheck step to lint-scripts CI job for deeper static analysis
- add tasks.json with Package Extension and Build and Install tasks
- wire preLaunchTask into Dev Host and Stable launch configs
- update .gitignore to track .vscode/tasks.json

📝 - Generated by Copilot
- update DEBUG_CONFIG.md sample configs to use preLaunchTask: Package Extension
- add .shellcheckrc with shell=bash and severity=warning to match CI

📝 - Generated by Copilot
- add .gitattributes enforcing LF line endings for .sh and .shellcheckrc files
- add Shell scripts section to CONTRIBUTING.md with ShellCheck and convention docs

📝 - Generated by Copilot
- detect Windows (Git Bash/MSYS2), macOS, and Linux at startup
- warn when C++ build tools or Xcode CLT are missing
- use correct CLI launcher (code-cli.bat vs yarn dev) per platform
- update skip-launch message with platform-appropriate command

📝 - Generated by Copilot
…krc directive

- Remove duplicate sed command that repeated Options section and
  leaked set -euo pipefail into --help output
- Switch to sed -E for POSIX ERE on macOS BSD sed
- Remove unsupported severity=warning from .shellcheckrc; CI
  enforces severity via --severity=warning on the command line

🔧 - Generated by Copilot
- Update all docs, CI workflow, and setup-devhost.sh prerequisite
  check to require Node.js 22+ (aligns with VS Code build requirement)

📦 - Generated by Copilot
🔧 - Generated by Copilot
- VS Code repo no longer supports yarn; switch setup-devhost.sh
  and docs to use npm install and bash scripts/code.sh
- Update LOCAL_DEV_HOST.md prerequisites to remove Yarn requirement
- Update DEBUG_CONFIG.md attach example to use scripts/code.sh

🔄 - Generated by Copilot
- Read vscode/.nvmrc after clone and compare against active Node
  major version before running npm install
- Fail with actionable error if versions do not match

✅ - Generated by Copilot
Andrew Coates (coatsy) and others added 29 commits July 26, 2026 09:54
Validate all /copilot-studio:<name> references in staged agent files
resolve to either a skills/<name>/SKILL.md directory or a known agent
name. Warns on unresolvable references to catch broken references
before packaging.
…tion

- Configure tasks.json to use Git Bash instead of WSL bash, fixing
  'node: command not found' errors on systems where WSL lacks Node.js
- Add sub-command validation that checks /copilot-studio:skill sub-cmd
  patterns against the skill's argument-hint frontmatter field
- Add early exit with helpful error message when node is not found
- Bump extension and extension-pack version from 0.1.1 to 0.1.2
- convert comment-based Name/Description to mcs.metadata block
- normalize whitespace and trailing newlines

🔧 - Generated by Copilot
- add second replacement pass for skill-directory-relative paths
- convert remaining CLAUDE_SKILL_DIR/ references to ./

🔧 - Generated by Copilot
- add weekly sync-upstream workflow to auto-merge upstream main
- add dedicated CLAUDE_SKILL_DIR resolution check across all staged files

🔄 - Generated by Copilot
- add changelog entries for build fix and upstream sync workflow

📦 - Generated by Copilot
- document new/updated skills: edit-action, add-action, create-eval, int-reference
- document agent guardrail improvements and new MCP action template
- document shared script extraction

📝 - Generated by Copilot
- add missing skills: chat-directline, chat-sdk, create-eval, detect-mode
- add internal skills category: int-project-context, int-reference

📝 - Generated by Copilot
- fix skills count in Marketplace README listing

📦 - Generated by Copilot
- add daily check-upstream-release workflow with proposal issue creation
- add upstream-version.json to track aligned upstream release (v1.0.8)
- add VERSIONING.md documenting version mapping policy
- add upstream version validation guard to publish-extension workflow
- add upstream version auto-injection into release notes body
- add workflow_call trigger to sync-upstream for release-driven sync
- add upstream/sync category to release notes configuration

Closes #29, Closes #30

🔄 - Generated by Copilot
- add dynamic upstream version badge to README
- add notify-failure job to check-upstream-release workflow
- failure job opens issue with type/infra label and duplicate prevention

🔔 - Generated by Copilot
- add auto-close step for stale failure issues on successful check run
- include upstream version in sync-upstream PR title and body when available
- add upstream/sync label to sync PRs

🔧 - Generated by Copilot
- add upstream_version as workflow_dispatch input to sync-upstream
- pass upstream version tag via dispatch inputs from check-upstream-release

🔗 - Generated by Copilot
- bump extension version from 0.1.4 to 1.0.8 to match upstream
- rewrite VERSIONING.md for synchronized versioning policy
- add publish guard enforcing extension version matches upstream
- update proposal issue template with synchronized version steps
- add changelog entry for version alignment

🔄 - Generated by Copilot
- check-upstream-release now creates a draft PR with version bump
- new-release workflow now also bumps extension and upstream-version.json
- add pull-requests write permission and node setup to check workflow

🔧 - Generated by Copilot
- version bump PR now includes changelog entry for the new version
- add validate-versions workflow to check version file consistency on PRs

✅ - Generated by Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…17 release

Version bumps (1.0.8 → 1.0.9):
- upstream-version.json: version and last_checked date
- extension/templates/package.template.json: skills extension version
- extension-pack/package.json: development bundle version

Changelog (extension/CHANGELOG.md):
- best-practices skill split into patterns + authoring-tips
- manage-agent/clone-agent: new --url flag for Copilot Studio URLs
- Fix: retry transient SSL failures during LSP requests
- Fix: surface LSP error responses from clone and sync
- Fix: broken relative link to orchestrator-variables.md

Documentation sync:
- extension/README.md: skills count 28 → 33, updated skills table
- extension/docs/blog/blog-post.md: updated Mermaid diagram and skills table

Both VSIX packages verified: skills (85 files, 877 KB) and
development bundle (6 files, 80 KB).
…release

- Bump extension, extension-pack, and upstream-version.json to 1.0.10
- Add changelog entry for advisor agent, pattern library, and SharePoint knowledge updates
- Sync upstream changes from release/2026-W18

🚀 - Generated by Copilot
…release

- Bump extension, extension-pack, and upstream-version.json to 1.0.11
- Add changelog entry for 8 new patterns and lookup-schema eval scenario
- Sync upstream changes from release/2026-W19

🚀 - Generated by Copilot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature New skill, agent, or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants