agentleFS
skyllwtskyllwt/AutoSci/.claude/skills/visualize/SKILL.md

visualize

Skill1.7k starsChanged 2 months agoMITView on GitHub

Generate and update visualization artifacts — Obsidian graph config and Canvas knowledge maps. The interactive web graph view lives in the SPA at app/modules/graph.js (served by tools/serve.py).

27 other projects use a version of this.

Trending

Quiet since June.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 4 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the skyllwt/AutoSci repository that our weekly crawl found: only 5 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

Used with

Projects with it also use teach and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AWSSkill

    teach

    Teach the user a new skill or concept, within this workspace.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check that wiki/graph/edges.jsonl exists and is non-empty.

    line 59
  2. Very specific:

    If the user passed --focus <node_id> explicitly, use it as-is.

    line 86
  3. Very specific:

    2+ files: ask the user via AskUserQuestion to pick one.

    line 94
  4. Very specific:

    If --types is set, drop nodes not in the list and drop edges whose source or target was dropped.

    line 145
  5. Very specific:

    If --edge-types is set, drop edges not in the list.

    line 146
  6. Very specific:

    If the port is free, start the server in the background via the Bash tool with run_in_background: true (not foreground — foreground would …

    line 166
  7. Very specific:

    Do not spawn an Agent subagent for this — agents are not designed for long-running services, and the server may die when the agent returns.

    line 174
  8. Very specific:

    Never edit wiki/graph/ manually — only read from it

    line 242
  9. Distinctive:

    No external Python dependencies required (stdlib only)

    line 246
  10. Distinctive:

    wiki/canvases/ missing: create directory before writing

    line 258

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/visualize

Generate visualization artifacts for the OmegaWiki knowledge graph. Produces Obsidian graph config (color groups by entity type) and curated Canvas views with labeled typed edges. For interactive web exploration use the SPA Graph view (tools/serve.py, then #/graph).

Inputs

  • --obsidian (optional): Generate/update .obsidian/graph.json with entity-type color groups
  • --canvas (optional): Generate Obsidian Canvas (.canvas) from graph data with labeled edges
  • --focus <node_id> (optional): Center canvas on a specific node (e.g., methods/my-method)
  • --depth N (optional): BFS depth for focused canvas (default: 2)
  • --types <list> (optional): Filter nodes to these page types, comma-separated (e.g., papers,concepts)
  • --edge-types <list> (optional): Filter edges to these semantic types, comma-separated (e.g., builds_on,challenges)
  • --all (optional, default if no flags): Generate all visualization artifacts

Outputs

  • wiki/.obsidian/graph.json — Obsidian graph color configuration (per-entity-type color groups)
  • wiki/.obsidian/app.json — Obsidian app settings (only if not exists)
  • wiki/canvases/knowledge-map.canvas — Full knowledge map Canvas with labeled edges
  • wiki/canvases/idea-evidence.canvas — Idea-centric subgraph Canvas
  • wiki/canvases/focus-{node-id}.canvas — Focused Canvas (when --focus is used)
  • Console output: Obsidian plugin recommendations and setup instructions

The standalone-HTML explorer (wiki/graph-view.html) was retired; the SPA Graph view at app/modules/graph.js (served by tools/serve.py) covers the same use case and lives in the same codebase as the rest of the frontend.

Wiki Interaction

Reads

  • wiki/graph/edges.jsonl — typed semantic edges
  • wiki/graph/citations.jsonl — bibliographic paper citations
  • wiki/*/ — all entity directories for page metadata (frontmatter)
  • config/visualize.json — color palette and visualization preferences

Writes

  • wiki/.obsidian/graph.json — CREATE/OVERWRITE (local-only artifact, gitignored; regenerated each run from config/visualize.json)
  • wiki/.obsidian/app.json — CREATE only (never overwrite user customizations; gitignored)
  • wiki/canvases/*.canvas — CREATE/OVERWRITE (local-only artifact, gitignored)

Workflow

Precondition: confirm working directory is the wiki project root (containing wiki/, raw/, tools/). Set WIKI_ROOT=wiki/.

Step 0: Verify graph data exists

Check that wiki/graph/edges.jsonl exists and is non-empty. If empty, report that no graph data exists yet and suggest running /ingest first.

Step 1: Generate Obsidian config (--obsidian or --all)

python3 tools/visualize.py generate-obsidian-config wiki/

Creates .obsidian/graph.json with 9 per-entity-type color groups using path:{entity_type} queries. Creates .obsidian/app.json only if it does not already exist.

Step 2: Generate Canvas views (--canvas or --all)

Step 2a — Full knowledge map

python3 tools/visualize.py generate-canvas wiki/

Layout: force-directed (no fixed center). Nodes are initially clustered by entity type, then settled via a spring–electron simulation.

Step 2b — Focused canvas

Resolve the focus node before generating:

  1. If the user passed --focus <node_id> explicitly, use it as-is. Skip the rest of this resolution.
  2. Otherwise, enumerate foundation pages: ls wiki/foundations/*.md (excluding .gitkeep).
    • 0 files: skip Step 2b entirely. No focused canvas is generated; only the full knowledge map from Step 2a is produced.
    • 1 file: auto-select that foundation as --focus (e.g. foundations/<slug>). Print the choice to the console; do not prompt.
    • 2+ files: ask the user via AskUserQuestion to pick one. List each foundation slug as an option (label = foundations/<slug>, description = the page's frontmatter title). Use the picked slug as --focus.

Then generate:

python3 tools/visualize.py generate-canvas wiki/ --focus <node_id> --depth <N>

Layout: radial concentric rings. The focus node sits at the canvas center; nodes at BFS distance d from the focus occupy ring d. Within each ring, nodes are sorted by entity type so same-type nodes cluster on the circle.

--focus BFS logic: starting from the target node, run breadth-first search over edges.jsonl + citations.jsonl, collecting all nodes and edges within --depth hops. Render only that neighbourhood subgraph. If node_id is not found, abort and list the 5 closest slug matches.

Canvas node schema:

{
  "id": "<slug>",
  "type": "file",
  "file": "<relative-path-to-md>",
  "label": "<frontmatter title>",
  "x": <int>,
  "y": <int>,
  "width": <int, base size × importance scale for papers>,
  "height": <int, base size × importance scale for papers>,
  "color": "<obsidian-color-id>"
}

The label field overrides the displayed name; older Obsidian versions that do not honour it fall back to the filename (slug). The width/height base is per entity type; for papers the size is multiplied by an importance scale (1→0.7×, 2→0.85×, 3→1.0×, 4→1.2×, 5→1.5×, default 3 when missing).

Canvas edge schema:

{
  "id": "<source>-<target>-<edge-type>",
  "fromNode": "<slug>",
  "toNode": "<slug>",
  "label": "<edge-type>"
}

If --types is set, drop nodes not in the list and drop edges whose source or target was dropped. If --edge-types is set, drop edges not in the list.

Step 3: SPA Graph view (auto-started in background)

The previous standalone-HTML explorer was retired. For interactive web exploration, the SPA backend (tools/serve.py) is started automatically by this skill — the user does not need to run python tools/serve.py manually.

Auto-start logic:

  1. Probe port 8765 to check whether the server is already running:

    python3 -c "import socket,sys; s=socket.socket(); s.settimeout(0.3); sys.exit(0 if s.connect_ex(('127.0.0.1',8765))==0 else 1)"

    Exit code 0 = port in use (server already up — skip start). Exit code 1 = port free (need to start).

  2. If the port is free, start the server in the background via the Bash tool with run_in_background: true (not foreground — foreground would block the skill indefinitely):

    python3 tools/serve.py

    Do not spawn an Agent subagent for this — agents are not designed for long-running services, and the server may die when the agent returns. The background Bash process is owned by the Claude Code session and lives for the session's lifetime.

  3. Print the SPA URL to the user:

    SPA Graph view: http://127.0.0.1:8765/#/graph

The SPA Graph view (app/modules/graph.js) is a real ES module with the same Cytoscape + force layout + filters + BFS search as the old single-page generator, plus integrated double-click navigation to the SPA Reader view. /visualize no longer regenerates wiki/graph-view.html.

Step 4: Print recommendations

python3 tools/visualize.py list-recommendations

Prints recommended Obsidian plugins (Graph Analysis, Dataview, Excalidraw) and setup instructions.

Step 5: Log

python3 tools/research_wiki.py log wiki/ "visualize | generated: [list of artifacts]"

Standard log format:

## [YYYY-MM-DD] /visualize | <format> — <n> nodes, <m> edges<focus-note>

Where <focus-note> is (focus: <node_id>, depth <N>) when --focus was used, or empty otherwise.

Color Palette

Node colors (by page_type)

page_typeHTML hexObsidian color ID
papers#4C9BE8"1"
concepts#F4A261"2"
topics#2A9D8F"3"
people#E76F51"4"
ideas#A8DADC"5"
experiments#9B5DE5"6"
methods#84CC16"3"
Summary#90BE6D"4"
foundations#B5B5B5"6"

Edge colors (HTML mode, by semantic category)

CategoryTypesHex
Similaritysame_problem_as, similar_method_to#ADB5BD
Lineagebuilds_on, extends_concept, derived_from, inspired_by#4C9BE8
Comparisonchallenges, critiques_concept#E76F51
Concept useintroduces_concept, uses_concept#F4A261
Evidencesupports, contradicts, tested_by, invalidates#9B5DE5
Gapaddresses_gap#F9C74F
Citationcites#B5B5B5

Constraints

  • Never edit wiki/graph/ manually — only read from it
  • config/visualize.json is user-owned — never overwrite it
  • .obsidian/app.json is created only if missing (respect user customizations)
  • Canvas files are regenerated on each run (idempotent overwrite)
  • No external Python dependencies required (stdlib only)
  • wiki/.obsidian/ and wiki/canvases/ are gitignored as local-only artifacts; the source of truth is config/visualize.json + wiki/graph/. /init Step 6 and direct /visualize invocations regenerate them deterministically — never commit them.

Error Handling

  • No graph data: inform user to run /ingest first to build the knowledge base
  • config/visualize.json missing: report error, file should exist at config/visualize.json
  • --focus node not found: abort with Error: node "<node_id>" not found; list 5 closest slug matches
  • No nodes after filtering: abort with summary of filters applied and types available
  • Canvas > 500 nodes: warn that large canvases may be slow; suggest --focus or --types to narrow scope
  • Entity directory missing: skip silently, only process directories that exist
  • Malformed JSONL lines: skip silently, continue processing remaining lines
  • wiki/canvases/ missing: create directory before writing

Dependencies

Tools (via Bash)

  • python3 tools/visualize.py generate-obsidian-config wiki/ — Obsidian config
  • python3 tools/visualize.py generate-canvas wiki/ [--focus <node_id>] [--depth N] — Canvas generation
  • python3 tools/visualize.py list-recommendations — Plugin recommendations
  • python3 tools/research_wiki.py log wiki/ "<message>" — append log entry
  • python3 tools/serve.py — local SPA server (Graph view at #/graph)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.