{"id":49465085,"url":"https://github.com/nihildigit/report-authoring","last_synced_at":"2026-04-30T12:05:13.846Z","repository":{"id":352801324,"uuid":"1216671462","full_name":"NihilDigit/report-authoring","owner":"NihilDigit","description":"We all hate docx, but life goes on. An agent skill for lab reports and coursework.","archived":false,"fork":false,"pushed_at":"2026-04-21T06:39:37.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T08:31:00.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NihilDigit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T06:03:27.000Z","updated_at":"2026-04-21T06:39:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/NihilDigit/report-authoring","commit_stats":null,"previous_names":["nihildigit/report-authoring"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/NihilDigit/report-authoring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NihilDigit%2Freport-authoring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NihilDigit%2Freport-authoring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NihilDigit%2Freport-authoring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NihilDigit%2Freport-authoring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NihilDigit","download_url":"https://codeload.github.com/NihilDigit/report-authoring/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NihilDigit%2Freport-authoring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32463934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-30T12:04:18.045Z","updated_at":"2026-04-30T12:05:13.830Z","avatar_url":"https://github.com/NihilDigit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# report-authoring\n\n一个 **agent skill**，用于撰写中文学术/工程类 docx 报告——实验报告、课程设计、项目总结、毕业设计等。\n\n**核心工作流**：需求对齐 → 理解模板 → md 成稿 → 资产处理 → 拼接 → QA，每阶段都 HITL 回到用户。\n\n## 为什么需要这个 skill\n\n中文高校/公司的 docx 报告有很多**重复的体力活**：\n\n- 正文章节按老师给的模板表格 cell 填写\n- 代码片段要有语法高亮、格式规整\n- 程序运行截图要裁切、居中、有编号 caption\n- 字号字体行距符合「宋体五号 1.5 倍行距」之类的惯例\n\n这些活**机械但容易出错**：代码缩进被 Word 吃掉、caption 编号跳号、图片格式被拉伸、OOXML 样式写错\n导致文件打不开…… 本 skill 把这套流程沉淀成可复现的工具 + 文档，让 Agent 跟用户协作高效产出。\n\n## 能力一览\n\n| 阶段 | 能力 |\n|---|---|\n| 理解模板 | python-docx 摘要 + OOXML XML 解析 |\n| md 成稿 | 与用户协作的 markdown 中转稿模式，占位符约定 |\n| 代码展示 | silicon 语法高亮图（推荐）/ 文字代码块（左竖线 + 灰底） |\n| 终端截图 | Niri + Alacritty 无鼠标全自动 / 其他平台指导手动 |\n| 图片处理 | ImageMagick 裁空白、按原始分辨率居中、禁止并排、编号 caption |\n| 排版规范 | 中文字号字体行距、caption 样式、章节内编号规则 |\n| 打包 QA | docx → PDF 预览 → 清单式核查 |\n\n## 安装\n\n本仓库符合 [Agent Skills 开放标准](https://agentskills.io)（Anthropic 2025 年 10 月发布，12 月开放，\n已有 40+ 平台采纳：Claude Code / Cursor / OpenAI Codex / GitHub Copilot / Gemini CLI / JetBrains Junie / OpenHands 等）。\n\n**最简单**：直接跟你的 Agent 说：\n\u003e 安装 report-authoring skill  \n\u003e （或：帮我把 https://github.com/NihilDigit/report-authoring 装成一个 skill）\n\nAgent 应能理解并把仓库 clone 到正确位置。\n\n**手动安装**（各平台 skill 目录）：\n```bash\n# Claude Code\ngit clone https://github.com/NihilDigit/report-authoring.git ~/.claude/skills/report-authoring\n\n# Cursor / VS Code Copilot / Gemini CLI 等多数平台\ngit clone https://github.com/NihilDigit/report-authoring.git \u003c平台的 skills 目录\u003e\n```\n\n`SKILL.md` 的 YAML frontmatter 遵守标准字段（`name` / `description` / `allowed-tools`），\n各平台都能识别。Claude Code 专有扩展字段（`context: fork` 之类）本 skill 未使用，确保最大兼容性。\n\n## 依赖\n\n运行时需要：\n\n| 工具 | 必需度 | 用途 |\n|---|---|---|\n| Python 3.10+ | ★ 必需 | builders / scripts |\n| `python-docx` | ★ 必需 | 模板摘要 |\n| `silicon`     | ★ 必需 | 代码图片渲染 |\n| `ImageMagick` | ★ 必需 | 图片裁切 |\n| `LibreOffice` / `soffice` | 必需 | docx → PDF 预览 |\n| `poppler`（`pdftoppm`） | 必需 | PDF → JPG 预览 |\n| Niri 25+ / Hyprland / Sway | 可选 | Wayland 合成器下终端截图全自动 |\n| Alacritty | 可选 | 搭配上面自动截图 |\n| `jq` | 可选 | 配合 Niri JSON 输出 |\n\nArch / CachyOS 一键装：\n```bash\nsudo pacman -S python-docx silicon imagemagick libreoffice-fresh poppler alacritty jq\n# Niri 按自己窗口管理器选择\n```\n\n## 快速开始\n\n用户给 Agent：「帮我写实验报告，模板是 `~/实验一模板.docx`，项目在 `~/code/exp1`。」\n\nAgent 自动按 SKILL.md 里的**五阶段流程**推进：\n1. 阶段 0：问清楚报告类型、交付目标、排版偏好\n2. 阶段 1：`inspect_template.py` 摘要模板\n3. 阶段 2：与用户一起在 `report.md` 写正文，边写边 HITL\n4. 阶段 3：`capture.sh` / `silicon_cli.sh` / `trim_png.sh` 批量生成图\n5. 阶段 4：`builders.py` 拼接进 docx\n6. 阶段 5：`preview_docx.sh` QA → 交付\n\n## 扩展机制\n\n本 skill 设计成**渐进式积累**，做完一份新报告后发现坑/技巧就往对应文件里加：\n\n- 新工具链坑 → `docs/pitfalls.md`\n- 新样式约定 → `docs/typography.md` / `docs/caption-spec.md`\n- 新类型报告 → `report-formats/\u003ckind\u003e.md`\n- 新自动化工具 → `scripts/`\n\n## 路线图\n\n- [ ] 其他 Agent 平台适配（Gemini、Codex、自建 Agent）\n- [ ] Windows 上手动截图的 helper（目前是 Agent 指导）\n- [ ] `report-formats/` 扩充：课程设计、毕设、技术方案\n- [ ] 表格（`\u003cw:tbl\u003e`）builder\n- [ ] 自动编号的公式（非代码类 caption）\n\n## 贡献\n\n**欢迎踩坑 → 提 Issue / PR**。本 skill 设计成渐进式积累：\n\n- 发现新的工具链坑 / OOXML schema 坑 → 往 `docs/pitfalls.md` 里加条目\n- 新类型报告的结构约定 → 在 `report-formats/` 加 `\u003ckind\u003e.md`\n- 新的排版技巧 / 字体组合 → 更新 `docs/typography.md` 或 `docs/caption-spec.md`\n- 新的自动化工具（其他窗口管理器的截图、新的代码渲染器等）→ `scripts/` 加小工具 + 更新 SKILL.md 导航\n\nIssue 模板建议说清楚：触发条件、期望行为、实际表现、最好附上最小复现。PR 欢迎所有合理改进。\n\n## License\n\nMIT（见 LICENSE）\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihildigit%2Freport-authoring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnihildigit%2Freport-authoring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihildigit%2Freport-authoring/lists"}