gemini-visual-design
CLAUDE.md1 starsChanged 58 days agoMITView on GitHub
MCP server (src/gemini_visual_mcp/) with these modules:
- Reads credentials
- Installs packages
In this repositoryOne other file it gives its agents.
- visual-design-systemSkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Prompt engine: Every user prompt passes through enhance() before hitting the API — validates, applies templates, injects style profile …
- Very specific: line 34
Edit over regenerate: Always prefer edit_image over regenerating from scratch — builds on previous results
≈ “Common” is an estimate: at least 1 in 5 of the 28,029 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
Gemini Visual Design Plugin
Environment Setup
pip install -e ".[dev]"
export GEMINI_API_KEY="your-key"Architecture
MCP server (src/gemini_visual_mcp/) with these modules:
| Module | Purpose |
server.py | MCP server — tool registration, routing, error handling |
gemini_client.py | Google GenAI SDK wrapper — auth, retry, all API calls |
config.py | Constants — model IDs, defaults, enums |
prompt_engine.py | Prompt validation, templates, enhancement pipeline |
style_profile.py | Per-project .gemini-design-profile.json management |
image_gen.py | Image generation with auto tier selection (draft/fast/pro) |
image_edit.py | Image editing via multi-turn Gemini |
image_utils.py | Shared image file reading and MIME detection |
analyzer.py | Design analysis with structured JSON critique |
video_gen.py | Video generation via Veo with async polling |
asset_manager.py | Preview directory, metadata sidecars, save-to-project |
Conventions
- Prompt engine: Every user prompt passes through
enhance()before hitting the API — validates, applies templates, injects style profile context, adds structural hints - Style profiles:
.gemini-design-profile.jsonin project root stores colors, typography, framework info — all generation inherits these settings - Preview directory: Generated assets land in
~/.cache/gemini-visual-design/preview/with.meta.jsonsidecars. Usesave_assetto copy to the project - Model selection: three image tiers —
draft(flash-lite),fast(flash, default),pro(Gemini 3 Pro Image, finals).autopicksprofor finals, elsefast. Veo for video. Model IDs live only inconfig.py;tests/test_model_ids.pyguards against preview/retired IDs - Edit over regenerate: Always prefer
edit_imageover regenerating from scratch — builds on previous results
Running Tests
pytest tests/ -v
ruff check src/ tests/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.

