بنقرة واحدة
init-doc
Initial summary - initialize the document translation project, build glossary and chapter structure
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Initial summary - initialize the document translation project, build glossary and chapter structure
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
缺漏校對 - 檢查規則完整性
一致性校對 - 檢查術語使用是否一致
Create a new project from template and set up a GitHub repo (public or private)
PDF 遊戲規則轉換與翻譯流程。Use when processing PDF files, extracting content, splitting chapters, or translating game documentation.
用語權衡 - 術語選擇與全文替換
術語互動管理與一致性檢查。Use when creating/editing glossary terms, reading terms with site-wide validation, or making terminology decisions.
| name | init-doc |
| description | Initial summary - initialize the document translation project, build glossary and chapter structure |
| user-invocable | true |
| disable-model-invocation | true |
Use pdf-translation and terminology-management skills.
Before initialization, clear template/sample outputs:
uv run python scripts/clean_sample_data.py --yes
This cleanup removes:
data/markdown/* (extracted markdown/images)docs/src/content/docs/**/*.md|.mdx (template docs content)glossary.json to an empty glossary skeleton (_meta only)It does not remove data/pdfs/*.
If no $ARGUMENTS provided, ask user for PDF location in data/pdfs/.
uv run python scripts/extract_pdf.py <pdf_path>
Review output in data/markdown/:
<name>.md - clean version<name>_pages.md - with page markersAfter PDF cropping is completed, review the cropped result before continuing:
part-01-intro.pdf, part-02-core-rules.pdf).Images are automatically extracted during step 2 (extract_pdf.py).
Images saved to data/markdown/images/<pdf_name>/.
List all extracted images with thumbnails or descriptions:
找到以下圖片:
1. image_001.jpg(封面,1200x800)
2. image_002.png(角色插圖,600x400)
3. image_003.jpg(地圖,1000x700)
...
請選擇用途:
Use AskUserQuestion for each image type:
Hero Image (homepage main image, cropped into a circle):
docs/src/assets/hero.jpgBackground Image:
docs/public/bg.jpgOG Image (social sharing preview image):
docs/public/og-image.jpgCopy selected images to appropriate locations:
# Hero image (resize if needed)
cp data/markdown/images/<pdf_name>/<selected_hero>.jpg docs/src/assets/hero.jpg
# Background image
cp data/markdown/images/<pdf_name>/<selected_bg>.jpg docs/public/bg.jpg
# OG image (resize to 1200x630 if needed)
cp data/markdown/images/<pdf_name>/<selected_og>.jpg docs/public/og-image.jpg
Use AskUserQuestion:
背景色調設定:
選項:
1. 深色模式(Dark)- 適合大多數遊戲,神祕且有沉浸感
2. 淺色模式(Light)- 清新、明亮風格
目前背景圖的主色調是什麼?
Based on background image analysis, ask:
背景圖對比度設定:
觀察您選擇的背景圖,請確認:
1. 需要深色遮罩 - 背景太亮,文字可能不清楚
2. 需要淺色遮罩 - 背景太深但想要淺色主題
3. 不需要遮罩 - 背景對比度適中
4. 自訂遮罩透明度(0-1)
建議:通常 0.6-0.8 的遮罩效果最佳
Update docs/src/styles/custom.css:
/* Overlay opacity */
--overlay-opacity: <user_choice>;
Use AskUserQuestion to determine color style:
色票風格設定:
請選擇適合遊戲氛圍的色彩風格:
1. 🌊 冷色系(Cool)
- 主色:藍色系
- 適合:科幻、海洋、冬季、神祕
2. 🔥 暖色系(Warm)
- 主色:橘紅色系
- 適合:冒險、沙漠、戰鬥、熱情
3. 🌲 自然系(Nature)
- 主色:綠色系
- 適合:奇幻、森林、生態、療癒
4. 🌙 暗黑系(Dark)
- 主色:紫黑色系
- 適合:恐怖、哥德、死亡、邪惡
5. ⚔️ 史詩系(Epic)
- 主色:金色系
- 適合:中世紀、王國、戰爭、榮耀
6. 🎨 自訂(Custom)
- 提供主色 HEX 或描述風格
Based on user choice, generate an HSL color scheme:
Cool:
--color-primary-h: 217; /* Blue */
--color-secondary-h: 180; /* Cyan */
--color-tertiary-h: 260; /* Purple */
--color-quaternary-h: 200; /* Sky blue */
Warm:
--color-primary-h: 25; /* Orange */
--color-secondary-h: 45; /* Gold */
--color-tertiary-h: 0; /* Red */
--color-quaternary-h: 350; /* Rose */
Nature:
--color-primary-h: 142; /* Green */
--color-secondary-h: 80; /* Yellow-green */
--color-tertiary-h: 30; /* Brown */
--color-quaternary-h: 160; /* Teal */
Dark:
--color-primary-h: 280; /* Purple */
--color-secondary-h: 320; /* Magenta */
--color-tertiary-h: 0; /* Blood red */
--color-quaternary-h: 260; /* Deep purple */
Epic:
--color-primary-h: 45; /* Gold */
--color-secondary-h: 30; /* Bronze */
--color-tertiary-h: 0; /* Red */
--color-quaternary-h: 15; /* Orange gold */
Update docs/src/styles/custom.css with selected colors.
If user chose background image, uncomment background-image in CSS:
body {
background-color: var(--sl-color-black);
background-image: url('/bg.jpg');
background-size: cover;
background-position: center;
background-attachment: fixed;
background-repeat: no-repeat;
}
Invoke terminology-management skill and run candidate generation from extracted docs:
proper_nouns.mode != keep_original)Use script flow:
uv run python scripts/term_generate.py --min-frequency 2
Present terms to user for translation confirmation.
Before building the glossary, ask user to choose proper noun handling policy:
Record the decision in style-decisions.json:
{
"proper_nouns": {
"mode": "keep_original | official_only | translate_with_original_first",
"reason": "user preference"
}
}
Create glossary.json with confirmed terms:
{
"Term": {
"zh": "translation",
"notes": "usage context"
}
}
Then run terminology read/check:
uv run python scripts/term_edit.py --term "<TERM>" --cal
uv run python scripts/term_edit.py --term "<TERM>" --set-zh "<ZH>" --status approved --mark-term
uv run python scripts/term_read.py
Rules:
glossary.json is the only source of truth.term_edit.py must run with --cal before editing.--cal runs.proper_nouns.mode != keep_original, proper nouns with frequency >= 2 must be added as managed glossary terms.Ask user about style preferences and record in style-decisions.json.
uv run python scripts/split_chapters.py
Before chapter splitting, create/update docs/src/content/docs/index.md using project metadata and style decisions.
style-decisions.json:
repository.visibilityrepository.urlrepository.show_on_homepagevisibility=public and show_on_homepage=true, include a visible GitHub Repo link in index.md.visibility=private, do not render repo link.style-decisions.json as source of truth.After initial split, analyze the generated index.md to create proper chapter structure:
Identify TOC Structure
Propose Chapter Split Present to user:
找到以下章節結構:
1. [章節名稱] - 約 XXX 字
2. [章節名稱] - 約 XXX 字
...
建議拆分為獨立檔案嗎?
Execute Split For each identified chapter:
sidebar.order to preserve TOC sequenceFrontmatter Template
---
title: Chapter Title
description: Chapter Description
sidebar:
order: N # Keep original table of contents order
---
Finalize chapters.json after all splits are done:
sidebar.order and actual navigationdocs/src/content/docs/cd docs && bun devSave all visual settings to style-decisions.json:
{
"theme": {
"mode": "dark",
"palette": "cool",
"overlay_opacity": 0.7
},
"images": {
"hero": "image_001.jpg",
"background": "image_003.jpg",
"og": "image_001.jpg"
},
"colors": {
"primary_h": 217,
"secondary_h": 180,
"tertiary_h": 260,
"quaternary_h": 200
},
"proper_nouns": {
"mode": "official_only",
"reason": "使用者偏好官方或通行譯名"
},
"repository": {
"visibility": "public",
"url": "https://github.com/<username>/<project_name>",
"show_on_homepage": true
}
}
After cropping and split operations are complete:
docs/src/content/docs/.data/pdfs/)並確認來源檔案extract_pdf.py)並檢查 data/markdown/ 輸出style-decisions.jsonglossary.json 與風格決策split_chapters.py)style-decisions.json 產生首頁 index.md(含 repo link 顯示規則)index.md 分析與章節拆分落檔chapters.json 最終配置,且順序與 sidebar 一致style-decisions.json 設定紀錄/init-doc
/init-doc data/pdfs/rulebook.pdf