From hebrew-book-producer
Auto-detect a Hebrew manuscript in the current directory and scaffold the project — book.yaml, .book-producer/, AUTHOR_VOICE.md (via express-voice if missing). Used by /start before dispatching to any terminal action. Idempotent — safe to run on a project that's already scaffolded. Asks ONE Hebrew confirmation question; never seven.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hebrew-book-producer:book-bootstrapThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Beginning of every `/start <action>` invocation.
/start <action> invocation.book.yaml, AUTHOR_VOICE.md, .book-producer/.Scan in this order; first hit wins:
chapters/*.md (multi-chapter project — already organised).ch*.md, chapter-*.md, [0-9][0-9]-*.md, [0-9]-*.md in cwd (multi-chapter, no folder).manuscript.md / book.md / largest *.md over 5 KB.*.docx and *.pdf files. For DOCX/PDF, extract text into a temp chapters/ directory and treat each as a chapter.init, scaffold a blank project with one stub chapter.Sample the first 3,000 words of the longest detected file. Score:
| Signal | Pattern | Genre |
|---|---|---|
| Hazal-citation density > 1 per 500 words | בבלי, ירושלמי, מדרש, רמב"ם, שו"ע, (א-ת+)\s״-style | religious |
| First-person ratio > 0.10 of all words | אני / אנחנו / לי / לנו / שלי | autobiography |
| Argumentation markers > 5 instances per 1000 words | ברם, אולם, שכן, הואיל ו, מכאן ש, כפי ש | philosophy |
| None of the above prominent | — | popular-science |
| Two or more strongly | — | mixed |
book.yamlIf book.yaml already exists, skip this step. Otherwise write:
# Auto-generated by book-bootstrap on <ISO-date>. Edit any field freely.
title: "<derived from H1 of longest file, or directory name>"
author: "<git config user.name, fallback to empty>"
genre: <guessed genre>
target_words: <sum of detected word counts × 1.1, rounded to nearest 1000>
citation_style: chicago-author-date
niqqud: <true if religious + niqqud detected in sampled text, else false>
deadline: ""
created: <YYYY-MM-DD>
chapters:
# one entry per detected file, with stage: drafted
- id: ch01
file: <relative path>
stage: drafted
- id: ch02
file: ...
stage: drafted
Chapter IDs follow ch01, ch02, … unless a filename already encodes an order (03-foo.md → id: ch03, preserve it).
.book-producer/If missing:
.book-producer/
state.json # { "chapters": [<one per book.yaml chapter, stage: drafted>], "last_update": "<ISO>" }
memory.md # header only
snapshots/ # empty
Update .gitignore to add .book-producer/snapshots/, .book-producer/memory.md, .book-producer/state.json, .ctx/, chapters/*.draft*.md, chapters/*.decisions.md if not already present.
If missing:
express-voice sub-skill (3 questions). It writes AUTHOR_VOICE.md and a sparse .book-producer/profile.json.AUTHOR_VOICE.md: "להעמקת הקול הרץ /init-voice בכל זמן."If present:
Normally the plugin's SessionStart hook has already cached writers-guide.md, agent-team-guide.md, and hebrew-linguistic-reference.md under .ctx/. If any of those files is missing, fall back to:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/load-candlekeep-guide.sh
The loader is idempotent and handles its own freshness check.
After all the auto-creates, summarise in a single sentence and ask one question:
"זיהיתי {N} פרקים, סוגה: {genre}, ניקוד: {on/off}, יעד: {target_words} מילה. נכון? (כן / שנה / ביטול)"
כן → return success to caller.שנה → ask one follow-up: "מה לשנות? (סוגה / ניקוד / יעד / שם)" and let the user override exactly one field. Re-confirm.ביטול → roll back any files created in this run (track them in a transactional list during step 3–4) and abort.{
"status": "ok | aborted | error",
"scaffolded": ["book.yaml", ".book-producer/state.json", "AUTHOR_VOICE.md"],
"preExisting": ["book.yaml"],
"manuscriptFiles": ["chapters/ch01.md", ...],
"genre": "philosophy",
"niqqud": false,
"summary": "<one Hebrew sentence>"
}
book.yaml or AUTHOR_VOICE.md. If both already exist, skip steps 3 and 5 silently and proceed.git config user.name returns empty, set author: "" and surface that in the confirmation summary so the user knows to fill it..md instead.extract-voice-fingerprint.py./proof, /edit, etc. — that's the caller's job./init-voice. Only express-voice (3 questions). The author can run /init-voice later for the heavy fingerprint.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub yodem/hebrew-book-producer --plugin hebrew-book-producer