Highlight Graph logo

Highlight Graph

Organization
readwiseio
highlight-graph

Visualize your highlights and their connections in an interactive 2D graph

Overview

Publisherreadwiseio
Repositoryreadwise-skills
Skill namehighlight-graph
Stars
324
Forks
13
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by readwiseio on GitHub. Read the source before you install it.

Installation

Install the Highlight Graph AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/readwiseio/readwise-skills/tree/master/skills/highlight-graph
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/readwiseio/readwise-skills.git /tmp/readwise-skills
mkdir -p .claude/skills
cp -r /tmp/readwise-skills/skills/highlight-graph .claude/skills/highlight-graph
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Highlight Graph in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Highlight Graph on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Highlight Graph is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

You are building an interactive 2D force-graph visualization of the user's Readwise highlights, showing how ideas connect across books, articles, and other sources. Think Obsidian's graph view, but for highlights.

Readwise Access

Check if Readwise MCP tools are available (e.g. mcp__readwise__readwise_list_highlights). If they are, use them throughout. If not, use the equivalent readwise CLI commands instead.

Process

Step 1: Fetch Highlights

Open with:

Highlight Graph · Readwise

I'll pull your recent highlights, find connections between them, and build a graph you can explore. Give me a moment.

Fetch the user's most recent highlights using readwise_list_highlights with page_size=100. Fetch 2 pages (200 highlights) for a good starting graph. Each page returns highlights from most recent to least recent — use page=1, then page=2.

Step 2: Prepare Highlight Data

Parse the API responses and build a JSON array of highlights. Each highlight needs:

json
{
  "id": "12345",
  "text": "The actual highlight text...",
  "note": "User's note if any",
  "book_id": 58741401,
  "source_title": "The Goal",
  "source_author": "Eliyahu Goldratt",
  "url": "https://..."
}

Important: The Readwise API returns book_id but does NOT return the book/article title or author with each highlight. You must identify the source title and author yourself by reading the highlight texts and any available metadata (URLs, content patterns). Group highlights by book_id and infer the source from context. It's fine to use "Unknown" for author when unsure, but try to identify the title.

Write this array to a temp file: /tmp/highlights.json

Step 3: Initial Render (No Connections)

Write an empty connections file and run the build script to give the user something to look at immediately:

bash
echo '[]' > /tmp/connections.json
python3 SKILL_DIR/build_graph.py --highlights /tmp/highlights.json --connections /tmp/connections.json --output highlight-graph.html
open highlight-graph.html

Tell the user:

Graph is open with {N} highlights across {N} sources. Finding connections between ideas now...

Step 4: Find Cross-Source Connections

Launch parallel subagents (3-5 agents) to find semantic connections between highlights from different sources. Each agent should analyze a batch of highlights and return connections.

Batching strategy:

  1. Group highlights by source (book_id).
  2. Split sources into batches of ~8 sources each.
  3. For each batch pair (including within-batch), launch an agent with the highlight texts from those sources.
  4. Each agent should find 5-10 genuine conceptual connections — shared themes, ideas, or language across different sources.

Each agent should return a JSON array of connections:

json
[
  {
    "a_id": "12345",
    "b_id": "67890",
    "label": "Feedback loops",
    "why": "Both highlights discuss how tight feedback loops improve quality"
  }
]

Quality over quantity. Only create connections when the link is real and would be interesting. 15-30 total cross-source connections for 200 highlights is ideal.

Step 5: Rebuild with Connections

Merge all agent results into a single connections JSON array, write to /tmp/connections.json, and re-run the build script:

bash
python3 SKILL_DIR/build_graph.py --highlights /tmp/highlights.json --connections /tmp/connections.json --output highlight-graph.html
open highlight-graph.html

Present a summary:

Built a graph of {N} highlights across {N} sources, with {N} connections between ideas.

A few interesting connections I found:

  • "{highlight A snippet}" ↔ "{highlight B snippet}" — {connection label}
  • ...

The graph is open in your browser. Want to add more highlights?

Step 6: Iterate

  • More highlights: Fetch additional pages (page=3, page=4, etc.), re-run source identification, find new connections, rebuild.
  • Filter by topic: Use readwise_search_highlights to pull highlights on a specific topic or from a specific book, rebuild with just those.

The Build Script

build_graph.py (in this skill's directory) handles all the visualization logic. It takes two JSON files and outputs a self-contained HTML file:

python3 build_graph.py --highlights highlights.json --connections connections.json --output output.html

highlights.json: Array of {id, text, note, book_id, source_title, source_author, url} connections.json: Array of {a_id, b_id, label, why}

The script handles:

  • Deduplication and filtering of highlights
  • Color assignment per source (rose-pine palette)
  • Same-source full pairwise connectivity (all highlights from same book linked)
  • Cross-source semantic connections (dashed purple edges with particles)
  • Interactive sidebar panel with connected ideas and same-book highlights
  • Label overlap prevention
  • Screen-relative text scaling (consistent size at any zoom level)
  • Source legend with click-to-filter
  • Hover isolation and selection persistence

The output is a single HTML file using force-graph from CDN. No server needed — just open in a browser.

SKILL_DIR

Replace SKILL_DIR in commands above with the actual path to this skill's directory (where build_graph.py lives).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Highlight Graph AI skill do?

Visualize your highlights and their connections in an interactive 2D graph

Why use Highlight Graph on TypingMind?

Because you install it once and use it with any model. Highlight Graph is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Highlight Graph in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/readwiseio/readwise-skills/tree/master/skills/highlight-graph. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Highlight Graph?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Highlight Graph?

As many as you like. As long as a model supports skills, you can use Highlight Graph with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Highlight Graph AI skill free?

It is published on GitHub by readwiseio. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