visual-companion
БесплатноЗапускает вложенные скриптыНе проверенUse when a user wants a standalone browser-based visual companion for interactive mockups, diagrams, wireframes, layout comparisons, visual brainstorming, or…
от Ouro-labs★ 17 звёзд на GitHubОб этом скилле
Visual Companion
This is a standalone skill. It is not tied to the broader brainstorming workflow.
Resolve bundled scripts relative to this skill directory:
scripts/start-server.shscripts/stop-server.shscripts/server.cjsscripts/frame-template.htmlscripts/helper.jsscripts/wait-for-event.cjsscripts/mark-pending-question.cjsscripts/read-pending-event.cjs
Browser-based visual brainstorming companion for showing mockups, diagrams, and options.
When to Use
Decide per-question, not per-session. The test: would the user understand this better by seeing it than reading it?
Use the browser when the content itself is visual:
- UI mockups — wireframes, layouts, navigation structures, component designs
- Architecture diagrams — system components, data flow, relationship maps
- Side-by-side visual comparisons — comparing two layouts, two color schemes, two design directions
- Design polish — when the question is about look and feel, spacing, visual hierarchy
- Spatial relationships — state machines, flowcharts, entity relationships rendered as diagrams
Use the terminal when the content is text or tabular:
- Requirements and scope questions — "what does X mean?", "which features are in scope?"
- Conceptual A/B/C choices — picking between approaches described in words
- Tradeoff lists — pros/cons, comparison tables
- Technical decisions — API design, data modeling, architectural approach selection
- Clarifying questions — anything where the answer is words, not a visual preference
A question about a UI topic is not automatically a visual question. "What kind of wizard do you want?" is conceptual — use the terminal. "Which of these wizard layouts feels right?" is visual — use the browser.
How It Works
The server watches a directory for HTML files and serves the newest one to the browser. You write HTML content to screen_dir, the user sees it in their browser and can click to select options or submit small forms. Browser events are recorded to state_dir/events, state_dir/latest-event.json, and state_dir/latest-selection.json.
Browser events are durable. Do not depend only on a currently running wait-for-event.cjs process. The browser sends user events through WebSocket and an immediate HTTP fallback, and the server deduplicates them by eventId. If the waiting command is interrupted or the user may ask unrelated terminal questions while a visual choice remains open, recover the answer later with read-pending-event.cjs.
Diagnostics are durable too. Browser helper sends, server records, duplicate drops, wait starts, wait matches, timeout events, and pending recovery checks are appended as JSON lines to state_dir/diagnostics.jsonl. Check that file first when a user says they clicked but Codex did not react.
The server injects a per-session token into served pages and requires that token for browser event, diagnostic, and WebSocket event paths. This prevents unrelated local pages from spoofing visual choices when the server port is reachable.
For the best Codex/Claude flow, do not require the user to retype a browser choice in the terminal. After pushing a screen, run scripts/wait-for-event.cjs with the returned state_dir; it blocks until the next browser event and prints the JSON event directly into the session.
Content fragments vs full documents: If your HTML file starts with <!DOCTYPE or <html, the server serves it as-is (just injects the helper script). Otherwise, the server automatically wraps your content in the frame template — adding the header, CSS theme, selection indicator, and all interactive infrastructure. Write content fragments by default. Only write full documents when you need complete control over the page.
Starting a Session
# Start server with persistence (mockups saved to project)
scripts/start-server.sh --project-dir /path/to/project
# Returns: {"type":"server-started","port":52341,"url":"http://localhost:52341",
# "screen_dir":"/path/to/project/.brainstorm/12345-1706000000/content",
# "state_dir":"/path/to/project/.brainstorm/12345-1706000000/state"}
Save screen_dir and state_dir from the response. Tell user to open the URL.
Finding connection info: The server writes its startup JSON to $STATE_DIR/server-info. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using --project-dir, check <project>/.brainstorm/ for the session directory.
Note: Pass the project root as --project-dir so mockups persist in .brainstorm/ and survive server restarts. Without it, files go to /tmp and get cleaned up. Remind the user to add .brainstorm/ to .gitignore if it's not already there.
Launching the server by platform:
Claude Code (macOS / Linux):
# Default mode works — the script backgrounds the server itself
scripts/start-se
Установить visual-companion в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл visual-companion?
Use when a user wants a standalone browser-based visual companion for interactive mockups, diagrams, wireframes, layout comparisons, visual brainstorming, or clickable visual option selection. Starts a local zero-dependency Node server, writes HTML screens, and reads browser click events.
Как установить скилл visual-companion?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл visual-companion запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic