yangyongzhen/dsh-article-publish
将DeepSeek Harness的文章发布到CSDN / 掘金 / 博客园。dsh插件。
Project Overview项目介绍
This is a native DeepSeek Harness plugin that enables DSH agents to publish articles directly from chat sessions to three major Chinese tech blogging platforms: CSDN, Juejin, and BlogCN. It can be installed directly via the DSH CLI using either a local file path or the remote Git URL hosted on GitCode. It has no external dependencies, unlike similar tools that require a separate MCP server to run, because all publishing logic is implemented directly within the plugin itself. To install, users simply run the command dsh plugin --profile <web|tui|headless> add [path-or-url] in their local terminal.
The plugin offers two core tools for users: publish_article and fetch_news. fetch_news pulls a random tech article from BlogCN’s RSS feed to use as writing inspiration or source material for new posts. publish_article handles publishing or updating existing articles, accepting parameters for platform, title, Markdown content, optional description, and optional CSDN article ID for updates. It is targeted at technical writers and developers who publish regularly to any of the three supported platforms, letting them complete their entire workflow from getting material to final publish all inside DSH, without ever leaving the DSH chat interface.
Before using the plugin, users must configure login cookies for each platform they want to publish to. There are three configuration options, ordered from highest to lowest priority: profile configuration in cordis.patch.yml, environment variables, and a default error prompt that asks users to fill in missing credentials. Users can get their cookies manually via browser developer tools, or use a third-party Rust tool called mcp-server-article to export cookies directly from a Chrome debug port. Currently, the plugin fixes category and tag values for all three platforms, with support for custom values planned for future releases.
这是一款专为DeepSeek Harness打造的原生插件,允许DSH代理在会话中完成文章创作后,直接调用工具将文章发布到CSDN、掘金、博客园三大技术平台,同时还提供了从博客园RSS拉取随机科技资讯作为写作素材的功能。该插件无外部依赖,不需要额外运行MCP服务器或其他进程,所有发布逻辑都直接内置实现。
该插件提供两个核心工具,publish_article支持发布或更新文章,可自定义标题、Markdown内容、摘要,还支持更新已有的CSDN文章;fetch_news用于获取随机科技资讯作为写作素材。它适合经常在三大平台更新技术内容的开发者,能够在DSH中完成从素材获取、写作到发布的全流程,不需要切换到浏览器手动操作发布。
使用前需要配置各平台的登录凭据,支持三种配置方式,优先级从高到低分别是profile配置、环境变量、缺省错误提示。可以通过浏览器开发者工具手动复制对应Cookie,也可借助第三方Rust工具从Chrome调试端口导出。目前插件暂固定三大平台的分类和标签,后续版本会开放自定义配置选项。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-article-publish(yangyongzhen/dsh-article-publish)
仓库:https://github.com/yangyongzhen/dsh-article-publish
本站详情页:https://www.yhbd.top/plugins/yangyongzhen-dsh-article-publish/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 3 · 最近提交 2026-08-14 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add https://gitcode.com/qq8864/dsh-article-publish.git
把 yangyongzhen/dsh-article-publish 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-article-publish
DeepSeek Harness 文章发布插件:agent 在会话里写完文章,直接调用工具发布到 CSDN / 掘金 / 博客园,还能拉取科技资讯当素材。无外部依赖——发布逻辑直接实现(API 参考 mcp-server-article),不需要 MCP server、不需要额外进程。
功能
| dsh 工具 | 说明 |
|---|---|
publish_article |
发布/更新文章到 CSDN / 掘金 / 博客园,返回文章链接 |
fetch_news |
获取一条科技资讯(博客园 RSS 随机一篇),当素材 |
publish_article 参数:platform(csdn|juejin|cnblog)、title、content(Markdown)、可选 description(csdn/juejin,为空自动截取前 100 字)、可选 articleId(csdn,传入则原地更新)。
平台实现要点(已内置,无需额外服务):
- CSDN:阿里云网关 HMAC-SHA256 签名请求(x-ca-* headers),外链图片自动转存到 CSDN 图床(csdnimg.cn),转存失败的 gitcode 图片回退 wsrv.nl 代理
- 掘金:创建草稿 → 发布(两步)
- 博客园:cookie + x-xsrf-token
安装
dsh plugin --profile <web|tui|headless> add file:/path/to/dsh-article-publish
# 或
dsh plugin --profile <web|tui|headless> add https://gitcode.com/qq8864/dsh-article-publish.git
配置(登录凭据)
发布需要各平台登录 Cookie。三种配置方式,优先级从高到低:
1. profile 配置(cordis.patch.yml)
- id: article-publish
config:
enabled: true
csdnCookie: '' # CSDN 登录 Cookie
juejinCookie: '' # 掘金登录 Cookie
cnblogCookie: '' # 博客园 Cookie
cnblogToken: '' # 博客园 x-xsrf-token
cnblogUsername: '' # 博客园用户名(拼文章链接用)
2. 环境变量(推荐,不进仓库)
export CSDN_COOKIE='...'
export JUEJIN_COOKIE='...'
export CNBLOG_COOKIE='...'
export CNBLOG_TOKEN='...'
export CNBLOG_USERNAME='...'
3. 缺省时报错提示
Cookie 为空时工具返回友好错误,明确告诉你要配哪个。
怎么拿 Cookie:浏览器登录平台后,DevTools → Application → Cookies 复制对应域名的 Cookie;或复用 mcp-server-article get-cookies(Rust 工具,可从调试端口 Chrome 导出)作为辅助获取手段。
使用示例
调用 fetch_news 获取一条科技资讯,写一篇 300 字短文,然后调用 publish_article 发布到 CSDN。
开发与验证
pnpm install
pnpm run build # tsc -> lib/
node test/publish.test.mjs # fetch 拦截单测:验证三平台请求构造(签名/body/两步顺序/xsrf),不发真实请求
端到端(headless,无 Cookie 时验证工具链路与错误传播):
dsh plugin --profile headless add file:./
dsh --profile headless --patch ./test/test-patch.yml \
"调用 publish_article 工具把《测试文章》发布到掘金"
已知说明
@deepseek-ai/dsh-tools声明为 peerDependency:运行时从 dsh 闭包解析,避免双副本导致的 symbol 不匹配(agent-loop 调度器崩溃)。安装若提示 peer 缺失警告可忽略。- CSDN 标签固定为"后端"、掘金分类/标签固定为"后端"(与 mcp-server-article 行为一致),后续可加配置。
yogsoth-ai/de-anthropocentric-research-engine
ZSeven-W/dsh-openpencil
HanaAyane/dsh-reasoning-effort
HuanLinOTO/dsh-plugin-better-sidebar-plugin-office
joeseesun/qiaomu-rss-dsh