agentleFS
MorningStar0709MorningStar0709/trae-agent-enhancements/skills/visual-brainstorming/SKILL.md

visual-brainstorming

Skill18 starsChanged 7 months agoMITView on GitHub

Provide a browser-based prototyping companion for brainstorming sessions — show layouts, wireframes, architecture diagrams, and visual options, and collect the user's click choices. Use when the user has accepted the visual companion offer during brainstorming, or when you need to display visual content for user feedback, including Chinese requests such as “在浏览器里看原型”“展示布局对比”“让用户点击选择”. Requires node available and a local port accessible. Do not use for pure text discussions, concept clarification, or decisions that don't benefit from visual presentation.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 6 are distinctive, and 6 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.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user writes in Chinese, interact in Simplified Chinese.

    line 10
  2. Very specific:

    Before using this skill, the user must have already agreed to try the browser companion.

    line 29
  3. Very specific:

    If the server is already running from a previous session, check <screen_dir>/.server-info for the current connection details instead of …

    line 41
  4. Very specific:

    Write HTML content fragments to files in screen_dir.

    line 47
  5. Very specific:

    Naming: Use semantic names: platform.html, visual-style.html, layout.html.

    line 51
  6. Distinctive:

    Ask them to reply with their thoughts or click an option.

    line 92
  7. Very specific:

    If feedback requires changes, write a new file (e.g.

    line 107
  8. Distinctive:

    When the next step does not need the browser, push a waiting screen:

    line 111
  9. Distinctive:

    When the visual session is done:

    line 122
  10. Distinctive:

    After each visual interaction, report:

    line 144
  11. Very specific:

    Browser inaccessible: If the URL is unreachable in a remote/containerized environment, try binding to a non-loopback host: --host "0.0.0.0" …

    line 152
  12. Distinctive:

    Environment cannot keep background processes alive: Do not force the visual companion.

    line 155

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Visual Brainstorming

A browser-based companion for brainstorming that lets users see prototypes, layouts, and visual options in the browser and click to choose. This is an optional enhancement — only use when the environment supports a local server process and the user has agreed to try it.

When the user writes in Chinese, interact in Simplified Chinese. Keep tool names, script names, JSON keys, file paths, and technical identifiers in English.

Use This Skill

  • The user has accepted the visual companion offer during a brainstorming session.
  • You need to show layouts, wireframes, comparison options, architecture diagrams, or other visual content.
  • The current environment supports local services (node available, ports accessible, process can stay alive).
  • The question is visual: "which layout looks better?" not conceptual: "what does X mean?"

Do Not Use

  • The user declined the visual companion offer or the topic is purely text-based.
  • node is not available, local ports are blocked, or the environment cannot keep a background process alive.
  • The task is concept clarification, technical decision-making, or requirements gathering — use brainstorming in text mode instead.
  • The user only wants a single static chart or diagram — use chart-visualization instead.
  • The user just wants an answer without interactive prototyping.

Prior Conditions

Before using this skill, the user must have already agreed to try the browser companion. The agreement is obtained by brainstorming's Visual Companion section, which sends a standalone offer message. Do not re-offer if the user already declined.

Workflow

1. Start the Server

python .\scripts\start-server.py --project-dir "C:\path\to\project"

The script returns a JSON response with port, url, and screen_dir. Save screen_dir — you need it for all subsequent file writes.

If the server is already running from a previous session, check <screen_dir>/.server-info for the current connection details instead of starting a new one.

Dependency check: start-server.py launches scripts/server.cjs via node. If node is missing or the port is blocked, report the failure and fallback to text-only brainstorming.

2. Write Content to Screen

Write HTML content fragments to files in screen_dir. Each file is one "screen" — one question or comparison.

Content fragment vs full document: If your HTML starts with <!DOCTYPE or <html>, the server serves it as-is (only injecting the interaction script). Otherwise, the server wraps your content in the frame template (CSS theme, choice indicators, all interaction infrastructure). Default to writing fragments. Write a full document only when you need complete control over the page.

Naming: Use semantic names: platform.html, visual-style.html, layout.html. Never reuse a filename — each screen needs a new file. Version with suffixes: layout-v2.html.

Interaction classes available via the frame template:

Options (single/multi-select):

<div class="options">
  <div class="option" data-choice="a" onclick="toggleSelect(this)">
    <div class="letter">A</div>
    <div class="content"><h3>Title</h3><p>Description</p></div>
  </div>
</div>

Multi-select: add data-multiselect to the container.

Cards (visual design):

<div class="cards">
  <div class="card" data-choice="design1" onclick="toggleSelect(this)">
    <div class="card-image"><!-- prototype content --></div>
    <div class="card-body"><h3>Name</h3><p>Description</p></div>
  </div>
</div>

Split view (side-by-side):

<div class="split">
  <div class="mockup"><!-- left --></div>
  <div class="mockup"><!-- right --></div>
</div>

Other available classes: .pros-cons, .mockup, .mock-nav, .mock-sidebar, .mock-content, .placeholder, .section, .subtitle, .label.

3. Notify the User

Tell the user what to expect and end your turn:

  • Remind them of the URL.
  • Briefly describe what's on screen.
  • Ask them to reply with their thoughts or click an option.

4. Read Events

On your next turn, check if <screen_dir>/.events exists. Each line is a JSON object:

{"type":"click","choice":"a","text":"Option A - Simple Layout","timestamp":1706000101}
{"type":"click","choice":"c","text":"Option C - Complex Grid","timestamp":1706000108}

Merge terminal feedback and click events for the full picture. If .events does not exist, the user did not interact with the browser — rely on their terminal reply.

5. Iterate or Advance

If feedback requires changes, write a new file (e.g. layout-v2.html). Only proceed to the next question when the current one is resolved.

6. Push a Waiting Screen When Leaving Visual Mode

When the next step does not need the browser, push a waiting screen:

<!-- waiting.html -->
<div style="display:flex;align-items:center;justify-content:center;min-height:60vh">
  <p class="subtitle">继续在终端中讨论...</p>
</div>

7. Clean Up

When the visual session is done:

python .\scripts\stop-server.py "C:\path\to\project\.superpowers\brainstorm\<session-id>"

stop-server.py returns {"status":"stopped"} on success or {"status":"not_running"} if already stopped.

Decision Rule: Browser vs Terminal

Decide per question, not per session. Does the user understand it better by seeing it or reading it?

Use browserUse terminal
UI prototypes, layouts, navigation structureRequirements and scope questions
Architecture diagrams, component relationshipsConceptual A/B/C choices
Side-by-side visual comparisonsTrade-off lists, comparison tables
Design detail polishing (spacing, visual hierarchy)Technical decisions (API design, data modeling)
State machines, flow diagrams, entity relationshipsClarifying questions

Output Contract

After each visual interaction, report:

  • What was displayed.
  • What the user chose (from .events or terminal).
  • Whether to iterate, advance to the next question, or return to text-only brainstorming.

Failure Handling

  • Server fails to start (node missing, port blocked): Report the specific failure and fallback to text-only brainstorming. Do not retry more than once.
  • Browser inaccessible: If the URL is unreachable in a remote/containerized environment, try binding to a non-loopback host: --host "0.0.0.0" --url-host "localhost". If still failing, fallback to text.
  • No events file after user interaction: The user probably replied via terminal only. Use their text as the primary feedback.
  • Server idle timeout: The server auto-exits after 30 minutes of inactivity. If you detect the server is gone (no .server-info, or .server-stopped present), restart it before writing new content.
  • Environment cannot keep background processes alive: Do not force the visual companion. Switch to pure text immediately.

Integration

  • brainstorming: Upstream — brainstorming offers the visual companion to the user. Once accepted, this skill takes over the visual interaction, then hands back to brainstorming for text-based clarification and next steps.
  • chart-visualization: Adjacent — for single static chart images, use chart-visualization instead.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.