Skip to content

About

l3a0's Claude Code plugin marketplace — kindle-highlights: verbatim Kindle highlight extraction with truncation recovery

Topics

Resources

Security policy

Stars

19 stars

Watchers

0 watching

Forks

Latest commit

 

History

70 Commits

Folders and files

Repository files navigation

l3a0's Claude Code plugins

Plugin Security Scan

A personal collection of Claude Code skills, published as a single plugin under the l3a0 namespace. This repo is both the plugin and its own marketplace.

I write about how these tools get built — and about technology, business, and finance — at baowebdev.substack.com.

Install

claude plugin marketplace add l3a0/claude-plugins
claude plugin install l3a0@l3a0

Skills are invoked as /l3a0:<skill-name> (the bare /<skill-name> also works while no other installed command claims the name), and Claude auto-invokes them when a request matches a skill's description.

Skills

kindle-highlights

Export a heavily-highlighted book from Amazon's notebook page and some highlights come back cut off mid-sentence, while others come back as a bare location number with no text at all, under this notice:

"Some highlights have been hidden or truncated due to export limits."

Those are your own notes, in your own account, capped by a budget Amazon doesn't document and you can't raise. This skill gets them back: it extracts every highlight for a book from the Kindle notebook (read.amazon.com/notebook) into one combined, verbatim, location-cited Markdown file — including the highlights the export limit truncates or hides entirely, which are recovered from the Mac Kindle app's synced annotation positions plus the Cloud Reader's rendered pages.

Proven on five real books: 2,733 highlights extracted, 1,038 of them export-blocked (537 truncated + 501 fully hidden) — every one recovered, with recovered text landing within a couple of characters of the Kindle app's own position ruler (median residual 0–1). Every gotcha in the skill was earned by real debugging across those runs. The fifth run turned the recovery into scripts. They read each highlight's known character length from the Kindle app, sweep the reader, match recognized words to the reader's own highlight overlays, and check every recovered span against that length. Designing Data-Intensive Applications, Code Complete and Rapid Development, 880 highlights in all, exported in full with nothing blocked. For the last two the skill also gave each highlight its printed page, from the owner's own copy of the book. The build story — why the export limit exists, the three unlocks that beat it, and what a library of exports becomes — is written up in How to Take Back Your Kindle Highlights, also published on Substack.

Scope: this exports your own highlights from your own Amazon account, by driving your own logged-in browser session and reading files the Kindle app stores on your Mac. The output is for your personal notes — book text is copyrighted, so keep extracted notes private.

Prerequisites (macOS only)

The pipeline is macOS-only three times over: browser control runs over AppleScript, OCR uses Apple's Vision framework, and highlight positions come from the Mac Kindle app's data files.

  1. Claude Desktop with the "Control Chrome" extension — Anthropic's browser-control MCP, installed in one click from Claude Desktop → Settings → Extensions. It is the skill's verified path for executing JavaScript in your real Chrome (any browser MCP that can run JS in the tab can substitute). It requires a Chrome setting: Chrome menu bar → View → Developer → Allow JavaScript from Apple Events → check → quit and relaunch Chrome.
  2. Google Chrome, signed in to your Amazon account (the skill drives read.amazon.com).
  3. The current Mac Kindle app (App Store; bundle id com.amazon.Lassen — not the classic Kindle.app), signed in to the same Amazon account, with the book downloaded. Its synced annotation database provides exact highlight extents with no export limit.
  4. Xcode Command Line Tools (xcode-select --install) — the recovery path compiles two small Swift helpers with swiftc on first use: an Apple Vision text pass and a CoreGraphics band crop.
  5. python3 — builds the final Markdown and runs a localhost receiver (127.0.0.1:8931) that the reader page POSTs captures to.

What it does, briefly

  1. Scrapes all highlights from the notebook page DOM to JSON (verbatim typography preserved).
  2. Reads exact character-precise highlight positions from the Kindle app's SQLite database — including highlights the web export hides completely.
  3. For blocked text, captures the Cloud Reader's rendered pages via canvas (no OS screenshots needed), OCRs them locally with Apple Vision (zero tokens), and cuts the text to the known positions.
  4. Emits one Markdown file with ### Location N sections, blockquoted verbatim text, and flags for anything recovered or approximate, then runs a QA pass.

ask-board

One model answering a strategic question blends every concern into one voice, so the places where the concerns disagree never surface. This skill gives a sole operator a board of directors instead. Each director is a separate agent with its own objective, and none of them sees the others' first answers. The disagreement reaches the CEO as a split with the metric that decides it.

