csdn-upload
通过 Playwright + 直连 API(X-Ca HMAC-SHA256 签名)将本地博文批量上传到 CSDN 草稿箱。三态管理:未上传 → 草稿箱 → 已发布。
Skill by ricky-theseus
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ricky-theseus-csdn-upload
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/csdn-upload
Tools it pre-approves 5
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadWriteGrepBashAgent
What's inside
- Skill name
csdn-upload- Description
- 通过 Playwright + 直连 API(X-Ca HMAC-SHA256 签名)将本地博文批量上传到 CSDN 草稿箱。三态管理:未上传 → 草稿箱 → 已发布。
- License
- GPL-3.0
- Allowed tools
- Read, Write, Grep, Bash, Agent
- Instructions
- 217 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Pre-approves any shell command
- Instructions call the network
Files (2)
- SKILL.md
- playwright_uploader.py · scripts/
SKILL.md (first lines)
# CSDN 草稿批量上传
## 三态管理
| 状态 | 含义 | 判定依据 |
|------|------|----------|
| **未上传** | 本地有草稿,未上传到 CSDN | 不在 `csdn_article_map.json`,不在已发表集合 |
| **草稿箱** | 已上传到 CSDN 但未发布 | `csdn_article_map.json` 中 `status: "draft"` |
| **已发布** | 已在 CSDN 公开发布 | `published.json` 中有记录,或在 `已发表/` 目录 |
数据流向:
```
未上传 ──upload──→ 草稿箱 ──manual publish──→ 已发布
│
└──sync──→ csdn_article_map.json (status→published)
```
## 使用
### 首次登录
```bash
python scripts/playwright_uploader.py --login
```
弹出浏览器 → 手动登录 CSDN → 在编辑器页面出现后关闭浏览器 → 登录态保存到 `chrome_profile/`。
### 查看状态
```bash
python scripts/playwright_uploader.py --dry-run
```
列出所有草稿的三态分布,不下发任何请求。
### 上传到草稿箱
```bash
python scripts/playwright_uploader.py
python scripts/playwright_uploader.py --no-confirm # 跳过确认
python scripts/playwright_uploader.py --retry-failed # 只重试上次失败的
```
使用直连 API(非 UI 操作),自动重试频率限制。
### 同步已发布状态
```bash
python scripts/playwright_uploader.py --sync
```
对比 `published.json` / `已发表/` 目录,将 `csdn_article_map.json` 中对应文章从 `draft` 标记为 `published`。
## 命令参考
| 命令 | 作用 |
|------|------|
| `--login` | 首次登录,保存浏览器状态 |
| `--dry-run` | 预览三态分布,不操作 |
| `--sync` | 同步已发表状态到映射文件 |
| `--retry-failed` | 只重试上次失败的未上传文章 |
| `--no-confirm` | 跳过确认提示直接上传 |
## 工作原理
### 架构
```
Python 脚本 ──Playwright──→ 浏览器(提供 Cookie 环境)
│
├── page.evaluate(JS) 注入 HMAC 签名计算
└── fetch() → POST bizapi.csdn.net/saveArticle
```
不使用 UI 操作(CSDN 的 Vue 3 contenteditable 编辑器不稳定且不触发 saveArticle API)。
### X-Ca 签名算法
CSDN 的 bizapi 使用阿里云 API 网关风格的四层签名:
| 参数 | 值 |
|------|-----|
| `X-Ca-Key` | `203803574` |
| `X-Ca-Secret` | `9znpamsyl2c7cdrr9sas0le9vbc3r6ba` |
| `X-Ca-Nonce` | 每次请求新生成的 UUID v4 |
| `X-Ca-Signature-Headers` | `x-ca-key,x-ca-nonce` |
签名字符串格式(HMAC-SHA256 → Base64):
```
POST\n
*/*\n
\n
application/json\n
\n
x-ca-key:{key}\n
x-ca-nonce:{nonce}\n
/path
```
签名在浏览器内用 `crypto.subtle.sign('HMAC', ...)` 计算,避免 Python 端逆向兼容问题。
### 频率限制
- 每次 POST 后至少等待 **10 秒**
- 触发频率限制后重试,退避策略:10s → 20s → 失败(最多 3 次)
- 连续多发容易触发 CSDN 的"请求太过频繁"防护
## 输入源
- 递归搜索 `博文/**/草稿/*.md`
- 每篇博文要求(技术博文规范):
- 最低 800 中文字符(不含代码块/Mermaid)
- 含 Mermaid 图
- 标题、分类、标签等元信息上传时由脚本构造
## 状态存储From ricky-theseus/DaisyWriter, GPL-3.0.
More from ricky-theseus/DaisyWriter
- 0.580score
xiaohongshu-technical-post-copy
ricky-theseus
Use when writing Xiaohongshu technical post copy that accompanies a technical infographic, especially for engineering, AI, chip, or CUDA readers who need…
SkillCFreshness: C★ 76Claude Code +9 - 0.580score
xiaohongshu-minimal-technical-infographic
ricky-theseus
Use when creating clean 3:4 vertical technical teaching infographics for Xiaohongshu or social media, especially minimal grayscale engineering diagrams that…
SkillCFreshness: C★ 76Claude Code +9 - 0.578score
skill-writer
ricky-theseus
AI-powered writing toolkit — Web novel, Short story, Technical blog, Publishing automation / AI 驱动写作工具包 — 网文、短篇、技术博文、发布自动化
SkillCFreshness: C★ 76Claude Code +9 - 0.578score
fanqie-publish
ricky-theseus
Publish novel chapters from local Markdown files to the Fanqie Novel writer backend via browser automation.
SkillCFreshness: C★ 76Claude Code +9 - 0.574score
wechat-article-writer
ricky-theseus
撰写微信公众号文章。包括选择文章类型、套用排版模板、生成配图、转换HTML、添加底部模板、审稿。触发词:写一篇公众号文章、写微信推文、帮我把这篇写完、继续写这篇。
SkillCFreshness: C★ 76Claude Code +9 - 0.574score
cover-maker
ricky-theseus
纯 AI 生图制作网文封面 & 技术博客封面。网文:600×800 竖版存入 作品信息/。技术博客:800×600 横版存入 博文/{系列}/cover.png。
SkillCFreshness: C★ 76Claude Code +9 - 0.572score
webnovel-review-settings
ricky-theseus
设定集审核专家。深度检查世界观、力量体系、角色、势力、经济、历史、创意约束等设定文件的质量与自洽性,输出问题清单。
SkillCFreshness: C★ 76Claude Code +9 - 0.572score
webnovel-review
ricky-theseus
使用审查 Agent 评估章节质量,生成报告并写回审查指标。
SkillCFreshness: C★ 76Claude Code +9 - 0.572score
webnovel-plan
ricky-theseus
基于总纲生成卷纲、时间线和章纲,并把新增设定增量写回现有设定集。
SkillCFreshness: C★ 76Claude Code +9 - 0.572score
webnovel-write
ricky-theseus
产出可发布章节。单章撰写,三模式:默认/--fast/--minimal。批量模式请用 webnovel-batch。
SkillCFreshness: C★ 76Claude Code +9 - 0.572score
webnovel-init
ricky-theseus
深度初始化网文项目。通过分阶段交互收集完整创作信息,生成可直接进入规划与写作的项目骨架与约束文件。
SkillCFreshness: C★ 76Claude Code - 0.572score
webnovel-query
ricky-theseus
查询项目设定、角色、力量体系、势力、伏笔等信息。支持紧急度分析与金手指状态查询。
SkillCFreshness: C★ 76Claude Code +9
Signals
- Stars
- 76
- Forks
- 5
- Open issues
- 0
- Last commit (this folder)
- Jun 28, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- GPL-3.0
- Repository
- github.com/ricky-theseus/DaisyWriter
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ricky-theseus
- 0.580score
xiaohongshu-technical-post-copy
ricky-theseus
Use when writing Xiaohongshu technical post copy that accompanies a technical infographic, especially for engineering, AI, chip, or CUDA readers who need…
SkillCFreshness: C★ 76Claude Code +9 - 0.580score
xiaohongshu-minimal-technical-infographic
ricky-theseus
Use when creating clean 3:4 vertical technical teaching infographics for Xiaohongshu or social media, especially minimal grayscale engineering diagrams that…
SkillCFreshness: C★ 76Claude Code +9 - 0.578score
fanqie-publish
ricky-theseus
Publish novel chapters from local Markdown files to the Fanqie Novel writer backend via browser automation.
SkillCFreshness: C★ 76Claude Code +9 - 0.578score
skill-writer
ricky-theseus
AI-powered writing toolkit — Web novel, Short story, Technical blog, Publishing automation / AI 驱动写作工具包 — 网文、短篇、技术博文、发布自动化
SkillCFreshness: C★ 76Claude Code +9 - 0.574score
wechat-article-writer
ricky-theseus
撰写微信公众号文章。包括选择文章类型、套用排版模板、生成配图、转换HTML、添加底部模板、审稿。触发词:写一篇公众号文章、写微信推文、帮我把这篇写完、继续写这篇。
SkillCFreshness: C★ 76Claude Code +9 - 0.574score
cover-maker
ricky-theseus
纯 AI 生图制作网文封面 & 技术博客封面。网文:600×800 竖版存入 作品信息/。技术博客:800×600 横版存入 博文/{系列}/cover.png。
SkillCFreshness: C★ 76Claude Code +9
Cite this page
csdn-upload skill. Agent Mart. https://agentmart.dev/skills/ricky-theseus-csdn-upload (last updated 2026-10-24)