book-mirror
Ce qu’il fait
Cette skill transforme un livre en analyse personnelle, avec un résumé de chaque chapitre et une note sur son lien avec votre vie. Elle s'adresse aux lecteurs qui veulent appliquer ce qu'ils lisent.
Quand l’utiliser
- ✓Quand vous voulez une analyse chapitre par chapitre d'un livre au format EPUB ou PDF.
- ✓Quand vous voulez relier chaque chapitre à des situations et des personnes de votre propre base.
- ✓Quand vous voulez un compagnon de lecture personnel plutôt qu'un simple résumé de livre.
Lien du skill
https://github.com/garrytan/gbrain/blob/master/plugin/skills/book-mirror/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Analyse ce livre chapitre par chapitre, et relie chaque chapitre à ce qui se passe dans ma propre vie.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent lit le livre et résume chaque chapitre en détail. Il s'appuie ensuite sur vos notes pour montrer où les idées rejoignent vos propres situations, et laisse les décisions à votre charge.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
book-mirror — Personalized Chapter-by-Chapter Book Analysis
Convention: see _brain-filing-rules.md for the sanctioned
media/<format>/<slug>exception this skill files under.Convention: see conventions/quality.md for citation rules, back-link enforcement, and output quality bars.
Convention: see conventions/brain-first.md for the lookup chain (brain → search → external) the context-gathering phase follows.
What this does
Given a book (EPUB or PDF), produce a brain page where every chapter is
summarized in detail on one side ("The Chapter") and mirrored back to the
reader's actual life on the other ("The Mirror"), using their own words,
situations, people, and patterns from the brain. Output is a brain page at
media/books/<slug>-personalized.md.
This is NOT a generic book summary. The mirror is the value: it makes the book read like a smart friend who happens to know the reader's life deeply is pointing things out in the margins. The mirror's job is recognition — "that's exactly me" — and then getting out of the way. If the user wants a flat summary instead, route them to a different skill.
Trust contract (read this before running)
book-mirror runs as a CLI command (gbrain book-mirror), NOT as a pure
markdown skill that the agent dispatches via tools. The CLI is the trusted
runtime; the skill is the orchestration prose around it.
What this means for the agent:
- The CLI submits N read-only subagent jobs (one per chapter). Each subagent
has
allowed_tools: ['get_page', 'search']only. They CANNOT call put_page or any mutating op. They produce markdown analysis via their final message. - The CLI reads each child's
job.result, assembles the final page, and writes it via a single operator-trustput_page. - This means untrusted EPUB/PDF content cannot prompt-inject any
people/*page. The trust narrowing happens at the tool allowlist, not at the slug-prefix layer.
The pipeline
1. ACQUIRE → User has the EPUB/PDF locally (manual; book-acquisition is
not currently shipped — see "Acquiring the book" below).
2. EXTRACT → Pull chapter text from EPUB/PDF into one .txt per chapter.
3. CONTEXT → Gather everything the brain knows about the reader.
4. ANALYZE → `gbrain book-mirror` fans out N read-only subagents.
5. ASSEMBLE → CLI reads each child result and writes one put_page.
6. PDF → Optional: render via skills/brain-pdf for delivery.
1. Acquiring the book
book-acquisition (legal-grey-area downloader) was deliberately not shipped in this skill wave. The user drops the EPUB/PDF manually. Common paths the user might use:
# User-supplied path
ls path/to/book.epub
ls path/to/book.pdf
# Or already in the brain repo (recommended for tracking)
ls $BRAIN_DIR/media/books/
Resolve $BRAIN_DIR from the gbrain config (gbrain config get sync.repo_path)
or accept it from the user.
2. Text extraction
Goal: one .txt file per chapter under a temp directory. The agent has
shell + python access; the CLI is downstream of this and takes the
extracted directory as input.
EPUB
SLUG="this-book" # kebab-case
WORK="$(mktemp -d)/$SLUG"
mkdir -p "$WORK/chapters"
unzip -o path/to/book.epub -d "$WORK/unpacked"
# Find content files (XHTML/HTML), sorted (chapter order = sort order)
find "$WORK/unpacked" -name "*.xhtml" -o -name "*.html" | sort > "$WORK/files.txt"
# Strip HTML to text per chapter
python3 - <<'PY'
from bs4 import BeautifulSoup
import os, sys
work = os.environ['WORK']
files = open(f'{work}/files.txt').read().splitlines()
for i, path in enumerate(files, 1):
html = open(path, encoding='utf-8', errors='replace').read()
text = BeautifulSoup(html, 'html.parser').get_text('\n')
text = '\n'.join(line.strip() for line in text.splitlines() if line.strip())
with open(f'{work}/chapters/{i:02d}.txt', 'w') as f:
f.write(text)
PY
If bs4 is missing: pip3 install beautifulsoup4 lxml.
Inspect the chapter files to identify which are real chapters vs front
matter (TOC, copyright, acknowledgments). Often the EPUB ships one file
per chapter; sometimes multiple chapters per file. Use
head -5 "$WORK/chapters/"*.txt to spot-check.
pdftotext -layout path/to/book.pdf "$WORK/full.txt"
Then split by chapter heading (look for "Chapter N", "CH
Questions fréquentes
Est-ce un simple résumé de livre ?
Non. Les liens personnels sont l'essentiel de la valeur, chaque chapitre étant relié à votre propre vie.
Me dit-il quoi faire ?
Non. Il signale des parallèles, et c'est vous qui décidez de la suite.
Où l'analyse est-elle enregistrée ?
Elle est enregistrée comme une page de votre base, dans la section des livres.
Détails
Description originale de l’auteur
Take any book (EPUB/PDF), produce a personalized chapter-by-chapter analysis. Each chapter is preserved in detail (The Chapter) and mirrored back to the reader's actual life (The Mirror) using brain context. The mirror observes and resonates — a friend pointing out parallels, NOT a consultant rearranging the reader's life, NOT a therapist assigning homework. The reader decides what to do about it. Layout is a top-aligned HTML table or stacked sections, never a bare markdown pipe table (pipe tables center-misalign uneven columns). Output is a single brain page at media/books/<slug>-personalized
repo: garrytan/gbrain
Popularité
- Étoiles GitHub
- 31k
- Position au classement
- #9288
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
gbrain
31kPermet à votre agent de chercher dans un cerveau de connaissances partagé de l'entreprise des faits sur les personnes, les projets et les décisions, et d'y enregistrer des notes durables.
brain-ingest-gate
31kVérifie le nouveau contenu par rapport à un cerveau de connaissances existant avant de l'ajouter, pour éviter les doublons et résoudre d'abord les entités nommées.
brain-link-discipline
31kVeille à ce que votre agent inclue dans le même message un lien fonctionnel vers chaque page du cerveau qu'il mentionne, pour que vous puissiez l'ouvrir tout de suite.
brain-ops
31kDonne à votre agent la routine de base d'un cerveau de connaissances : consulter d'abord le contexte existant, enregistrer les notes explicites avec leur source et relier les pages liées.
Skills similaires
graincrawl
394kPermet à votre agent de chercher dans vos notes et transcriptions de réunions Granola sauvegardées, de vérifier leur fraîcheur et de les compter sur une période.
notcrawl
394kPermet à votre agent de chercher dans une copie sauvegardée de votre espace Notion, de consulter pages et bases, et d'exporter des pages en Markdown.
knowledge-entities
394kAide votre agent à identifier des personnes, des entreprises et des projets, puis à rédiger pour eux des pages de profil sourcées dans votre coffre Knowledge.