By ideamans
Adds /gg-render, /gg-icons, and /gg-author skills for authoring grid-based diagrams with gridgram.
Compose a new gridgram diagram from a description. Use when the user asks you to draw, design, sketch, diagram, or visualize a system / architecture / flow as a gridgram. Produces a .gg file and renders it. Pulls icon picks via the gg-icons workflow and validates via gg-render before handing the file back.
Find the right built-in Tabler icon for a gridgram diagram. Use when the user asks to pick an icon, find an icon, suggest icons for a concept, list icons by tag or category, or decide whether to use the outline or filled style. gridgram ships 5,039 outline + 1,053 filled Tabler icons, searchable via the `gg icons` CLI.
Install or update the gg gridgram CLI from the latest GitHub release. Use when the user asks to install gridgram, set up gg, update / upgrade gg to the newest version, or when another gridgram skill reports that `gg` is missing from PATH. Detects OS + arch, picks the right release archive, tries a writable directory on PATH (e.g. ~/.local/bin, /usr/local/bin), and falls back to dropping the binary in /tmp with a sudo hint when every candidate is read-only.
Render a .gg file to SVG, PNG, or a JSON envelope using the gridgram CLI. Use when the user asks to render, build, compile, or preview a gridgram diagram, or when they want to validate a .gg file and see its placement diagnostics. Also use when given a TypeScript DiagramDef and asked to produce an image.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Grid-based diagram rendering — describe a diagram as a TypeScript
DiagramDef or a .gg text file, get a clean SVG. Built on Preact SSR;
runs in modern browsers and in Node.
import { tablerOutline, renderDiagramSvg, type DiagramDef } from 'gridgram'
const def: DiagramDef = {
nodes: [
{ id: 'user', src: tablerOutline('user'), label: 'User' },
],
}
const svg = renderDiagramSvg(def)
Or embed it directly in your Preact JSX:
import { Diagram } from 'gridgram'
export function ArchitectureDiagram() {
return <Diagram def={def} renderWidth={1024} />
}
Two surfaces share one pipeline:
npm install gridgram) — this package. SVG only.gg CLI — a single-binary build of the same engine that also
emits PNG (via sharp). Install from
GitHub Releases.npm install gridgram
# or
bun add gridgram
Requires an ESM environment. preact and preact-render-to-string are
peer-ish runtime deps resolved through your bundler (Vite, webpack,
esbuild, Rollup, Bun, Node ≥22 ESM, …).
import {
renderDiagram,
tablerOutline,
type DiagramDef,
} from 'gridgram'
const def: DiagramDef = {
nodes: [
{ id: 'user', pos: 'A1', src: tablerOutline('user'), label: 'User' },
{ id: 'web', pos: 'B1', src: tablerOutline('world'), label: 'Web' },
{ id: 'db', pos: 'C1', src: tablerOutline('database'),label: 'DB' },
],
connectors: [
{ from: 'user', to: 'web', label: 'request' },
{ from: 'web', to: 'db', label: 'query' },
],
}
const { svg, diagnostics } = renderDiagram(def, { renderWidth: 1024 })
// svg: a standalone <svg …>…</svg> string
// diagnostics: [] on clean layouts; non-empty when labels / connectors
// couldn't be placed cleanly
| Export | Shape | Use when |
|---|---|---|
renderDiagram | (def, opts?) => { svg, diagnostics } | Default choice. You want the SVG plus layout feedback. |
renderDiagramSvg | (def, opts?) => string | You only need the SVG. |
Diagram | Preact functional component (<Diagram def={…} />) | Embedding in a Preact app. |
buildDiagramTree | (def, opts?) => VNode | Embedding the VNode without going through renderToString. |
tabler, tablerOutline, tablerFilled, tablerHas | Icon lookups by name (e.g. 'user', 'arrow-right') | Using Tabler icons as node src. |
BADGE_PRESETS, expandBadges | Named corner-badge presets + expander | Decorating nodes with status badges. |
defineConfig, resolveSettings, SYSTEM_DEFAULTS | Layered settings merge | Shared defaults across many diagrams. |
Every type used in DiagramDef (NodeDef, ConnectorDef, RegionDef,
NoteDef, DiagramTheme, GridPos, GridSpan, …) is re-exported.
renderDiagram(def, opts) / <Diagram def={…} …opts /> accepts:
| Option | Type | Description |
|---|---|---|
renderWidth | number | Final output width in px; height scales with aspect. |
cellSize | number | Pixel size of one grid cell (default 256). |
padding | number | Inner padding in px. |
columns, rows | number | Force the grid size (otherwise inferred from node positions). |
theme | partial | Deep-merged against the built-in theme (primary, accent, bg, …). |
suppressErrors | boolean | Hide the red-tint markers drawn when a label can't be placed cleanly. |
opts is merged on top of any settings the DiagramDef embeds
(def.cellSize, def.theme, …), so you can set project-wide defaults
on the def and override per-call.
gridgram ships the Tabler icon set
(5500+ outline, 1200+ filled) with zero setup:
import { tablerOutline, tablerFilled } from 'gridgram'
tablerOutline('user') // '<g fill="none" stroke="currentColor">…</g>'
tablerFilled('star') // filled variant, or undefined if none exists
Or use any raw SVG string / Preact VNode as src on a node — gridgram
doesn't care where the icon came from.
npx claudepluginhub ideamans/claude-public-plugins --plugin gridgramHarness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Binary reverse engineering, malware analysis, firmware security, and software protection research for authorized security research, CTF competitions, and defensive security
v9.44.1 — Patch release for Gemini environment/version detection and qwen auth gating. Run /octo:setup.
Next.js development expertise with skills for App Router, Server Components, Route Handlers, Server Actions, and authentication patterns
Comprehensive .NET development skills for modern C#, ASP.NET, MAUI, Blazor, Aspire, EF Core, Native AOT, testing, security, performance optimization, CI/CD, and cloud-native applications