vibe-eyes
CLAUDE.md54 starsChanged 21 months agoMITView on GitHub
Vibe-Eyes focuses on providing visual context and debug information to LLMs during vibe coding sessions. Vibe-Eyes uses a client-server architecture where a lightweight browser client captures canvas content and debug information, sends it to a Node.js server via WebSockets, which then vectorizes the images into compact SVG representations and makes them available to LLMs through the Model Context Protocol (MCP). Vibe-Eyes is an MCP server that gives LLMs (like yourself) an approximation of canvas output and debug information from browser…
In this repositoryOne other file it gives its agents.
- llms.txtllms.txt
The file
We split this CLAUDE.md into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Very specific: line 39
Start MCP server: npm run server (or node mcp.js)
- Very specific: line 40
Use vectorizer CLI: vibe-eyes-vectorize input.png output.svg
- Very specific: line 60
When to use includeSvg:
- Distinctive: line 96
When analyzing the vectorized output, focus on:
- Distinctive: line 102
Do not rely on precise pixel measurements, exact color values, or fine details that may be lost in the vectorization process.
- Very specific: line 106
When a user is using Vibe-Eyes:
- Distinctive: line 108
Check for unhandled exceptions first - these often reveal syntax errors or critical issues
- Distinctive: line 112
Use stack traces from exceptions to identify exactly where errors occur
- Distinctive: line 114
Use the timestamps to understand the sequence of events
- Distinctive: line 131
Import statements at the top, grouped logically
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md - Vibe-Eyes Project Guide
Vibe-Eyes focuses on providing visual context and debug information to LLMs during vibe coding sessions.
<img src="happy.jpg" width="50%" alt="Vibe-Eyes Logo">Vibe-Eyes uses a client-server architecture where a lightweight browser client captures canvas content and debug information, sends it to a Node.js server via WebSockets, which then vectorizes the images into compact SVG representations and makes them available to LLMs through the Model Context Protocol (MCP).
Project Overview
Vibe-Eyes is an MCP server that gives LLMs (like yourself) an approximation of canvas output and debug information from browser games and applications. It enables more effective "vibe coding" sessions by letting you see what's happening in the application.
flowchart LR
A["Game/App"] -->|"Canvas<br/>Logs<br/>Exceptions"| B["Client.js"]
B -->|"WebSocket"| C["MCP Server"]
C -->|"getGameDebug()"| D["Claude/LLM"]
D -->|"Debugging Help"| A
classDef default color:#000,font-weight:bold
classDef edgeLabel color:#333,font-size:12px
style A fill:#c0e0ff,stroke:#000,stroke-width:2px
style B fill:#ffe0a0,stroke:#000,stroke-width:2px
style C fill:#b0e0a0,stroke:#000,stroke-width:2px
style D fill:#ffb0d0,stroke:#000,stroke-width:2pxProject Structure
vectorizer.js- Core SVG vectorization librarymcp.js- MCP server that receives canvas captures and exposes them to LLMs- Browser client - Available at vibe-eyes-client repository for capturing canvas and console output
cli.js- Standalone CLI tool for vectorization (not central to main functionality)
Key Commands
- Install:
npm install - Start MCP server:
npm run server(ornode mcp.js) - Use vectorizer CLI:
vibe-eyes-vectorize input.png output.svg
MCP Tool Usage
Vibe-Eyes provides a single, powerful MCP tool called getGameDebug that gives you visual and debug insight into what's happening in the user's browser:
getGameDebug({
includeSvg: true/false // Whether to include SVG visualization
})This tool acts as your "eyes" during vibe coding sessions by:
- Providing Visual Context: Shows you what's currently on the user's game/app canvas
- Capturing Debug Information: Collects recent console.log and console.error entries
- Catching Unhandled Exceptions: Records any syntax errors or uncaught exceptions with stack traces
- Correlating Visual and Code State: Timestamps help you connect logs to visual state
- Optimizing for MCP: Converts pixel-based canvas to compact SVG representation
When to use includeSvg:
- Set to
truewhen you need to understand the visual state (e.g., "What does the game look like right now?") - Set to
falsewhen you only need log information (for better performance)
Example response structure:
{
success: true,
content: [
{
type: "text",
text: "Game State: capture_123456789 (2021-03-19T12:00:16.161Z)\n\nConsole Logs:\n[2021-03-19T12:00:16.000Z] Player position: [object Object]\n...\n\nNo errors.\n\nVectorization Stats:\n{\n \"vectorizeTime\": 30.96,\n \"optimizeTime\": 9.88,\n \"originalSize\": 34275,\n \"finalSize\": 3502,\n \"sizeReduction\": 89.78\n}"
},
{
type: "image",
data: "data:image/svg+xml;base64,...", // Base64 encoded SVG
mimeType: "image/svg+xml"
}
]
}This tool bridges the gap between what the user sees and what you can understand about their application state.
Understanding Vectorized Canvas
IMPORTANT: The SVG representation you'll receive is only a ROUGH APPROXIMATION of the actual canvas content, not a pixel-perfect reproduction. Key characteristics:
- Vector paths instead of pixel data
- Heavily simplified color palette
- Approximated shapes that capture the essence but not exact details
- Prioritization of larger visual elements over small details
- Significantly reduced data size compared to screenshots
Think of it like a sketch rather than a photograph - it conveys the general visual state and layout but will omit or simplify many details. This approximation is intentional, designed to give you enough visual context to understand what's happening without requiring excessive data transmission.
When analyzing the vectorized output, focus on:
- General layout and positioning of elements
- Relative sizes and relationships
- Presence/absence of major visual components
- Color regions and boundaries
Do not rely on precise pixel measurements, exact color values, or fine details that may be lost in the vectorization process.
Debug Workflow Tips
When a user is using Vibe-Eyes:
- Check for unhandled exceptions first - these often reveal syntax errors or critical issues
- Focus on the console logs and errors to understand the application state
- Request the SVG representation (includeSvg: true) when you need visual context
- Correlate visual elements with the logs to identify issues
- Use stack traces from exceptions to identify exactly where errors occur
- Remember that the visual is an approximation - small details may be simplified
- Use the timestamps to understand the sequence of events
Performance Notes
- Canvas captures and vectorization can be resource-intensive
- The client captures at configurable intervals (not every frame)
- WebSocket transport avoids CORS issues with cross-domain setups
- The server processes images sequentially to prevent overload
- The server keeps only the latest capture in memory
Code Style Guidelines
- ES Modules syntax (import/export)
- File names: lowercase with .js extension
- Variables/functions: camelCase
- Tab size: 2 spaces
- Node.js shebang:
#!/usr/bin/env node - Import statements at the top, grouped logically
- JSDoc style comments for functions and classes
Dependencies
@neplex/vectorizer- Core vectorization engineexpress- HTTP serversocket.io- WebSocket serversvgo- SVG optimization@modelcontextprotocol/sdk- MCP integrationzod- Schema validation for MCP
Vibe-Eyes allows you to "see" browser applications during coding sessions, reducing the need for users to manually share screenshots and enabling more effective debugging.
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.

