Skip to content

Ghostricke9/StudyAgent / skills/document-compiler

document-compiler

Verified

将多个章节和练习题汇编成完整教材,添加封面、目录、排版优化

FileKindSize
SKILL.mdskill md2.3 KB
scripts/word_counter.pyscript1.5 KB
templates/cover.mdmarkdown664 B
templates/style_guide.mdmarkdown1.2 KB
---
name: document-compiler
description: 将多个章节和练习题汇编成完整教材,添加封面、目录、排版优化
tags: [writing, compilation, formatting]
---

## 技能:汇编最终教材

### 何时使用
当你已经完成所有章节的编撰和练习题的生成,需要将它们组装成一本完整、排版精良的教学教材时,调用此技能。

### 子资源文件

本技能目录下附带辅助资源,可按需使用:

| 文件 | 用途 | 何时使用 |
|------|------|----------|
| `templates/cover.md` | 教材封面模板 | 组装教材时引用,生成统一的封面页 |
| `templates/style_guide.md` | 排版风格指南 | 统稿时参考,确保全书风格一致 |
| `scripts/word_counter.py` | 字数统计脚本 | 执行 `python {skill_dir}/scripts/word_counter.py <file>` 检查篇幅 |

### 汇编步骤

1. **统稿**:阅读所有已生成的章节,检查术语一致性
   - 同一概念在不同章节是否用了相同叫法
   - 示例代码的变量命名风格是否一致
   - 参考 `templates/style_guide.md` 中的规范

2. **生成封面**:为教材添加标准封面
   - 使用 `templates/cover.md` 中的模板
   - 填入主题名称、章节数、生成日期

3. **组装目录**:为整本教材生成目录
   - 列出所有章节标题和对应页码(可用 Markdown 锚点替代)

4. **编排顺序**:按以下顺序组装最终教材:
   ```
   封面 → 目录 → 学习路线图(如有)→ 第1章 → 练习题1
   → 第2章 → 练习题2 → ... → 附录/参考资料
   ```

5. **控制篇幅**:统稿后如果某章过长或过短,可以用 `scripts/word_counter.py` 检查并调整

### 输出格式

最终教材使用以下 Markdown 结构:

```markdown
# [教材名称]

> **编著**: StudyHelper Agent
> **日期**: YYYY-MM-DD
> **章节**: N章 | **配套练习**: N套

---

## 目录

1. [第1章: 标题](#第1章)
   - 练习题
2. [第2章: 标题](#第2章)
   - 练习题
...

---

## 第1章: [标题]

[正文内容]

---

## 练习题: [第1章名称]

[练习题内容]

---

## 第2章: [标题]

...
```

### 完成动作
汇编完成后,使用 `save_document` 将完整教材保存为 Markdown 文件。
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall