Skip to content

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

Open
coatsy wants to merge 73 commits intomicrosoft:mainfrom
coatsy:coatsy/vscode-extension
Open

feat(extension): add VS Code extension and extension bundle for GitHub Copilot Chat#98
coatsy wants to merge 73 commits intomicrosoft:mainfrom
coatsy:coatsy/vscode-extension

Conversation

@coatsy
Copy link
Copy Markdown

@coatsy coatsy commented Mar 31, 2026

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

Andrew Coates and others added 30 commits March 25, 2026 07:39
- 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
feat(extension): artifact discovery, path resolution, CI pipeline, and README
- 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
docs(extension): add VS Code extension documentation and update guides
- 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
…pport

- Document code-cli.sh path resolution and extensions-dir mismatch
  in LOCAL_DEV_HOST.md with troubleshooting entries
- Add EXTENSIONS_DIR env var to test-local.sh for custom install dir
- Add Copilot Chat prerequisite note to DEBUG_CONFIG.md and
  LOCAL_DEV_HOST.md for chat agent testing

📝 - Generated by Copilot
- Verify agent and skill counts in package.json
- Check no Claude-specific frontmatter fields remain in skills
- Validate all required directories exist in staged output
- Update PACKAGING.md pipeline description

✅ - Generated by Copilot
coatsy added 9 commits March 30, 2026 23:16
feat(workflows): add CI/CD publish workflow and marketplace metadata
…etadata, URLs, and pack ordering

- make README frontmatter stripping handle CRLF line endings
- extract name and description from agent/skill frontmatter into package.json
- update repository, bugs, and homepage URLs to coatsy fork
- reorder extension pack to list Copilot Studio extension first

🔧 - Generated by Copilot
fix(extension): Marketplace cleanup — frontmatter, metadata, repo links, bundle ordering
Keep VS Code bundle as recommended install method and move upstream's VS Code Store and GitHub Copilot CLI instructions to an appendix section.
Add a comprehensive blog post covering the Copilot Studio Skills VS Code
extension and Development Bundle, targeting Microsoft Tech Community.

Content includes:
- Introduction to the toolkit and its relationship to Copilot Studio
- History of the agents and skills from Claude Code plugin through
  GitHub Copilot CLI to VS Code extension
- Four agents (Author, Manage, Test, Troubleshoot) and 24 skills
  across six categories
- The anti-hallucination design principle with schema-lookup enforcement
- VS Code extension and Development Bundle architecture
- End-to-end usage examples with YAML samples (topic creation,
  knowledge sources, generative answers)
- Extraction methodology and ADR-001 decision analysis
- Build pipeline walkthrough (staging, frontmatter stripping, path
  resolution, dynamic discovery, packaging)
- CI/CD workflows (build with VSIX validation, publish with version
  matching and dry-run support)
- Agent testing approaches (point-test, batch suites, evaluation
  analysis) and LSP-based YAML validation
- Mermaid architecture diagram and screenshot placeholders with
  capture instructions

Screenshots included:
- hero-screenshot.png (Author agent creating a topic)
- agent-chooser.png (@ mention dropdown with four agents)
- github-actions-build-run.png (CI validation steps)
- test-agent-output.png (Test agent conversation)
docs(blog): add Tech Community blog post for extension and bundle
@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
Copy link
Copy Markdown
Author

coatsy commented Apr 1, 2026

Hi @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

coatsy commented Apr 1, 2026

coatsy added 15 commits April 1, 2026 11:37
Agents referenced skills in body text but did not declare them in
the skills: frontmatter array, making them unavailable in VS Code.

- copilot-studio-author: add 16 missing skills (new-topic, add-node, etc.)
- copilot-studio-test: add 5 missing skills (detect-mode, chat-directline, etc.)
- copilot-studio-troubleshoot: add 9 missing skills (known-issues, validate, etc.)

Fixes #23
Scan staged agent body text for /copilot-studio:<skill> references
and automatically add missing skills to the frontmatter skills: array.
Only injects skills that have a matching skills/<name>/SKILL.md directory.

This runs at build time on staged files, keeping source agents untouched.

Fixes #23
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
fix(agents): add missing skill declarations to agent frontmatter
- convert comment-based Name/Description to mcs.metadata block
- normalize whitespace and trailing newlines

🔧 - Generated by Copilot
@ChrisGarty
Copy link
Copy Markdown
Contributor

@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
Copy link
Copy Markdown
Author

coatsy commented Apr 6, 2026

@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 ChrisGarty added the type/feature New skill, agent, or capability label Apr 7, 2026
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