setup-component-explorer-light
Skill65 starsChanged 16 days agoMITView on GitHub
Lightweight setup — install Component Explorer packages and add the Vite plugin, with MCP server for AI agent integration. USE FOR: "lightweight or minimal component explorer setup", "install the packages and add the Vite plugin", "component explorer without the CLI daemon", "MCP server for AI agent integration". DO NOT USE FOR: "full setup with VS Code tasks and launch config", "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-fullSkill
- 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
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- 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
Start the Vite dev server as a background terminal process (e.g.
- Distinctive: line 64
Important: Before writing any fixtures, read the use-component-explorer skill.
- Very specific: line 78
Create component-explorer.json next to the Vite config (or at the project root).
- Very specific: line 95
Create or update .mcp.json at the workspace root to register the MCP server for the Copilot harness.
≈ “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 (Light)
Minimal setup: install packages and wire the Vite plugin so fixtures are served at ___explorer. For the full setup (CLI daemon, VS Code tasks & launch config), use the setup-component-explorer-full skill.
Prerequisites
- The project uses Vite as its bundler
- Node.js >= 22
Step 1: Install Packages
npm install @vscode/component-explorer @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 ./src, set include explicitly:
componentExplorer({
include: './test/**/*.fixture.{ts,tsx,js,jsx}',
}),Step 3: Start Dev Server and Open Explorer
- Start the Vite dev server as a background terminal process (e.g.
npx vite,pnpm dev). - Once the server is ready, open the component explorer in VS Code's Simple Browser by running the VS Code command (adjust port if needed):
simpleBrowser.show with url: http://localhost:5173/___explorer
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.
Optional: MCP Server for AI Agent Integration
To enable AI agents (Copilot) to take screenshots, compare fixtures, and interact with components, add the MCP server.
Install the CLI
npm install @vscode/component-explorer-cliCreate component-explorer.json
Create component-explorer.json next to the Vite config (or at the project root). This points the CLI at the running Vite dev server:
{
"$schema": "node_modules/@vscode/component-explorer-cli/dist/component-explorer-config.schema.json",
"sessions": [{ "name": "current" }],
"server": {
"type": "http",
"url": "http://localhost:5173"
}
}Adjust the url if the dev server uses a different port.
Configure .mcp.json
Create or update .mcp.json at the workspace root to register the MCP server for the Copilot harness. Merge into existing mcpServers without replacing other servers:
{
"mcpServers": {
"component-explorer": {
"type": "stdio",
"tools": ["*"],
"command": "npx",
"args": [
"component-explorer",
"mcp",
"-p",
"./component-explorer.json"
]
}
}
}Adjust the -p path if component-explorer.json is not at the workspace root.
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.
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.

