技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
gemini-writer【数据与研究】Delegate large-context writing tasks to Gemini's 1M token window. Send an entire manuscript + detailed instructions in a single pass. Use for book rewrites, structural refactoring, redundancy analysis, and any writing task where the AI needs to see everything at once.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Leverage Gemini 2.5 Pro's 1M token context window for writing tasks that exceed what Claude can hold in a single context. The key advantage: Gemini can read the ENTIRE manuscript plus all annotations, voice guides, and editorial instructions in a single pass, then produce a rewritten chapter that accounts for everything at once.
The script sends content to Gemini's generateContent API (not the Interactions/research API). Two modes:
Send everything, get one big output. Best for analysis tasks (redundancy audit, structural plan).
Send full manuscript as context, but process ONE chapter at a time. This means:
Create a markdown file with detailed instructions. Two levels:
System instruction (optional, --system): Voice guide, style rules, constraints that apply to every chapter.
Prompt (--prompt): Specific task instructions — what to fix, what to preserve, what to move, what annotations mean.
Always start with a dry run to verify token counts:
python3 .claude/skills/gemini-writer/scripts/gemini-writer.py \
--prompt prompt.md \
--context manuscript/revised/ \
--dry-run
Batch mode (one chapter at a time):
python3 .claude/skills/gemini-writer/scripts/gemini-writer.py \
--prompt prompt.md \
--system voice-guide.md \
--context manuscript/revised/ \
--output manuscript/v3/ \
--batch
Single chapter:
python3 .claude/skills/gemini-writer/scripts/gemini-writer.py \
--prompt prompt.md \
--context manuscript/revised/ \
--output manuscript/v3/ \
--batch --chapter 01-introduction.md
Compare outputs against originals. Gemini's rewrites should be treated as strong first drafts that need human editorial review.
Be explicit about annotations. Tell Gemini exactly what {} means: "Text in curly braces {} are the author's editorial comments. Execute these instructions, don't reproduce them."
Give voice samples. Include 2-3 paragraphs of the author's best writing and say "match this voice."
Specify what to preserve. Gemini will rewrite aggressively unless you tell it what's working. Say "The following sections are strong and should be preserved with minimal changes: [list]."
Use the system instruction for invariants. Voice guide, source material rules, theological constraints — anything that applies to every chapter goes in --system.
Order matters. Put the most important instructions first in the prompt. Gemini, like all LLMs, attends more to the beginning.
gemini-3-pro-preview (falls back to gemini-2.5-pro-preview-06-05).claude/skills/gemini-writer/scripts/gemini-writer.py
Requires: GEMINI_API_KEY env var (set in ~/.zshrc), httpx (auto-installed on first run)