nano-tech-diagrams
Create and edit tech diagrams via a nano-tech-diagrams MCP server (Nano Banana 2 through Fal AI). Text-to-image, image-to-image, whiteboard cleanup, and 28+ style presets. Requires an externally configured MCP server — this plugin does not ship one. Use when the user wants a technical diagram generated or cleaned up.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- nano-tech-diagrams
- description
- Create and edit tech diagrams via a nano-tech-diagrams MCP server (Nano Banana 2 through Fal AI). Text-to-image, image-to-image, whiteboard cleanup, and 28+ style presets. Requires an externally configured MCP server — this plugin does not ship one. Use when the user wants a technical diagram generated or cleaned up.
- allowed-tools
- Bash(curl *), Bash(test *), Bash(file *), Bash(mkdir *), Bash(rm *), Read, Write
03 SKILL.md 正文
Nano Tech Diagrams
This skill drives a nano-tech-diagrams MCP server to create and transform tech diagrams using Fal AI's Nano Banana 2 model.
Prerequisite: the MCP server is not bundled
This plugin does not ship or configure any MCP server. Before this skill can do anything, the user must have configured, in their coding tool's MCP settings (.mcp.json for Claude Code or Cursor, ~/.codex/config.toml for Codex, opencode.json for OpenCode):
- A nano-tech-diagrams server exposing
list_styles,list_diagram_types,whiteboard_cleanup,image_to_image, andtext_to_image. - If that server runs anywhere other than the local machine, an S3-compatible object store server (e.g. MinIO) exposing a presign tool, used for file staging below.
Tool names are namespaced by whatever the user called their server, so they take the shape mcp__<server-name>__nano-tech-diagrams__* and mcp__<store-name>__presign_url. Resolve the actual names from the tools available in session rather than assuming any particular deployment.
If neither server is configured, say so and stop. There is no local fallback — Nano Banana 2 is a hosted model.
File Staging
Skip this section entirely when the MCP server runs on the same machine as the files and accepts local paths.
When the server runs remotely it cannot read local file paths, and a local-path call fails with ENOENT. For any tool that takes an image_path, upload the file to the object store and pass a presigned GET URL instead — the MCP accepts http(s) URLs directly.
Ask the user for the staging bucket name the first time; do not assume one.
Staging workflow:
- Presign a PUT URL:
presign_url(bucket="<staging-bucket>", key="staging/<filename>", method="put") - Upload:
curl -sSf -X PUT -T "/local/path/to/image.jpg" "$put_url" \ || { echo "Upload failed — check the presigned URL has not expired" >&2; exit 1; }-fmatters: without it curl exits 0 on an HTTP error and the pipeline proceeds with a URL that serves nothing. - Presign a GET URL for the same key (
method="get") and pass it asimage_pathto the MCP tool. - Presigned URLs are short-lived (commonly 1 hour; check the
expiresparam). If a call fails with a 403 orSignatureDoesNotMatch, re-presign rather than retrying the stale URL. Objects in a*-transientstyle bucket typically expire on a lifecycle policy — do not treat staged files as durable storage.
Batch staging:
For multiple files, repeat the presign-PUT/curl/presign-GET cycle per file (presign calls can be batched), collect the URLs, then call the MCP tools. If any upload fails, record which file and continue with the rest; report the failures at the end.
When staging is NOT needed:
text_to_image— no input image required- When
image_pathis already anhttp://orhttps://URL (Fal media, any public host)
Saving output locally
The MCP returns a fal.media URL. If the server has a download_to parameter, note that it writes to the server's filesystem — which is not the local one when the server is remote. Download the returned URL directly:
curl -fsSL -o "/absolute/local/path/output.png" "$fal_url" \
|| { echo "Download failed — the fal.media URL may have expired" >&2; exit 1; }
file "/absolute/local/path/output.png"
Keep -f and verify with file before reporting success: without them a expired-link HTML error page lands on disk named .png and is reported as a generated diagram.
Available Tools
| Tool | Purpose |
|---|---|
list_styles |
Show all 28+ visual style presets (key, name, category, default aspect ratio) |
list_diagram_types |
Show all diagram type presets (network, flowchart, mind map, etc.) |
whiteboard_cleanup |
Clean up a whiteboard photo into a polished diagram |
image_to_image |
Transform an existing image into a styled tech diagram |
text_to_image |
Generate a diagram from a text description (no input image) |
Defaults
- Model: Nano Banana 2 (baked in, not configurable)
- Resolution: 1K (default)
- Reasoning: Minimal (default)
- Output format: PNG
- Aspect ratio: auto (pass as parameter to override)
Workflow
For whiteboard cleanup:
- Stage the image if the server is remote (presign PUT,
curl -T, presign GET; see "File Staging" above) - Optionally ask about style preference — default is
clean_polished - Call
whiteboard_cleanupwith the presigned URL asimage_path - If domain-specific terms are present, pass them as
dictionary_wordsfor accurate spelling - Download the returned
fal.mediaURL locally (see "Saving output" above) (see "Saving output" above)
For image-to-image transformation:
- Stage the image if the server is remote (presign PUT,
curl -T, presign GET; see "File Staging" above) - Determine what transformation is needed: style change, diagram type conversion, or custom prompt
- Call
image_to_imagewith at least one of:prompt,style, ordiagram_type, and the presigned URL asimage_path - Common combos:
style=blueprint+diagram_type=network_diagram - Download the returned
fal.mediaURL locally (see "Saving output" above)
For text-to-image generation:
- Get the user's description of what diagram they want
- Pick an appropriate
diagram_typeif it matches a preset - Pick a
styleif the user has a visual preference - Call
text_to_image— no staging needed (no input image) - Download the returned
fal.mediaURL locally (see "Saving output" above)
Style Categories
- Professional: clean_polished, corporate_clean, hand_drawn_polished, minimalist_mono, ultra_sleek, blog_hero
- Creative: colorful_infographic, comic_book, isometric_3d, neon_sign, pastel_kawaii, pixel_art, stained_glass, sticky_notes, watercolor
- Technical: blueprint, dark_mode, flat_material, github_readme, photographic, terminal_hacker, visionary
- Retro & Fun: chalkboard, psychedelic, mad_genius, retro_80s, woodcut
- Language: bilingual_hebrew, translated_hebrew
Diagram Types
- Infrastructure: network_diagram, cloud_architecture, kubernetes_cluster, server_rack
- Software: system_architecture, microservices, api_architecture, database_schema
- Process: flowchart, decision_tree, sequence_diagram, state_machine, pipeline
- Conceptual: mind_map, wireframe, gantt_chart, comparison_table, org_chart
Notes
- For batch processing, call tools sequentially to avoid API rate limits
- The
dictionary_wordsparameter helps with domain-specific terminology (e.g., ["Kubernetes", "Proxmox", "PostgreSQL"]) - Aspect ratio options: auto, 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 9:21
- Resolution options: 0.5K, 1K (default), 2K, 4K
- Staging buckets are usually configured with a short object lifecycle and presigned URLs with a ~1-hour TTL. Both are properties of the user's own deployment, not of this skill — check them if calls start failing mid-batch.
- Every MCP call can fail (rate limit, model error, expired credential). Surface the server's error text to the user rather than retrying blindly; only presigned-URL expiry is worth an automatic re-presign and one retry.
04 同仓库更多 Skills
no-description
暂无简介
good-skill
Fixture skill that satisfies every rule.
broken-link
Links to a reference file that does not exist.
Bad_Name
Name violates the kebab-case rule and does not match the directory.
skill-authoring
Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.
weigh-bags
Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts/reconcile.py.