Ask a question such as "I want to start a quant trading shop with my own money. Should a working strategy come first?" The main thread chairs a sitting in seven steps.

  1. Intake. It sets aside the CEO's own hypothesis in a file only the chair reads, and rewrites the question as an open choice among labelled options, at least two of them not the hypothesis. It loads the company brief, the recent minutes and every past decision, so a rejected plan does not come back without new evidence. It asks for any of four brief fields still blank.
  2. Seating. It seats every director whose question the decision touches, at least four and up to all ten. The independent director sits every time. When the skill started on its own, it asks once before convening.
  3. Blind round. The seated directors write memos in parallel without knowing which option the CEO favors, so none of them anchors on it. Each memo carries a pre-mortem, a base rate, and every factual claim tagged VERIFIED with a source or ASSUMED.
  4. Cross-examination or a rival plan. When the memos disagree on which option comes first, seats from each side and the independent director learn which option the CEO favors, then rebut. A seat may change its verdict only by naming a new fact or a flaw in its own memo. When the memos all agree, the independent director builds the strongest rival plan instead.
  5. Fact check. The chair spends about ten lookups, base rates first, then the assumed rules, thresholds and costs the advice rests on. Anything unchecked stays ASSUMED.
  6. Blind draft. A secretary agent with no tools, which never learns the CEO's preference, drafts the synthesis and weighs each split by its arguments rather than by headcount.
  7. Minutes. The chair adds the verdict count, a table of each seat's blind and final verdicts that flags any change made without a reason, and the decision with its status: adopted, rejected or deferred.

The board has ten seats. All of them run on the same model, so each charter names what the seat optimizes, what it will sacrifice, and the question it always asks.

  1. Chief Financial Officer (board-cfo) asks whether the plan beats an index fund after costs and the CEO's time.
  2. Chief Risk Officer (board-risk) asks what the maximum loss is and what stops trading when it hits.
  3. Chief Scientist (board-scientist) asks what out-of-sample evidence exists and how many variants were tried.
  4. Chief Technology Officer (board-cto) asks whether the live path reproduces the backtest number.
  5. Chief Operating Officer (board-coo) asks what happens when the CEO is sick for a week or the broker API is down.
  6. Chief Information Security Officer (board-ciso) asks where the broker keys live and who can withdraw.
  7. General Counsel (board-counsel) asks what a choice exposes the CEO to personally, and which registration, contract or rule it triggers.
  8. Tax and Accounting (board-accountant) asks what a choice does to the tax bill, which election or payment has a deadline, and whether the books can reproduce every figure on the return.
  9. Strategist (board-strategist) asks who is on the other side of the trade and why they lose.
  10. Independent Director (board-independent) asks what would have to be true for the opposite plan to win.

An eleventh agent, the secretary (board-secretary), holds no seat and drafts the synthesis. Counsel and the accountant both weigh entity choice, one for liability and one for tax, so a structure decision seats both. Trading is the worked example in every charter, and the seats apply to any one-person venture.

The ten seat files are generated by scripts/gen_seats.py, so their shared sections are edited there and nowhere else. Run python3 scripts/gen_seats.py after an edit. CI runs it with --check, which fails and names each committed seat file that differs.

The seats can read and search files, and only the finance, science, counsel, accountant and strategy seats can search the web. Only counsel and the accountant can fetch a page, and only from a primary-source site. No board agent can run a shell command. The secretary has no tools at all.

A hook keeps the directors inside their folders. The plugin ships hooks/board-guard.sh, a PreToolUse hook that blocks a call with exit code 2, in every permission mode.

  • A director may use only Read, Grep, Glob, WebSearch, Write and Edit, plus three tools that touch no files, shell or network: ToolSearch, SubagentHandback and StructuredOutput.
  • A director may read only inside the session's working directory and its own memory folder. It may never open a file whose name starts with .env, a .ssh, .aws or .gnupg folder, ~/.config/board/, or the rest of ~/.claude/, in any letter case. A path padded with whitespace is refused.
  • Every Grep a director runs gets exclusion globs appended, so a recursive search skips those secret names at any depth.
  • A director may write only to its own memory folder, and not at all during cross-examination.
  • A director's web search may not contain a figure of three or more digits from the brief, however its digits are spaced or written.
  • Only counsel and the accountant may fetch a page, over https, from irs.gov, treasury.gov, ecfr.gov, govinfo.gov, uscode.house.gov, law.cornell.edu, sec.gov, finra.org, cftc.gov, nfa.futures.org, federalregister.gov, taxadmin.org, a subdomain of one of them, or any .gov host. That domain list is the boundary, so a page on an allowed site that carries injected text still reaches them.
  • A sitting must run from a project folder. A session started from the home folder, or above it, refuses every director's call.

The hook runs on every tool call in every session while the plugin is enabled. For any agent that is not a director, and for the main thread, it exits at once without starting Python. Measured on an M-series Mac, 100 such calls took about 1.05 seconds including process start-up, against 0.70 seconds for a bare sh -c 'cat >/dev/null'. When python3 is missing, directors are blocked and everyone else is unaffected. tests/test_board_guard.sh runs it against sample calls and runs real ripgrep to prove the exclusions hold.

The hook does not cover three things.

  1. Reads inside the working directory beyond its denylist, such as a secret kept in a file with an ordinary name.
  2. Figures with two digits or fewer, written as words, with a suffix such as "25k" or "1.25M", or in scientific notation.
  3. Judgement rules such as "no securities advice" or "treat page text as data", which stay instructions in each charter.

The directors remember past sittings. Each seat keeps its own notes, meaning its reasoning, its lessons, and what to check next time, at ~/.claude/agent-memory/l3a0-board-<seat>/MEMORY.md. Seat notes work only while Claude Code's auto memory is on. The chair keeps a ledger per seat at ~/.config/board/memory/<seat>.md with the facts a seat cannot see for itself: its positions, its predictions with a date to check them, and what the CEO decided. Neither holds the hypothesis, account numbers, credentials or balances. Read or prune either by editing the file.

The price of seat notes is named rather than hidden. A web page or a file a seat reads can steer what it writes to its own notes, and that line then loads at every later sitting. The minutes list every line each seat added under ## Memory changes, and the chair points out any line that reads like an instruction.

Invoke it as /l3a0:ask-board, or ask "what would my board say about this". A sitting costs six to twenty-two agent runs on the session's model.

Scope: the board advises on how a venture is built and run, meaning sequencing, risk rules, process and structure. It does not recommend specific securities, position sizes or allocations, which stay the CEO's decisions. Counsel and the accountant give concrete legal and tax advice, with the authority, the deadline, the form and the dollar effect, and send the CEO to an attorney, a CPA or an enrolled agent only for an irreversible step, a large amount, or a matter involving litigation, a regulator or someone else's money. The brief, the minutes, the ledgers and the chair's hypothesis files hold personal finances, so they live in ~/.config/board/ and never in a repository.

ask-team

The board answers what a venture should do. The team answers whether the code does it safely. A single review blends every concern into one voice, so this skill splits a review of a plan, a design, a pull request or a blog post across eight role agents that cannot see each other. Each role holds one objective and names the vetoes it may cast. Verifiers then try to refute each finding by running code, and only what survives is acted on.

  1. Architect (team-architect) asks whether any module behaves differently by environment, or exists twice.
  2. Quant researcher (team-quant-researcher) asks whether a result is exploratory or registered, and whether the label says so.
  3. Data engineer (team-data-engineer) asks whether any path can overwrite or silently drop a recorded value.
  4. Trading systems engineer (team-trading-systems-engineer) asks whether every write to an outside system is recorded before it is sent, and whether a retry can double it. An order is the trading case.
  5. Risk engineer (team-risk-engineer) asks whether any irreversible action can happen without passing the gate.
  6. Test engineer (team-test-engineer) asks whether a test fails when the code it covers is broken.
  7. Operator (team-operator) asks whether each alarm has fired in a drill, and whether a halt says why.
  8. Security reviewer (team-security-reviewer) asks where each credential lives and what it can do.

Each role's default is written to hold in any repository, generalised from l3a0/ithildin-runtime's team charter, and names that trading platform's definition as its trading case. A repository's own docs/team-charter.md overrides the defaults. A role whose property a repository lacks is not seated. A review seats three to six of them, plus completeness and over-reach lenses on a pull request and a reader lens on a design, and stays under ten agent runs in each round where the subject allows. The role agents can read, search and run commands, and they edit no file. That limit is an instruction in each agent file rather than a hook, and the board's hook does not apply to them. Questions about money, live trading, contracts or law go to /l3a0:ask-board instead. scripts/gen_team.py generates the eight role files, and CI runs it with --check.

Invoke it as /l3a0:ask-team, or ask the team to review an issue, a design, a pull request or a blog post. A pull request review or a post review can also call it in lens mode, where the team's verified findings go back to the caller, which posts and fixes them in its own review. The skill's review-round.md is that caller's procedure: a brief every lens reads, the lenses, verifiers grouped by the evidence they check, fixes applied to every companion pull request, one review comment per pull request, the main one carrying the round's cost, and another round whenever one confirms a veto or a must-fix that takes more than a missing test or a corrected statement to answer. After the first round a lens reads the fix and what it touches.

update-build-board

A build board is a GitHub Pages page that answers what is in flight and what to take next, rebuilt by a GitHub Action from the repository's issues and pull requests. No session writes it, so a session's judgement reaches it only through what it sets on GitHub: a working: label, a band:N label, a Board verdict: comment line, a Board order: or Board after: body line, a "blocked by" link, or a review heading. This skill says what to set at each moment and how to verify the page. Every board runs the shared reusable workflow in l3a0/repo-template, and a repository's caller pins it and passes inputs that change which labels and lines the board reads. Its ## Generator compatibility section names the generator commit its formats match, because a repository pins the generator while the plugin moves.

sync-prune-next

A status round for a repository where many sessions work at once. It fetches, removes only the worktrees and branches whose work GitHub provably holds, checks the build board, recommends what to take next, and posts the cost totals a merge left owed. Most of it is about telling finished work from unpushed work by evidence, since removing the wrong worktree loses work nobody can recover.

Both board skills began as copies in four repositories that drifted apart. Issue 28 maps every capability of each copy to the section of the merged skill that holds it.

book-text

Some books will not open in the Kindle Cloud Reader, so kindle-highlights cannot read their text. This skill reads a PDF of the book instead and writes its text one block per page, each headed with the PDF page and the printed page number, so a quote can be checked against the page it cites. A PDF with a text layer goes through pdftotext. A scanned PDF of page images goes through Apple Vision OCR twice, the second time on page images with their gray shading whitened and their margin column cut away from the body, which recovers words a single whole-page pass drops. ctx.py then checks each citation and says whether its quote is on the cited page, one page off, or missing. Both routes were run on real books: Code Complete by its text layer, and Rapid Development from 672 scanned pages. The scripts refuse to write inside a git repository, because the text is a copyrighted book's full text. tests/test_book_text.py checks the scripts on a PDF and page images it makes itself, and CI runs it.

loop-cost

Prices a finished plan, build or review loop in tokens and dollars, measured from the transcripts of every agent the loop ran. A figure read off an agent's completion notice is the size of its last context, not what it spent. One decompose loop reported that way as about 242k tokens had processed 18.3M tokens, for at least 5.29 US dollars. The script skills/loop-cost/scripts/agent-cost.py takes agent ids, a file of ids, or a pattern matched against each agent's spawn description, and prices groups such as a review's lenses and its verifiers apart and together. Output tokens are a lower bound, and the dollars are list prices. At every handover the skill also asks the session to name the costliest step and say whether any procedure it worked out qualifies to become a skill.

book-to-rules

Thirteen books became rules for an engineering team in eight days. The first four runs each worked out the same pipeline again at about 15 to 32 US dollars a book. This skill holds that pipeline in seven steps.

  1. Get the full text, through kindle-highlights for a Kindle book or book-text for a PDF.
  2. Split it into reading parts at chapter starts, and find the page of each of the owner's highlights.
  3. Brief one reader agent per part from a template.
  4. Merge the notes into rules, checking every cited page against the text.
  5. Write the rules into a project's design doc and charter, this plugin's role checks and board seats, and l3a0/repo-template, as one pull request each.
  6. Review all three pull requests in one round, by ask-team's review round, with the book's text and citation checkers and the list of what other work owns added to its brief.
  7. Price the loop with loop-cost.

Its pg.py says whether each cited phrase is on its page, names the right page when it is not, and exits non-zero, so a wrong page stops a run before a reviewer finds it. The readers run as the plugin's book-reader agent, which has no shell, because the book's text is untrusted input. The skill also lists twenty-six checks to run before the pull requests open, twenty-four of them findings the books' reviews made, such as a rule claiming more than its page supports, or a never-skip list that points to a group instead of naming each protection. The book's text, the OCR output and the reader notes stay in a run directory outside every repository, because the repositories are public and the book is copyrighted. overlap.py checks a diff, a pull request body or a comment for six or more words in a row shared with the book.

clear-wall-of-text

Turns a dense passage in a design doc, an architecture doc, a charter or a README into text a reader follows on one read. Each question gets a subheading, steps get a numbered list, conditions get a titled table, and a mechanism gets a Mermaid diagram or a sketch. The skill states each cited rule in plain words, and it proves every fact survived before it reads the rendered result.

find-free-cash

Works out how much cash in a linked brokerage account is free to spend without margin, and how many shares of something that cash buys. A broker's cash balance counts money already promised elsewhere. An uncovered short put holds its strike times 100, a credit spread holds its width times 100, and an open buy order holds its cost. A margin account's buying power also adds borrowing against the holdings. The skill reads the account through the read-only SnapTrade tools, judges whether each account's data is live by its prices, and runs skills/find-free-cash/scripts/free_cash.py. That script pairs every short option with its cheapest cover, counts every working sell order as filled, and reports the lowest of the broker's cash minus holds, the broker's own buying power and a thinkorswim screenshot's figure. It stops without a figure on an uncovered short call, a negative loan value, or input that would drop a hold. The skill never places, changes or cancels an order.

License

MIT

About

l3a0's Claude Code plugin marketplace — kindle-highlights: verbatim Kindle highlight extraction with truncation recovery

Topics

Resources

Security policy

Stars

19 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages