- name
SKILL.md
Die Skill-Datei bleibt im Repository des Herausgebers.
Fügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add Ar9av/obsidian-wiki --skill graph-colorize -a cursor -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add Ar9av/obsidian-wiki --skill graph-colorize -a claude-code -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add Ar9av/obsidian-wiki --skill graph-colorize -a codex -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add Ar9av/obsidian-wiki --skill graph-colorize -a grok -ySenden Sie die kopierte Nachricht in einem Grok Bot-Chat. Der Bot ruft diese SKILL.md von GitHub ab und fügt sie den Skills hinzu, die alle Ihre Bots gemeinsam nutzen.
Install this skill: https://github.com/Ar9av/obsidian-wiki/tree/HEAD/skills/graph-colorizeVom Herausgeber
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.
llm-wiki/SKILL.md (inline @name override → walk up CWD for .env → global config → prompt setup). This gives OBSIDIAN_VAULT_PATH.$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.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.Infer the mode from the user's phrasing. If ambiguous, default to by-tag.
colorGroups ArrayUse 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.
Every color is wrapped as {"a": 1, "rgb": <int>}.
by-tag$VAULT_PATH/**/*.md excluding _archives/, _raw/, .obsidian/, node_modules/, index.md, log.md, _insights.md.tags from each page. Count usage per tag.visibility/* tags from the frequency list — they are reserved system tags, handled only in by-visibility or combined mode.T at index i: emit {"query": "tag:#T", "color": palette[i]}.{"query": "-[\"tag\":]", "color": palette[9]} — skip if color slot 9 is already taken by a real tag.by-categoryUse the seven vault top-level folders in this fixed order so colors are stable across runs:
Emit one entry per folder that exists AND contains at least one .md file. Each entry is:
{"query": "path:\"<folder>\"", "color": {"a": 1, "rgb": <int>}}
by-visibilityEmit exactly three entries, in this order (first-match wins, so most restrictive comes first):
visibility/pii → #E15759 (red, rgb 14767961)visibility/internal → #F28E2B (orange, rgb 15896107)visibility/public → #59A14F (green, rgb 5873999){"query": "tag:#visibility/pii", "color": {"a": 1, "rgb": 14767961}}
Pages with no visibility/ tag remain Obsidian's default color — do not add a catch-all.
combinedEmit by-visibility entries first, then by-tag entries. Visibility wins on conflict because it appears first in the list.
customIf the user gave explicit mappings, honor them literally. Convert any hex they give (e.g. #FF00FF) to packed int using int(hex_without_hash, 16). Wrap each as {"a": 1, "rgb": <int>}.
Read the existing $VAULT_PATH/.obsidian/graph.json. If it doesn't exist, start from this minimal default:
{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": false,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 1,
"close": true
}
Back up first: copy the existing file to .obsidian/graph.json.backup-<YYYYMMDD-HHMM> before writing. If a backup from the same minute exists, reuse it — don't pile up duplicates.
Replace only the colorGroups field with your new array. Leave every other field untouched. This preserves the user's zoom, physics, filter, search, and display preferences.
Write the file back with the same JSON style as the original (usually compact single-line or 2-space indent — preserve what's there).
Print a summary like:
Graph colorized → .obsidian/graph.json
Mode: by-tag
Groups: 7 color assignments
Palette: blue, orange, red, teal, green, yellow, purple
Backup: .obsidian/graph.json.backup-20260424-1432
Reload Obsidian (Cmd/Ctrl+R) to see the new colors.
If Obsidian is currently open, close it first OR reload immediately — Obsidian
overwrites graph.json on close and can erase these changes.
Append to $VAULT_PATH/log.md:
- [TIMESTAMP] GRAPH_COLORIZE mode=<mode> groups=<N> backup=graph.json.backup-<stamp>
by-tag mode → fall back to by-category and tell the user.graph.json.backup-* and note that in log.md.colorGroups: [], back up, log as GRAPH_COLORIZE mode=clear..obsidian/ missing → the vault hasn't been opened in Obsidian yet. Tell the user to open it once, then re-run. Don't create .obsidian/ yourself — Obsidian populates many files there on first open.path:"my folder"); tags with nested slashes work literally (tag:#visibility/internal); don't URL-encode.colorGroups is rewritten.combined mode or ask before overwriting.wiki-export's graph.html community colors, so the Obsidian graph and the exported visualization look consistent.>
---name: graph-colorizedescription: >---# skills/graph-colorize/SKILL.mdFAQ
Laden Sie skills/graph-colorize/SKILL.md vom Herausgeber herunter oder kopieren Sie den Pfad und öffnen Sie das Repository. PlugMCP listet den Skill und hostet die Datei nicht.
Der Herausgeber pflegt es unter https://github.com/Ar9av/obsidian-wiki.
Claude, Cursor, Codex und Grok Build können eine SKILL.md lesen, die Sie aus dem Repository des Herausgebers hinzufügen. Grok Bot installiert sie, wenn Sie den Link zum GitHub-Ordner des Skills in einem Chat senden.