一键导入
article-publisher
生成长文或图文发布稿,也支持直接基于本地 md/txt 素材写作;可自动搜索资料、生成配图,并支持多渠道发布,当前已支持微信公众号和小红书发布通道。支持按阶段(search/write/illustrate/publish)单独执行或全流程编排。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
生成长文或图文发布稿,也支持直接基于本地 md/txt 素材写作;可自动搜索资料、生成配图,并支持多渠道发布,当前已支持微信公众号和小红书发布通道。支持按阶段(search/write/illustrate/publish)单独执行或全流程编排。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
**自选股助手**。通过内置股票服务管理当前用户的自选股,并查询实时行情。
管理周期性定时任务(Cron),支持添加、查看、删除任务。
提供日常基础查询能力,支持天气、时间、加密货币价格和法币汇率。
**文生图**。根据提示词生成图片并返回图片文件。
Ikaros-side unfinished-task tracker for listing open tasks, inspecting closure contracts, updating task follow-up state, and explicitly closing tasks (completed/failed).
**把本地视频转成 Markdown 文本工件**。输出时间序画面描述、OCR 和分段音轨转写,不直接给最终结论。
| api_version | v3 |
| name | article_publisher |
| description | 生成长文或图文发布稿,也支持直接基于本地 md/txt 素材写作;可自动搜索资料、生成配图,并支持多渠道发布,当前已支持微信公众号和小红书发布通道。支持按阶段(search/write/illustrate/publish)单独执行或全流程编排。 |
| triggers | ["文章发布","写文章","公众号文章","写公众号","写长文","深度报道","热点解读"] |
| runtime_target | subagent |
| change_level | learned |
| allow_ikaros_modify | true |
| allow_auto_publish | true |
| rollout_target | subagent |
| preflight_commands | ["python scripts/execute.py --help"] |
| policy_groups | ["content","research"] |
| platform_handlers | false |
| input_schema | {"type":"object","properties":{"topic":{"type":"string","description":"文章主题、写作要求或新闻话题。提供本地素材时可选。"},"source_path":{"type":"string","description":"本地 md/txt 素材路径。提供后跳过搜索,直接基于素材写作。"},"source_paths":{"type":"array","items":{"type":"string"},"description":"多个本地 md/txt 素材路径。提供后跳过搜索,直接基于素材写作。"},"publish":{"type":"boolean","description":"是否发布到所选渠道"},"publish_channel":{"type":"string","description":"发布或导出渠道,支持 wechat、xiaohongshu"},"publish_channels":{"type":"array","items":{"type":"string"},"description":"多个发布或导出渠道,支持 wechat、xiaohongshu"},"wechat_account":{"type":"string","description":"可选,指定用于发布的公众号凭据别名或 ID;未传时优先用默认项,否则回退第一条公众号凭据。"},"stage":{"type":"string","enum":["search","write","illustrate","publish"],"description":"可选,指定单独执行某个阶段。不传则执行全流程。"},"source":{"type":"string","description":"单阶段模式下的输入文件路径(research.json / article.json / article_with_images.json)。"},"word_count":{"type":"integer","description":"正文目标字数,默认为 1000。"},"current_date":{"type":"string","description":"可选,本次执行日期,格式 YYYY-MM-DD;用于新闻/快讯标题和时效搜索锚定。"},"output_dir":{"type":"string","description":"可选,仅指定中间产物和附件目录;最终草稿始终写入固定 drafts 目录。"},"action":{"type":"string","enum":["list_titles"],"description":"查询历史文章标题;查询时不执行写作和发布流程。"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"list_titles 返回数量,默认 20,最多 100。"}},"anyOf":[{"required":["topic"]},{"required":["source_path"]},{"required":["source_paths"]},{"required":["stage"]},{"required":["action"]}]} |
| tool_exports | [{"name":"article_publisher","description":"生成长文、公众号图文稿或小红书稿件,并可执行搜索、写作、配图和发布。","prompt_hint":"用户要求写文章、公众号文章、AI快讯、图文发布或发布到公众号/小红书时,直接调用 `article_publisher`;不要把 `article_publisher` 当作 shell 命令执行。","policy_groups":["content","research"],"parameters":{"type":"object","properties":{"topic":{"type":"string","description":"文章主题、写作要求或新闻话题。定时任务中的完整写作要求应放在这里。"},"source_path":{"type":"string","description":"本地 md/txt 素材路径。提供后跳过搜索,直接基于素材写作。"},"source_paths":{"type":"array","items":{"type":"string"},"description":"多个本地 md/txt 素材路径。提供后跳过搜索,直接基于素材写作。"},"publish":{"type":"boolean","description":"是否发布到所选渠道。"},"publish_channel":{"type":"string","enum":["wechat","xiaohongshu"],"description":"发布或导出渠道。"},"publish_channels":{"type":"array","items":{"type":"string","enum":["wechat","xiaohongshu"]},"description":"多个发布或导出渠道。"},"wechat_account":{"type":"string","description":"可选,指定用于发布的公众号凭据别名或 ID。"},"stage":{"type":"string","enum":["search","write","illustrate","publish"],"description":"可选,指定单独执行某个阶段。不传则执行全流程。"},"source":{"type":"string","description":"单阶段模式下的输入文件路径(research.json / article.json / article_with_images.json)。"},"word_count":{"type":"integer","description":"正文目标字数,默认为 1000。"},"current_date":{"type":"string","description":"本次执行日期,格式 YYYY-MM-DD;新闻/快讯任务应传入调度器给出的日期。"},"output_dir":{"type":"string","description":"可选,仅指定中间产物和附件目录;最终草稿始终写入固定 drafts 目录。"},"action":{"type":"string","enum":["list_titles"],"description":"查询过去写过的文章标题;查询时不执行写作和发布流程。"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"list_titles 返回数量,默认 20,最多 100。"}},"anyOf":[{"required":["topic"]},{"required":["source_path"]},{"required":["source_paths"]},{"required":["stage"]},{"required":["action"]}]}}] |
| permissions | {"filesystem":"workspace","shell":true,"network":"limited"} |
| entrypoint | scripts/execute.py |
这是长文写作与多渠道发布 skill。入口固定是 scripts/execute.py;搜索阶段内部复用 web_search,正文抓取继续走 fetch_webpage_content,不要在外部手工拆成多个 skill。
内部拆分为 4 个可组合阶段:
[search] ──research.json──► [write] ──article.json──► [illustrate] ──article_with_images.json──► [publish]
目录结构:
scripts/
├── execute.py # 编排器 + CLI 入口
├── stages/
│ ├── __init__.py # StageResult 数据类
│ ├── search.py # 搜索阶段
│ ├── write.py # 写作阶段
│ ├── illustrate.py # 配图阶段
│ └── publish.py # 发布阶段
└── utils/
├── __init__.py # ArticleData、JSON 解析、通用工具
├── wechat.py # WeChatPublisher 类
└── xiaohongshu.py # 小红书发布逻辑
python scripts/execute.py "OpenAI 最新模型发布"python scripts/execute.py "DeepSeek 新进展" --publishpython scripts/execute.py "AI 应用观察" --publish --wechat-account 主号python scripts/execute.py "AI 工作流" --publish-channel xiaohongshupython scripts/execute.py "AI 工作流" --publish --publish-channel wechat --publish-channel xiaohongshupython scripts/execute.py --source-path /abs/path/to/video_text.md "基于素材写一篇教程"python scripts/execute.py "OpenAI" --stage searchpython scripts/execute.py --stage write --source research.jsonpython scripts/execute.py --stage illustrate --source article.jsonpython scripts/execute.py --stage publish --source article_with_images.json --publish-channel wechatpython scripts/execute.py "OpenAI 最新模型发布" --raw-jsonpython scripts/execute.py --action list_titles --limit 20 --raw-jsonctx.run_skill("web_search", {...});查询词应从用户指令里提炼主题,必要时附带新闻分类、时间范围和排除对象,不要把整段长指令原样塞进搜索词。AI快讯 / 新闻快讯类标题必须优先使用素材里的大金额、大数字、强冲突或明确公司动作做钩子;当素材中有募资额、订单数、合作意向、增长率等可用数字时,不要用“进账本 / 排队 / 上桌”等抽象概念替代标题钩子。x月x日AI快讯:xxxx 这类标题格式时,冒号前格式必须保留,冒号后优先写成“大数字 + 冲突/悬念”的短钩子,例如 300亿还不够AI烧;避免 AI进入收入表、算力账本重写 这类抽象、同质化、像内部归档名的标题。draft/get 回读保留的内联 HTML:短段落、数字/事实 callout、小标题卡片、图片上下留白;不要只依赖裸 <h2> 和连续 <p>,那会在公众号编辑器里显得密密麻麻。source_path/source_paths 时,不进行搜索,也不抓网页;直接基于本地 md/txt 素材写作,但仍然生成配图。illustrate 阶段,由 ctx.run_skill("generate_image", ...) 生成栅格图片;禁止用 SVG、HTML/CSS、Canvas、ImageMagick 手工绘图或其他外部兜底图替代内部画图流程。illustrate 阶段生成失败,必须暴露失败并重试内部画图流程;不得为了完成发布而手写 SVG 或把 SVG/矢量代码伪装成 PNG 上传。publish=true 且未显式指定渠道时,默认按 wechat 兼容旧行为。credential_manager 配置 wechat_official_account 的 app_id 与 app_secret;同一用户下可保存多条公众号凭据。wechat_account 时,按别名或凭据 ID 选择对应公众号;未指定时优先使用默认项,没有默认项则回退第一条公众号凭据。credential_manager 配置发布凭据。当前小红书发布直接走本地 opencli xiaohongshu publish。opencli 已安装且在 PATH 中,opencli xiaohongshu publish --help 可执行,并且 opencli doctor --sessions 显示 bridge 已连接且存在可用的小红书会话。wechat_official_account 支持统一配置 author=;文章作者优先使用可用发布账户里的这个值,否则回退到文章自身的 author。封面图默认生成无水印公众号手绘封面,正文配图默认生成无水印中文信息图。draft/get 回读正文,确认接口层是否保留 style;如果返回“样式回读已保留”,说明接口保存了排版,后台编辑器视图不渲染时以预览效果为准。bash 让 bot 执行 CLI,优先追加 --raw-json;CLI 会用 tool_result=... 输出最终结构化结果,避免把进度文本误当成 shell 错误。--stage 参数单独执行某个阶段,中间产物通过 JSON 文件传递,支持断点续跑。DATA_DIR/user/skills/article_publisher/drafts/,返回结果中的 data.draft_path 是唯一可信草稿路径。调用方必须读取该路径,不要自行创建或搬运草稿文件。action=list_titles 检查历史标题;limit 默认 20,允许 1-100。历史详情与写作阶段使用同一份固定留档文件,禁止从当前工作目录猜测历史路径。仅对 prefer_news=true / same_day_only=true 的新闻类请求生效;非新闻类与本地素材写作流程保持原行为。
search 阶段必须输出结构化校验字段(news_validation),至少包含:has_enough_news(是否找到足够可写新闻)candidate_source_count(候选来源数量)suspected_same_day(是否疑似同日)recommend_reject(是否建议拒稿)reject_reasons(拒稿原因)recommend_reject=true 或新闻素材不足,必须在写作前终止全流程,直接返回:今日未发现足够支撑发布的【主题】当天新闻,不建议发文。(或同等明确表达)publish=true 且命中上述拒稿条件,必须阻止 publish,不得进入发布阶段。null,禁止为了凑图生成泛图。article_publisher 的 write 和 illustrate 阶段非常耗时(单次全流程需 2-5 分钟),且包含大量内容的结构化输出。bash,这极易导致大模型 API 超时卡死(Timeout/Hang)或受到超长上下文截断限制!spawn_subagent 工具,将每一篇文章的生成任务分配给独立的子智能体(subagent)去并发执行。例如:为 part1, part2, part3 分别派生 3 个子智能体,赋予它们相关的工具权限让他们独立去执行对应文件的 execute.py 并等待其完成。python skills/builtin/credential_manager/scripts/execute.py add wechat_official_account --data 'app_id=xxx app_secret=yyy author=炜煜'opencli xiaohongshu publish --helpopencli doctor --sessionsdata.draft_path、生成的图片文件,以及可选的多渠道发布结果。xiaohongshu 渠道时,会额外生成 xiaohongshu_note.txt 和 xiaohongshu_note.json 作为发布草稿附件。--output-dir 指定目录,并输出 saved_file=<绝对路径>。{DATA_DIR}/user/skills/article_publisher/articles/{topic_slug}/ 下。