build-book-glossary — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited build-book-glossary (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Build a comprehensive, genre-aware terminology glossary by processing chapters sequentially. Each chapter is analyzed by a dedicated agent that receives the full accumulated glossary and returns only new terms. The glossary accumulates context chapter-by-chapter, ensuring consistent and comprehensive term extraction.
Print the version on every run:
cabt:build-book-glossary v1.1.2Then check if $ARGUMENTS contains --version. If it does, stop here -- do not proceed to Step 1 or any further steps.
If a workspace path was provided as $ARGUMENTS, change to that directory first:
cd "<workspace_path>"Read metadata.json from the current directory.
cat ./metadata.jsonVerify the contents:
status is "glossary-built", tell the user: "Glossary already built. Review glossary.md or delete it to rebuild." and stop.status is not "prepared" and not "glossary-in-progress", tell the user: "Unexpected workspace status: '{status}'. Expected 'prepared' or 'glossary-in-progress'." and stop.Extract these fields for use throughout the workflow:
titlegenresource_languagetarget_languagechapters (array with sequence, output_filename, token_count)Also extract reuse information:
glossary_reuse field (if present): contains source_workspace, source_book_title, imported_files, imported_atglossary_reuse is present AND glossary-rules.md exists on disk -- if both true, this is a reuse path for rulesglossary_reuse is present AND glossary.md exists on disk -- if both true, this is a reuse path for glossary seedingglossary_reuse is absent or both files are missing on disk, this is a fresh path (v1.0 behavior unchanged)Note: Do NOT check for glossary_progress here -- that is the resume path handled by Step 2. The three paths are: fresh (no reuse, no resume), reuse (glossary_reuse present + files on disk), and resume (glossary_progress present). Resume takes precedence over reuse (if someone resumes a reuse build, Step 2 handles it).
Run the resume check:
python ${CLAUDE_PLUGIN_ROOT}/scripts/glossary_helpers.py resume --metadata-path ./metadata.jsonParse the JSON output and handle each case:
glossary_progress in metadata.json by removing the field entirely.Check the output token environment variable:
echo ${CLAUDE_CODE_MAX_OUTPUT_TOKENS:-"NOT SET"}Run the pre-flight check:
python ${CLAUDE_PLUGIN_ROOT}/scripts/glossary_helpers.py preflight --metadata-path ./metadata.jsonParse the JSON output. If warnings is non-empty:
CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 in your user profile (e.g., .bashrc, .zshrc, or PowerShell profile), then restart this shell for it to be taken into account."If warnings is empty, proceed silently.
Check if metadata.json already has a book_research field with researched: true. If so, skip this step and move to Step 5.
Use the Agent tool to spawn a book research agent with this prompt:
You are a book research agent. Search the web for information about the book '{title}' to help with translation from {source_language} to {target_language}.
>
Research the following: 1. Book summary and plot overview 2. Writing style and tone 3. Major themes 4. Series position (standalone, part of series, which book number) 5. Notable terminology conventions 6. Existing fan translations in {target_language} if any 7. Genre-specific conventions for {genre} books
>
Try these search queries: - '{title}' book review - '{title}' {target_language} translation - '{title}' wiki fandom - '{title}' fan translation terminology
>
Return a structured summary with these sections: - Summary: Brief plot overview - Style: Writing style and tone notes - Themes: Major themes - Series Position: Standalone or series info - Terminology Notes: Any notable terminology conventions found - Fan Translations: Existing fan translations found (or "None found")
>
If the book is not found online, note this and return what you can infer from the title and genre.
The agent has access to WebSearch and WebFetch tools.
After the agent returns:
book_research field with these keys:summary (string)style (string)themes (string)series_position (string)terminology_notes (string)fan_translations (string)researched (boolean -- true if the agent found information, false if not)researched to false and note the failure. This is NOT a blocker -- proceed to the next step.Check which path applies (in priority order):
glossary-rules.md exists AND this is a resume (from Step 2, i.e., glossary_progress is present) -- skip Step 5 entirely. (Unchanged from v1.0.)glossary-rules.md exists AND this is a reuse path (glossary_reuse present in metadata.json, not a resume) -- run the adapted flow below.glossary-rules.md does NOT exist -- run the full Q&A flow below.Reuse path (adapted flow):
Print:
Using translation rules from [source_book_title]. Checking for differences...Where [source_book_title] comes from glossary_reuse.source_book_title in metadata.json.
Compare the book research (from Step 4's book_research field in metadata.json) against the existing glossary-rules.md. Specifically look for ONLY these two categories of differences:
IMPORTANT: Do NOT flag these as differences:
If differences ARE found: Present only the specific diffs as targeted questions. For each diff, show what the current rule says and what the research suggests, then ask for the user's decision. After the user responds, update glossary-rules.md in place with the changes (no changelog section, no full rewrite -- just edit the specific rules that changed).
If NO meaningful differences found: Show:
These rules carry forward from [source_book_title]. Anything to adjust?Wait for user response. If user has adjustments, update glossary-rules.md in place. If user says no / confirms, proceed.
Both reuse sub-paths end with: Ask: "Do you want to discuss more points or have specific concerns about the translation?"
Then print: "Rules confirmed. Starting glossary build..."
Fresh path (full Q&A -- v1.0 behavior unchanged):
Generate 6-10 genre-specific questions dynamically based on source_language, target_language, and genre. All questions are in English regardless of target language.
Questions should cover:
If book_research is available and has researched: true, reference specific findings in the questions. For example: "Fans commonly translate X as Y -- do you agree with this convention?"
Present all questions to the user at once. Wait for the user's responses.
After receiving answers, ask: "Do you want to discuss more points or have specific concerns about the translation?"
Write all decisions to glossary-rules.md in English. Format as a clear, numbered list of translation rules. Example format:
# Translation Rules -- {title}
## Proper Nouns
1. Keep character names in English unless they have clear narrative meaning
2. Translate place names that are descriptive (e.g., "Shadowlands")
## Genre Terms
3. Keep "Skill", "Quest", "Dungeon" in English (common in French LitRPG community)
4. Translate "Level" as "Niveau"
...
## Speech Register
5. Use tu/vous distinction: allies use tu, strangers use vous
...If glossary.md does not exist (fresh start or restart, no reuse):
Run the template generator:
python ${CLAUDE_PLUGIN_ROOT}/scripts/glossary_helpers.py template --title "{title}" --genre "{genre}" --source-language "{source_language}" --target-language "{target_language}"Write the stdout output to glossary.md.
Update metadata.json:
status to "glossary-in-progress"glossary_progress field with:last_chapter_processed: 0total_chapters: (number of chapters from chapters array)status: "in_progress"If glossary.md already exists from reuse (glossary_reuse present in metadata.json and glossary.md on disk): skip template generation entirely -- the reused glossary is already in place. Instead:
glossary.md: count all non-header, non-separator table rows (lines starting with | that are not header rows or |---| separator rows) across all sections. Store this count as carried_forward_count for use in Step 8.Starting with N terms from [source_book_title]. Processing chapters for new terms... where N is the carried_forward_count and source_book_title comes from glossary_reuse.source_book_title.status to "glossary-in-progress", add glossary_progress field with last_chapter_processed: 0, total_chapters: (count), status: "in_progress", and carried_forward_count: N.If glossary.md already exists from resume (glossary_progress present, not from reuse): this is handled by Step 2. Step 6 does nothing (existing v1.0 behavior).
Display before starting the loop:
Now processing all {total_chapters} chapters sequentially. This will take a while.
(The glossary from previous chapters is important when processing a chapter, which is why we process them sequentially — each chapter analysis gets the glossary from the previous chapters in its context.)Note: When glossary.md was seeded from a previous book (reuse path), chapter agents work exactly as in the fresh path -- they read the accumulated glossary and add only new terms. No changes to the agent prompt or processing loop.
CRITICAL — THREE RULES FOR CHAPTER PROCESSING:
The loop must look like this: for each chapter → spawn ONE agent → agent returns new terms → orchestrator appends terms to glossary.md → orchestrator updates metadata.json → log progress → move to NEXT chapter → spawn next agent. Do NOT spawn an agent that handles "remaining chapters" or "chapters N through M".
For each chapter in the chapters array from metadata.json (in sequence order), starting from the resume point:
sequence is less than or equal to glossary_progress.last_chapter_processed.book_research.researched is true, format a brief paragraph from the book_research fields (summary, style, themes, terminology_notes). Otherwise use "No book research available."You are a glossary extraction agent for literary translation.
>
## Context - Book: {title} - Genre: {genre} - Source Language: {source_language} - Target Language: {target_language} - Chapter: {sequence} of {total_chapters} - Book Research: {book_research_summary}
>
## Files to Read Read these files yourself using the Read tool: -./glossary-rules.md— translation rules -./glossary.md— current accumulated glossary -./source/{output_filename}— chapter XHTML to process
>
## Your Task 1. Read all three files above first. 2. Read the chapter content carefully. XHTML tags provide formatting context (e.g.,<em>for emphasis,<strong>for system notifications in LitRPG). Focus on text content. 3. Check ALL sections of the current glossary before adding any term. Identify ONLY terms that should be in the glossary but are NOT already there. 4. For each new term, provide: - {source_language} term (exact as it appears in the text) - {target_language} translation (following the translation rules in glossary-rules.md) - Context note (ch.{sequence} + brief context) - For characters: also note their speech register (formal, informal, slang, etc.) 5. If you are uncertain about a translation, mark it with (?) after the translation. Example: Croc-Ombre (?) 6. If an existing glossary term appears in new significant context in this chapter, note the context update needed. Format: UPDATE: [term] -- add context: [new context note] 7. Do NOT repeat terms already in the glossary unless you are noting a context update. 8. Do NOT add idiomatic expressions, common sayings, proverbs, pop culture references, or brand names to the glossary (e.g., "Work smarter, not harder", "M&Ms", "break a leg"). These are the translator's job to handle in context during translation — they are NOT glossary terms. The glossary is for recurring proper nouns, genre-specific terminology, character names, world-building terms, and technical vocabulary that need consistent translation across chapters.
>
## Output Format Return ONLY new entries as markdown tables matching the glossary section structure. Use the exact section headers from the glossary. If no new terms found in a category, omit that section.
>
Example output: ## Characters and Creatures | {source_language} | {target_language} | Register | Context | |---|---|---|---| | Shadowfang | Croc-Ombre (?) | formal, archaic speech | ch.03 -- antagonist introduced |
>
## Skills / Spells / Abilities | {source_language} | {target_language} | Context | |---|---|---| | Mana Burst | Explosion de Mana | ch.03 -- MC first skill |
>
If no new terms at all, respond with: No new terms.
>
IMPORTANT: Return ONLY the markdown tables (or 'No new terms.'). No explanations, no preamble.
glossary.md and append the new rows after the existing table rows (before the next section header). Match section headers exactly. If the agent returned a section header that does not exist in glossary.md, add it as a new section at the end of the file (before any trailing content).glossary.md and append the new context note to its Context column, separated by a semicolon.glossary.md.glossary_progress.last_chapter_processed to this chapter's sequence number.After all chapters are processed:
status to "glossary-built"glossary_progress.status to "complete"glossary.md:| that are not header rows or |---| separator rows) across all sections(?) in glossary.mdIf this was a reuse build (glossary_reuse present in metadata.json):
carried_forward_count from glossary_progress in metadata.json (saved in Step 6)new_terms = total_terms - carried_forward_count Glossary Complete!
Total terms: {total} ({carried_forward_count} carried forward + {new_terms} new)
Terms by category:
{category 1}: {n}
{category 2}: {n}
...
Uncertain terms: {n} (marked with (?))
Review glossary.md and fix any (?) entries before translating.
---
Next step: /translate-book {workspace_path}If this was NOT a reuse build (fresh path -- v1.0 behavior unchanged):
Glossary Complete!
Total terms: {count}
Terms by category:
{category 1}: {n}
{category 2}: {n}
...
Uncertain terms: {n} (marked with (?))
Review glossary.md and fix any (?) entries before translating.
---
Next step: /translate-book {workspace_path}Where {workspace_path} is the current working directory (the workspace the user cd'd into or passed as argument).
IMPORTANT: Print the command exactly as /translate-book, NOT /cabt:translate-book. Do NOT add a namespace prefix. The short form is required for autocomplete to work.
glossary_progress.last_chapter_processed in metadata.json to the chapter before the failed one.book_research.researched to false in metadata.json and proceed without research context. This is not a blocker.ebooklib, lxml, and tiktoken packages required~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.