reading-tree

A skill for turning an article or book chapter into an interactive outline tree linked to the full text in reading order.

In plain words
What is it for?
Building searchable reading interfaces where clicking an outline item highlights its paragraphs and clicking a paragraph returns to the matching outline node.
Why use it?
It preserves the source's sequence and connects outline nodes with the paragraphs they cover, so readers can move between structure and detailed text.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/modelvoyager/readingtree/reading-tree
Any agent
npx skills add ModelVoyager/ReadingTree --skill reading-tree
Clone the repo
git clone --depth 1 https://github.com/ModelVoyager/ReadingTree

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,884 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.01884
Opus 5 $0.00022 $0.00942
Sonnet 5 $0.00009 $0.00377
Haiku 4.5 $0.00004 $0.00188

Measured yesterday against content hash d858a6a65903, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reading-tree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 3 executable files (assets/workspace-template/site/app.js, scripts/build.py, scripts/validate.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

reading-tree/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Reading Tree

Use this skill when the user wants to transform an article or chapter into a linked reading interface:

  • The tree must preserve the source order.
  • Clicking a node must jump to and highlight the covered source paragraphs.
  • Clicking a source paragraph must jump back to the best matching node.
  • The result must stay suitable for full reading, not just skimming.

Outcome

Produce a workspace that can build:

  • site/data/source.js
  • site/data/tree-data.js
  • a static interactive site in site/

The generated site includes:

  • bidirectional node/paragraph linking for reading
  • global search where text and outline labels use JavaScript regex, while roles stay plain
  • AND as the default search operator, with explicit uppercase OR
  • optional field prefixes such as role:example

Shared tooling lives in scripts/. For online tools such as ChatGPT or Claude.ai that cannot serve the generated UI directly, provide a .zip archive of the full site/ folder and tell the user to extract it and open site/index.html in a browser. Do not hand off only index.html, because it depends on sibling assets. The default site template opens locally, but it is not fully self-contained in the strict offline/privacy sense: when online, it requests Google Fonts for typography. If those requests are blocked, the browser falls back to local serif fonts and the UI still works.

The reusable workspace scaffold lives in assets/workspace-template/.

Workflow

  1. Copy assets/workspace-template/ into a fresh workspace.
  2. Save the source text as article.txt, preserving the original paragraph boundaries by default. Prefer one source paragraph per line. Only split one original paragraph into multiple lines when it is very long or contains an obvious internal semantic shift.
  3. Inspect article.txt with real line numbers from the terminal, for example nl -ba article.txt.
  4. For long files, inspect windows such as sed -n '120,180p' article.txt | nl -ba -v120 instead of counting lines in model context.
  5. Create splits.json with semantic paragraph start lines only. If article.txt already uses one source paragraph per line, the split list will often start on every non-empty line.
  6. Run python3 reading-tree/scripts/build.py <workspace> --step source and inspect site/data/source.js.
  7. Create tree.json after the paragraph split is stable. Every node must declare at least one non-empty broad role via roles.
  8. Run a structure audit against references/authoring.md, especially Breadth Control and Final Structure Check.
  9. Materialize that review as a markdown table before continuing. Use one row per non-leaf sibling group in tree order so grouping choices are explicit. Top-level nodes are mandatory rows.
  10. Regroup until the structure audit table is clean. 6 is a ceiling, not a target for normal-length texts. For substantially longer texts, treat the breadth numbers as defaults rather than hard caps, but justify any exception in the audit table.
  11. Prefer adding intermediate grouping nodes over coarsening paragraph splits when reducing breadth.
  12. During structural iteration, run python3 reading-tree/scripts/validate.py <workspace> after each structural edit as cheap feedback.
  13. Run a mandatory final label lint pass against references/authoring.md, especially the Meaning Fidelity Check and Final Label Check sections. Inspect every node label one by one in tree order.
  14. Materialize that review as a markdown table before continuing. Use one row per label, and include both style columns and meaning-fidelity columns from references/authoring.md, plus the roles columns for every row. Treat the table as the required reasoning scaffold, not as optional presentation.
  15. Rewrite every weak or semantically overstated label before continuing. Update the table until every row passes. Do not continue if even one row still fails.
  16. After the structure audit table and label audit table are both clean, run python3 reading-tree/scripts/validate.py <workspace> again as the required final validation pass.
  17. Run python3 reading-tree/scripts/build.py <workspace> --step all.
  18. To inspect or hand off the result, note that site/index.html can be opened directly in a browser, or cd site/ and serve it with python3 -m http.server 8000 --bind 127.0.0.1. For online tools such as ChatGPT or Claude.ai that cannot serve the UI themselves, provide a .zip archive of the full site/ folder and instruct the user to extract it and open site/index.html. Do not provide only index.html. Also mention that the default template requests Google Fonts when online; if those requests are blocked, the browser falls back to local serif fonts.
  19. If serving locally, tell the user to open http://127.0.0.1:8000/ in a browser. Only launch a browser from the agent if the user explicitly asks for that.

Read the full file on GitHub · 91 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 91 lines · 44 tokens per session scan A d858a6a65903

Subscribe to this mod's changes

reading-tree is a skill published in the GitHub repository ModelVoyager/ReadingTree (2 stars, last pushed 4mo ago), licensed MIT. It adds 44 tokens to every session and 1,884 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens