setup-component-explorer-full
Skill65 starsChanged 16 days agoMITView on GitHub
Full setup of the Component Explorer including CLI, MCP server, VS Code tasks and launch config. USE FOR: "complete component explorer setup with the CLI", "configure the component explorer MCP server", "add VS Code tasks for the component explorer", "add a launch config for the component explorer". DO NOT USE FOR: "minimal or plugin only component explorer setup", "write a fixture for a component".
- Installs packages
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- manage-bansSkill
- build-healthSkill
- setup-component-explorer-lightSkill
- setup-component-explorerSkill
- use-component-explorerSkill
- debugSkill
- inbox-add-reactionSkill
- inbox-dismiss-notificationSkill
- inbox-get-notification-detailsSkill
- inbox-install-gh-cliSkill
- inbox-list-notificationsSkill
- inbox-manage-subscriptionSkill
- inbox-mark-all-readSkill
- inbox-memorySkill
- inbox-open-notificationSkill
- inbox-search-issuesSkill
- inbox-setupSkill
- council-planSkill
- council-reviewSkill
- monitor-prSkill
- my-issuesSkill
- my-work-setupSkill
- my-work-uiSkill
- generate-presentationSkill
- generate-videoSkill
- review-areasSkill
- review-planSkill
- session-timelineSkill
- generate-test-videoSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
When the user asks to add, set up, or integrate the component explorer into their project, follow this guide.
- Distinctive: line 21
Use the project's package manager (npm, pnpm, yarn).
- Very specific: line 25
Add componentExplorer() to vite.config.ts:
- Very specific: line 58
Create a configuration file for the CLI/daemon/MCP features (place next to the Vite config or at the project root):
- Very specific: line 73
Create or update .mcp.json at the workspace root to add the component explorer MCP server.
- Very specific: line 102
Add a task to .vscode/tasks.json to start the component explorer server:
- Very specific: line 133
If other tasks already exist, merge the new task into the existing tasks array.
- Very specific: line 157
If other launch configurations already exist, merge the new configuration into the existing configurations array.
- Distinctive: line 162
Important: Before writing any fixtures, read the use-component-explorer skill.
- Very specific: line 164
Create a .fixture.tsx (or .fixture.ts) file to verify the setup works:
- Very specific: line 166
Start the dev server as a background terminal process: npx vite (or pnpm dev, etc.)
- Distinctive: line 171
Run the "Component Explorer Server" VS Code task (or the launch configuration) to start the daemon.
- Very specific: line 172
Verify the MCP server connects (Copilot can now list_fixtures, screenshot, etc.).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Setup Component Explorer
When the user asks to add, set up, or integrate the component explorer into their project, follow this guide.
Prerequisites
- The project uses Vite as its bundler
- Node.js >= 22
Step 1: Install Packages
npm install @vscode/component-explorer @vscode/component-explorer-cli @vscode/component-explorer-vite-pluginUse the project's package manager (npm, pnpm, yarn). For workspace monorepos, install into the package that owns the Vite config.
Step 2: Configure Vite Plugin
Add componentExplorer() to vite.config.ts:
import { componentExplorer } from '@vscode/component-explorer-vite-plugin';
export default defineConfig({
plugins: [
// ... existing plugins (react, tailwind, etc.)
componentExplorer(),
],
});Plugin Options
| Option | Default | Description |
include | './src/**/*.fixture.{ts,tsx}' | Glob pattern for fixture files |
route | '/___explorer' | URL path for the explorer UI |
build | 'app-only' | Build mode: 'app-only', 'all', or 'explorer-only' |
outFile | '___explorer.html' | Output filename for built explorer |
logLevel | 'info' | 'silent', 'info', 'verbose', 'warn', 'error' |
For projects where fixtures live outside ./, set include explicitly:
componentExplorer({
include: './test/**/*.fixture.{ts,tsx,js,jsx}',
}),Step 3: Create component-explorer.json
Create a configuration file for the CLI/daemon/MCP features (place next to the Vite config or at the project root):
{
"$schema": "./node_modules/@vscode/component-explorer-cli/dist/component-explorer-config.schema.json",
"screenshotDir": ".screenshots",
"viteConfig": "./vite.config.ts",
// If you need a stable port, configure the redirection server port (required for the launch config in Step 6):
"redirection": { "port": 5331 }
}Step 4: Configure Copilot — MCP Server
Create or update .mcp.json at the workspace root to add the component explorer MCP server. Merge into existing mcpServers without replacing other servers. This enables Copilot harness sessions to take screenshots, compare fixtures, and interact with components:
{
"mcpServers": {
"component-explorer": {
"type": "stdio",
"tools": ["*"],
"command": "npm",
"args": [
"exec",
"component-explorer",
"--no",
"--",
"mcp",
"-p",
"./component-explorer.json"
]
}
}
}Adjust the -p path to point to the component-explorer.json location relative to cwd.
tools: ["*"] enables every tool from this server; narrow the list if the project needs fewer capabilities. Start a new Copilot session and use /mcp show component-explorer to verify that the server starts and provides the expected tools. See GitHub's MCP configuration guidance.
Step 5: Configure VS Code — Component Explorer Server Task
Add a task to .vscode/tasks.json to start the component explorer server:
{
"version": "2.0.0",
"tasks": [
{
"label": "Component Explorer Server",
"type": "shell",
"command": "./node_modules/.bin/component-explorer serve -p ./component-explorer.json --kill-if-running",
"isBackground": true,
"problemMatcher": {
"owner": "component-explorer",
"fileLocation": "absolute",
"pattern": {
"regexp": "^\\s*at\\s+(.+?):(\\d+):(\\d+)\\s*$",
"file": 1,
"line": 2,
"column": 3
},
"background": {
"activeOnStart": true,
"beginsPattern": ".*Setting up sessions.*",
"endsPattern": "Redirection server listening on.*"
}
}
}
]
}If other tasks already exist, merge the new task into the existing tasks array.
Step 6: Configure VS Code — Launch Configuration (Optional)
To open the component explorer UI in Chrome, add a launch configuration to .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Component Explorer (Chrome)",
"type": "chrome",
"request": "launch",
"url": "http://localhost:5331/___explorer",
"preLaunchTask": "Component Explorer Server"
}
]
}This requires the redirection port to be configured in component-explorer.json (see Step 3). The preLaunchTask starts the daemon automatically before opening the browser.
If other launch configurations already exist, merge the new configuration into the existing configurations array.
Step 7: Create a First Fixture and Verify
Important: Before writing any fixtures, read the use-component-explorer skill. It covers fixture patterns, project-specific wrappers, and best practices that are essential for correct usage.
Create a .fixture.tsx (or .fixture.ts) file to verify the setup works:
- Start the dev server as a background terminal process:
npx vite(orpnpm dev, etc.) - Once the server is ready, open the component explorer in VS Code's Simple Browser by running the VS Code command:
simpleBrowser.show with url: http://localhost:5173/___explorer - Run the "Component Explorer Server" VS Code task (or the launch configuration) to start the daemon.
- Verify the MCP server connects (Copilot can now
list_fixtures,screenshot, etc.).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

