
Graph Colorize
Auto-generate Obsidian graph colorGroups from your vault’s tags, folders, or visibility rules so the graph view is readable at a glance.
Install
npx skills add https://github.com/ar9av/obsidian-wiki --skill graph-colorizeWhat is this skill?
- Rewrites `.obsidian/graph.json` `colorGroups` from real vault tags, folders, or visibility
- Uses Obsidian search syntax queries (`tag:#foo`, `path:"concepts"`, etc.) with first-match wins
- Merges into existing graph.json without clobbering unrelated graph settings
- Always backs up graph.json before edits
- Resolves vault path via obsidian-wiki config protocol (`.env`, `~/.obsidian-wiki/config`, or setup prompt)
Adoption & trust: 1.7k installs on skills.sh; 1.8k GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Grill Memattpocock/skills
Grill With Docsmattpocock/skills
Brainstormingobra/superpowers
Lark Tasklarksuite/cli
Lark Workflow Standup Reportlarksuite/cli
Cavemanjuliusbrussee/blueprint
Journey fit
Primary fit
Documentation and knowledge-base tooling sits in Build because solo builders maintain living notes and specs alongside the product. Docs subphase fits vault graph styling—visual structure for notes, tags, and paths—not runtime code.
Common Questions / FAQ
Is Graph Colorize safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Graph Colorize
# Graph Colorize — Color-code the Obsidian Graph View You are rewriting `$OBSIDIAN_VAULT_PATH/.obsidian/graph.json` so Obsidian's graph view tints nodes by tag, folder, or visibility. Obsidian stores graph settings in `<vault>/.obsidian/graph.json`. The `colorGroups` array is a list of `{query, color}` pairs; the first matching query wins per node. Queries use Obsidian's search syntax: `tag:#foo`, `path:"concepts"`, `file:foo`, etc. Color is `{"a": 1, "rgb": <packed-int>}` where the int is `(R << 16) | (G << 8) | B`. ## Before You Start 1. **Resolve config** — follow the Config Resolution Protocol in `llm-wiki/SKILL.md` (walk up CWD for `.env` → `~/.obsidian-wiki/config` → prompt setup). This gives `OBSIDIAN_VAULT_PATH`. 2. Confirm `$OBSIDIAN_VAULT_PATH/.obsidian/` exists. If it doesn't, the vault has never been opened in Obsidian — tell the user to open the vault once in Obsidian, then re-run. 3. **Warn the user if Obsidian is likely open**: Obsidian overwrites `graph.json` on close. Tell them to close the vault first, or be ready to reload (Cmd/Ctrl+R) and not touch the graph settings until they reload. ## Step 1: Pick a Mode Infer the mode from the user's phrasing. If ambiguous, default to **by-tag**. | User intent | Mode | |---|---| | "color by tag", "color my graph", "make it colorful" (default) | `by-tag` | | "color by folder", "color by category", "color by directory" | `by-category` | | "highlight visibility", "show internal/pii in graph", "visibility colors" | `by-visibility` | | User provides explicit mapping (`tag:#foo = red`, or JSON blob) | `custom` | | "combine tag and visibility" / "both" | `combined` (visibility first, then tag) | ## Step 2: Build the `colorGroups` Array ### Palette (10 distinct, colorblind-friendly colors) Use in order. If more groups than colors, cycle and add a lightness shift by dividing brightness ~20% via a second pass — or just cap at 10 and tell the user the remaining tags share the "other" color. | # | Hex | rgb (packed int) | Role | |---|---|---|---| | 0 | `#4E79A7` | `5142951` | blue | | 1 | `#F28E2B` | `15896107` | orange | | 2 | `#E15759` | `14767961` | red | | 3 | `#76B7B2` | `7780786` | teal | | 4 | `#59A14F` | `5873999` | green | | 5 | `#EDC948` | `15583048` | yellow | | 6 | `#B07AA1` | `11565217` | purple | | 7 | `#FF9DA7` | `16751527` | pink | | 8 | `#9C755F` | `10253663` | brown | | 9 | `#BAB0AC` | `12234924` | gray | Every color is wrapped as `{"a": 1, "rgb": <int>}`. ### Mode: `by-tag` 1. Glob `$VAULT_PATH/**/*.md` excluding `_archives/`, `_raw/`, `.obsidian/`, `node_modules/`, `index.md`, `log.md`, `_insights.md`. 2. Parse frontmatter `tags` from each page. Count usage per tag. 3. **Drop `visibility/*` tags** from the frequency list — they are reserved system tags, handled only in `by-visibility` or `combined` mode. 4. Take the top 10 tags by usage. If there are fewer than 10 unique tags, use all of them. 5. For each tag `T` at index `i`: emit `{"query": "tag:#T", "color": palette[i]}`. 6. Optionally, append a final catch-all entry for untagged pages at the end: `{"query": "-[\"tag\":]", "color": palette[9]}` — **skip** if color slot 9 is already taken by a real tag. ### Mode: `by-category` Use the seven vault top-level folders in this fixed order so colors are stable across runs: | Folder | Color index | |---|---| | `concepts` | 0 (bl