Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

graph-colorize图形着色

Agent Skill

graph-colorize 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

8,424

周安装

351

GitHub Stars

801

下载量

2,808
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:graph-colorize(图形着色)
来源仓库:https://github.com/ar9av/obsidian-wiki
仓库路径:skills/graph-colorize
安装命令:
npx skills add https://github.com/ar9av/obsidian-wiki --skill graph-colorize
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ar9av/obsidian-wiki --skill graph-colorize

简介

graph-colorize 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 它能帮助 Agent 搜索图着色方案、匹配可视化工具或复用配色策略。
  • 通过 npx skills add 命令从指定仓库安装,具体用法请参考原始 README。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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. Read ~/.obsidian-wiki/config, or fall back to .env in this repo, to get 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 intentMode
"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.

#Hexrgb (packed int)Role
0#4E79A75142951blue
1#F28E2B15896107orange
2#E1575914767961red
3#76B7B27780786teal
4#59A14F5873999green
5#EDC94815583048yellow
6#B07AA111565217purple
7#FF9DA716751527pink
8#9C755F10253663brown
9#BAB0AC12234924gray

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:

FolderColor index
concepts0 (blue)
entities1 (orange)
skills2 (red)
references3 (teal)
synthesis4 (green)
projects5 (yellow)
journal6 (purple)

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>}}

Mode: by-visibility

Emit exactly three entries, in this order (first-match wins, so most restrictive comes first):

  1. visibility/pii#E15759 (red, rgb 14767961)
  2. visibility/internal#F28E2B (orange, rgb 15896107)
  3. 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.

Mode: combined

Emit by-visibility entries first, then by-tag entries. Visibility wins on conflict because it appears first in the list.

Mode: custom

If 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>}.

Step 3: Merge into graph.json (Do Not Clobber)

  1. 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}
  2. 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.
  3. 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.
  4. Write the file back with the same JSON style as the original (usually compact single-line or 2-space indent — preserve what's there).

Step 4: Report and Log

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>

Edge Cases

  • No tags in vault in by-tag mode → fall back to by-category and tell the user.
  • User wants to undo → restore from the latest graph.json.backup-* and note that in log.md.
  • User wants to clear all color groups → set 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.
  • Query syntax gotchas: folder paths with spaces need quoting (path:"my folder"); tags with nested slashes work literally (tag:#visibility/internal); don't URL-encode.
  • Obsidian open during edit: surface the risk — Obsidian reads graph.json at startup and rewrites it on close. If the user is editing live, tell them to close Obsidian first or run the reload (Cmd/Ctrl+R) immediately and avoid opening graph settings before they do.

Notes

  • This is a pure config edit — no page content changes, no frontmatter writes.
  • Re-running is safe: each run creates a new backup, only colorGroups is rewritten.
  • If the user has manually curated color groups they want to keep, offer combined mode or ask before overwriting.
  • The palette here matches wiki-export's graph.html community colors, so the Obsidian graph and the exported visualization look consistent.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.95%
按下载量换算1,009

Claude

26.97%
按下载量换算757

Cursor

19.42%
按下载量换算545

Gemini CLI

8.91%
按下载量换算250

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills