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.
npx agentmods add commands/masterleopold/book-capture/generategit clone --depth 1 https://github.com/masterleopold/book-captureWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00016 | $0.00531 |
| Opus 5 | $0.00008 | $0.00266 |
| Sonnet 5 | $0.00003 | $0.00106 |
| Haiku 4.5 | $0.00002 | $0.00053 |
Grade A, and why
generate 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 2d 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.
What it actually says
Structured Markdown Generation
Generate thematic Obsidian Markdown documents from existing OCR text. Requires raw_text.json to already exist.
Setup
- Resolve vault paths from
.claude/book-capture.local.mdor auto-detect - Parse
$ARGUMENTSfor BookID and metadata flags OUTPUT_DIR=<CAPTURES_BASE>/<BookID>
Verify OCR data exists:
Read: <OUTPUT_DIR>/raw_text.json
If not found, tell the user to run /book-capture:ocr first.
Step 1: Gather Metadata
Parse from $ARGUMENTS or ask user:
- Book Title (required)
- Author (required)
- Category (required)
- Location — where topic files go (e.g.,
Knowledge/Marketing/BookTitle) - Language — JP (default) or EN
- URL (optional)
Step 2: Plan Thematic Structure
Read raw_text.json, concatenate all page text. Check for existing structured.json — if found, offer to reuse or regenerate.
Analyze the full text to identify 8-14 thematic categories by information type (not original chapter order). Save to <OUTPUT_DIR>/structured.json.
Step 3: Generate Topic Files
Set LOCATION_DIR = <VAULT_ROOT>/<Location>
Dispatch 3-5 parallel agents (subagent_type: book-capture:content-writer), each handling 2-4 themes.
Each agent writes files to <LOCATION_DIR>/NN_ThemeName.md with:
- YAML frontmatter (tags, parent wikilink)
- Rich markdown content (300-600 lines per file)
- Cross-references via
[[wikilinks]]to sibling topics
Step 4: Generate Hub File
Write hub file to <ENTRIES_DIR>/<BookTitle>.md with:
- Full frontmatter (tags, Category, Rating, author, Location, Chapters, Language, URL)
- Book summary
- Topic wikilinks with descriptions
Step 5: Report
- Number of topic files generated
- Hub file path
- Topic files directory
- Suggest user review in Obsidian
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.
- 2d ago First seen · 64 lines · 16 tokens per session scan A 04d3e3cd5385
generate is a command published in the GitHub repository masterleopold/book-capture (10 stars, last pushed 1mo ago), licensed MIT. It adds 16 tokens to every session and 531 once invoked, about $0.0001 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.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.