用途:对 note.com 上已存在的草稿文章,通过浏览器自动化设置哈希标签并发布。前提是已用 note-draft 技能或手动创建草稿,首次设置与 note-draft 共用(npm install、Playwright、.env)。
主要能力:设置哈希标签、发布文章或仅设标签保持草稿、从 Markdown 前置元数据读取标签、跳过确认提示、选择器健康检查。
使用方式:执行前用 AskUserQuestion 确认对象文章(URL 或文章键)、哈希标签(手动输入、从 MD 前置元数据获取、无标签)、是否发布。命令示例:cd "$SKILL_DIR" && node scripts/note-publish.mjs <article> --tags "AI,プログラミング" --publish;仅设标签:去掉 --publish;从 MD 读取:--md <path/to/article.md>。参数包括 <article>(必填)、--tags、--md、--publish、--yes、--help;--tags 与 --md 同时指定时 --tags 优先。
适用场景:需要为 note.com 草稿批量或自动化设置标签并发布时。
限制:依赖 note.com 的 Web UI,UI 变更可能导致选择器失效,可用 node scripts/inspect-editor.mjs <articleKey> --check 检查并更新 lib/selectors.mjs;登录失败需检查 .env;超时需检查网络;Playwright 未安装时运行 npx playwright install --with-deps chromium。失败时提示手动操作。