gitbook-import

gitbook-import is a skill for Claude Code, Codex from tonydzi/second-brain-starter-kit. It costs 81 tokens per session (1,264 once invoked), scanned A, original, MIT.

An importer that turns a GitBook space—a set of hosted company documents or a whitepaper—into linked notes in an Obsidian vault, a local knowledge base. It can refresh the supported space without creating duplicate notes.

In plain words
What is it for?
Use it to import the supported Palo Alto/AAA GitBook space into Obsidian. Other spaces require changing the included scripts or using a general importer.
Why use it?
It avoids copying pages by hand and preserves links between topics while bringing the documentation into a searchable note system.

Skill for Claude CodeCodex

Part of the second-brain-skills plugin — 57 skills shipped together

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/tonydzi/second-brain-starter-kit/gitbook-import
Any agent
npx skills add tonydzi/second-brain-starter-kit --skill gitbook-import
Clone the repo
git clone --depth 1 https://github.com/tonydzi/second-brain-starter-kit

Made for: Claude Code, Codex.

Or install second-brain-skills, the plugin that ships this one along with the rest of its 57 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gitbook-import

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/gitbook-import.svg)](https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/gitbook-import)
Your own site
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/gitbook-import"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/gitbook-import.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 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.00081 $0.01264
Opus 5 $0.00041 $0.00632
Sonnet 5 $0.00016 $0.00253
Haiku 4.5 $0.00008 $0.00126

Measured 3d ago against content hash 888cbf9eb94b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gitbook-import 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 3d ago.

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.

skills/gitbook-import/SKILL.md · 47 lines

How it starts

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

/gitbook-import — GitBook space → vault

🧒 When reporting to Anton end with a child-simple "In plain words" recap. (memory eli5-always)

Turns a live GitBook space into atomic vault notes. Proven on the Palo Alto / AAA «C(H+A)RM» GitBook (85 pages, 10 chapters, 694 links, 0 broken). Pipeline + slug rules = memory [[palo-alto-gitbook-import]]. This is the GitBook source-adapter; for any other source use [[obsidian-ingest]].

Pipeline home: $IMPORTS_ROOT/gitbook/live/slugs.py (derive page URLs from TOC titles) + build_live.py (per-page notes + nav + concept links → live\md\). ⚠️ Both are TEMPLATED for the Palo-Alto / AAA space (org+space IDs, page-title list, pa-gitbook-NN slug, concepts, origin, MOC name are hardcoded; they do NOT read the <url>). So this command's clean path is refreshing the Palo-Alto GitBook. A different space = first edit those constants in the two scripts (or hand the raw pages to [[obsidian-ingest]]). There is no MOC-builder or copy-to-vault script — those steps are manual (see Steps 5–6).

Credential boundary (Anton must clear it once)

GitBook login is a boundary I can't pass alone. Anton logs into the GitBook org in Chrome (the Palo Alto org = bbplatinum Google acct), THEN I scrape. If not logged in → escalate per [[chrome-autonomy-self-drive]] (open the login page in its own window, ask Anton to sign in, then continue). Don't try to brute the login.

Steps

  1. Resolve pages: from the space URL, get the TOC; python $IMPORTS_ROOT/gitbook/live/slugs.py derives per-page URLs. GitBook slug rules: lowercase, space→-, &and, (/)-, apostrophes/quotes/$→dropped ($usd once), keep ./+/digits. Wrong slug → 404 → recover via the "Next"-link walk from the prior good page.
  2. Scrape (delegate to a Sonnet subagent — keep bulk text out of main context, [[model-routing-sonnet-grunt]]): the subagent drives Claude-in-Chrome: navigate + wait ~3s + get_page_text per page, writes each to pages\NN.txt, returns ONLY a short report (page count + any 404s).
  3. Originals first ([[preserve-originals-rule]]): copy raw pages to _originals\<space-slug>\live-pages-<date>\. Never delete.
  4. Backup ([[vault-backup-rule]]): python $IMPORTS_ROOT/vault_backup.py.
  5. Build: python $IMPORTS_ROOT/gitbook/live/build_live.py → per-page notes (pa-gitbook-NN-*) + nav + _index.json into live\md\ (a staging dir, NOT the vault). Provenance is set by the script (origin: Palo Alto Research Lab); for a non-Palo-Alto space change that constant first.
  6. Move into the vault + MOC (manual): copy the md\*.md notes to 05-Resources\<space-slug>\ and build/refresh the chapter-grouped MOC there (no script does this — by hand or via [[obsidian-ingest]]).
  7. Concept-link the NEW notes (mandatory per concept-creation-rules) — create concepts where the §1 threshold is met (≥3 repeats, noun-entity, domain-anchored); self-create, don't ask ([[capture-rules-into-bible]] reflex).
  8. Validate + reindex: link-check (expect BROKEN=0, 0 orphans), then python $IMPORTS_ROOT/brain_embed_update.py --wait-gpu 10 (or rely on nightly reindex).

Read the full file on GitHub · 47 lines

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. 3d ago First seen · 47 lines · 81 tokens per session scan A 888cbf9eb94b

Subscribe to this mod's changes

gitbook-import is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (5 stars, last pushed 4d ago), licensed MIT. It adds 81 tokens to every session and 1,264 once invoked, about $0.0004 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

ingest

Ingest a URL, file, raw text, or Inbox item into the LLM Wiki with the purpose gate, mothership link search, raw-source preservation, Wiki compilation, index/log update, and review; also responds to /ingest and 인제스트.

johnfkoo951/cmds-llm-wiki · 56 tokens

wiki-ingest

Ingest supplied source material into an Obsidian vault with provenance and claim tracking: pasted text, files staged in the selected vault's inbox or .raw archive, or explicitly approved URLs. Use for a single source or bounded batch, not for saving an assistant answer. Triggers: ingest, ingest this file, ingest this…

AgriciDaniel/claude-obsidian · 88 tokens

autoresearch

Run a bounded, source-grounded research loop, draft a cited dossier, and optionally propose a separately reviewed canonical vault merge. Use when the user wants autonomous or deep research that may access the public web. Triggers: /autoresearch, autoresearch, research this topic, deep dive into, investigate, find…

AgriciDaniel/claude-obsidian · 80 tokens

canvas

Create, inspect, and update Obsidian JSON Canvas boards with text, file, link, group, and edge nodes. Use for canvas status, canvas lists, visual maps, zones, spatial layouts, adding vault notes or media to a .canvas file, and requests such as create canvas, add to canvas, or put this on the canvas.

AgriciDaniel/claude-obsidian · 72 tokens

wiki-retrieve

Build and query a vault-local contextual BM25 retrieval index with optional multilingual Nomic cosine reranking; use for retrieve, hybrid retrieval, BM25, rerank, contextual retrieval, chunk search, vault search, semantic search, find relevant passages, or retrieval diagnostics. Derived caches stay under .vault-meta…

AgriciDaniel/claude-obsidian · 81 tokens

wiki

Initialize, adopt, and route work for a separate Obsidian knowledge vault through the portable claude-obsidian core. Use for vault setup, scaffolding, workspace selection, cross-project configuration, or choosing the correct wiki sub-skill. Triggers: /wiki, set up wiki, scaffold vault, create knowledge base, adopt…

AgriciDaniel/claude-obsidian · 84 tokens