用于将"今日头条/"目录内指定章节批量上传到今日头条作者后台并保存为草稿。支持按 README.md 读取账号、密码、作者笔名、小说名称与书籍ID,自动执行登录、按新建/修改分流填写标题与正文、完成发布设置(声明首发/合集)。系统自动保存,无需手动点击保存按钮。关键词:今日头条上传、自动保存、批量传章、声明首发、合集、草稿。
npx skills add https://github.com/lornshrimp/Lorn.NovelWriteSkills --skill 分发-今日头条
<!-- ===== Layer 1: 永久缓存 ===== -->
用于把你指定的 1 章或多章,上传到今日头条对应账号下,系统将自动保存为草稿。
<!-- ===== Layer 3: 场景缓存 ===== -->
本 Skill 执行前,必须按以下规则确定工作目录:
Agents.md,检查其中 主输出平台 声明主输出平台 → 工作目录为 小说正文/主输出平台,或 Agents.md 不存在/未声明 主输出平台 → 工作目录为 今日头条/后续所有章节文件路径、README.md、分发记录.md 均基于此工作目录。明确说明:
README.md、分发记录.md 均在 小说正文/ 下README.md、分发记录.md 均在 今日头条/ 下> 路径说明:以下各节中所有 今日头条/ 形式的路经(如 今日头条/README.md、今日头条/分发记录.md)均为工作目录的示例写法。实际目录由上方「工作目录路由规则」确定:本平台是主输出平台时,所有这些路径对应 小说正文/;不是主输出平台时,对应 今日头条/。
今日头条/ 目录。今日头条/README.md 写好账号、密码、作者笔名、小说名称与书籍ID等信息。今日头条/ 下。第{绝对章节号}章 {章节标题}。章号 与 标题 之间必须保留 1 个空格,例如:第1章 天降奇缘。天降奇缘),则必须自动组装成 第{绝对章节号}章 天降奇缘。今日头条/README.md,至少提取以下信息:读取 今日头条/README.md 后,必须检查其第一行一级标题是否等于 # 今日头条分发配置:
README.md 平台标识与当前 Skill 不符:预期"今日头条分发配置",实际读取到"{实际读取到的标题}"。请检查是否将其他平台的 README.md 误放到了当前工作目录。今日头条/分发记录.md:README.md 中的"小说名称(小说书名)"。README.md 中与"小说名称(小说书名)"成对维护的书籍Id。分发记录.md 模板(首次创建直接使用)# 今日头条分发记录
> 用途:记录"章节唯一键 -> 头条章节Id"映射,供分发流程判断"新建模式/修改模式"。
## 字段说明
- `章节唯一键`:固定格式 `头条书籍ID|分部名|绝对章号|章名`(无分部时分部名填 `NA`)
- `头条书籍ID`:对应 `今日头条/README.md` 中书籍ID
- `章节Id`:编辑地址中的 `pgc_id` 参数(纯数字)
- `最近操作`:`新建` 或 `修改`
- `更新时间`:`YYYY-MM-DD HH:mm:ss`
- `备注`:可选
## 记录表
|章节唯一键|头条书籍ID|章节Id|最近操作|更新时间|备注|
|:--|--:|--:|:--|:--|:--|
README.md 模板(首次创建直接使用)当 今日头条/README.md 不存在时,必须按以下模板创建:
# 今日头条分发配置
> 用途:存储今日头条账号、作者信息与书籍ID。分发流程将读取此文件。
## 账号信息
- 用户名:`your_username`
- 密码:`your_password`
## 作者信息
- 作者笔名:`笔名`
## 书籍信息
### 无分部小说
| 小说名称 | 头条书籍ID |
|:--|--:|
| 作品名 | 11997642 |
### 有分部小说
| 分部号 | 分部名 | 头条书籍ID |
|:--|:--|--:|
| 第1部 | 分部一书名 | 11997642 |
| 第2部 | 分部二书名 | 11997643 |
## 卷名映射
### 分部一书名
| 卷号 | 卷名 |
|--:|:--|
| 1 | 第一卷 卷标题 |
| 2 | 第二卷 卷标题 |
### 分部二书名
| 卷号 | 卷名 |
|--:|:--|
| 1 | 第一卷 卷标题 |
| 2 | 第二卷 卷标题 |
## 字段说明
- `小说名称` / `分部名`:必须精确匹配 SKILL 中的"书名判定规则"
- `分部号`:必须使用 `第N部` 规范格式(如 `第1部`、`第2部`),并与 `分部名` 一一对应,不得错位或复用
- `头条书籍ID`:纯数字,从今日头条后台获取
- `作者笔名`:用于元信息标记
## 安全提醒
- 本文件包含明文密码,请妥善保管。
- 本文件应存入 `.gitignore`,不提交到公开仓库。
今日头条/README.md。今日头条/分发记录.md,建立"章节唯一键 -> 章节Id"映射(建议唯一键:头条书籍ID|分部名|绝对章号|章名;无分部时分部名固定为 NA)。分发记录.md 中同一目标书籍Id下全部已记录章节;绝对章号排序后,计算当前章节的绝对序号。绝对章节号 = 前面各卷章节数之和 + 该章节在所在卷的相对章号。分发记录.md 不存在或无历史记录,则按上述公式从已知卷章结构计算;无法确定前卷章数时需先补齐台账后再发布。https://mp.toutiao.com/README.md 中的用户名和密码完成登录。今日头条/分发记录.md:章节Id:走修改模式。章节Id:走新建模式。https://mp.toutiao.com/profile_v4/graphic/publishhttps://mp.toutiao.com/profile_v4/graphic/publish?pgc_id={章节Id}第{绝对章节号}章 {章节标题}。gid,两者至少命中其一才算成功。https://mp.toutiao.com/profile_v4/manage/drafthttps://mp.toutiao.com/profile_v4/graphic/publish?pgc_id={章节Id}pgc_id 后面的数字部分作为新的章节Id。今日头条/分发记录.md:章节Id(如变化)和更新时间。> 目标:在不放松现有强制规则的前提下,减少重复点击、重复粘贴与重复判定成本。
分发记录.md)。{平台目录}/.cache/content_parts/no_part/v{卷号}/*.txt、{平台目录}/.cache/content_parts/p{分部号}/v{卷号}/*.txt + 映射表),浏览器阶段只做“取数据→填写→保存”。1) 打开目标地址(按记录走新建或修改);
2) 填标题;
3) 填正文;
4) 填平台扩展字段(如作者话/发布设置);
5) 保存草稿;
6) 提取章节Id;
7) 回写记录。
5–10 章为一个小批次执行:分发记录.md;> D / E / F 三节统一执行口径:优先保证批次连续性与可回滚性;安全验证类提示一律按阻断处理;数据通道异常必须可降级。
scripts/content_parts_server.mjs:/parts/v/{卷号}/{章号}/parts/p/{分部号}/v/{卷号}/{章号}/parts/{章号} 仅限单批次临时使用。分发记录.md 的实时查询。content_parts_server)时必须提供降级路径:服务不可用时自动回退到本地文件读取,不中断批次执行。计划章数 = 成功章数 + 失败章数,且成功章均完成 章节Id 回写。https://mp.toutiao.com/。第X章 标题文本(X 为绝对章节号,章号与标题之间有 1 个空格)。pgc_id 并回写 今日头条/分发记录.md。分发记录.md 写入失败:流程标记为"部分失败(记录未落盘)",并提示人工补录。pgc_id 的 URL,这是回写章节Id最稳定来源。第X章 标题文本,能避免章节号漏填或空格遗漏。pgc_id 最稳定的流程是:保存后 → 进入草稿箱 → 按标题找到文章 → 点击"编辑" → 从新 URL 提取 pgc_id。第X章 + 语义压缩标题”重试,通常可恢复保存。/mp/agw/creator_center/draft_list?type=0&offset=0&count=300&app_id=1231 可稳定读取 title + gid,用于判定是否保存成功与回写章节Id。计划章数 = 成功章数 + 失败章数;全批结束执行 1..N 章节映射完整性校验(缺失章必须继续补传)。今日头条/README.md 并提取必需字段。今日头条/分发记录.md 并正确区分新建/修改模式。pgc_id。今日头条/分发记录.md(含章节与章节Id映射)。Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take lornshrimp/分发-今日头条 from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.