JSPM

  • Created
  • Published
  • Downloads 721
  • Score
    100M100P100Q107997F
  • License MIT

YuanFlow 自媒体 API CLI 与 Skill 安装器。

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (yuanflow-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    yuanflow-cli

    YuanFlow 的 npm 包,包含两个命令入口:

    • yuanflow-cli:社媒 API 转 CLI,覆盖完整 registry、快捷命令、schema、dry-run 和 agent-json 输出。
    • yuanflow-skill:把 YuanFlow-skill 注入到本机支持的 AI Agent skills 目录。
    • 飞书官方技能:YuanFlow-main 内置环境通过受控工具托管安装并调用飞书官方 @larksuite/cli,npm 包只提供 Skill 说明,不复制官方 CLI 源码。

    安装

    需要 Node.js 20 或更高版本。

    npm install -g yuanflow-cli

    安装后可用:

    yuanflow-cli --help
    yuanflow-skill list-agents

    API CLI

    yuanflow-cli config set-token <你的令牌>
    yuanflow-cli config set-base-url https://open.yuanchuangai.com
    yuanflow-cli douyin video-detail "https://v.douyin.com/xxx/" --format agent-json
    yuanflow-cli shortcuts douyin
    yuanflow-cli commands list
    yuanflow-cli schema douyin.video-detail
    yuanflow-cli schema comments.douyin.comments
    yuanflow-cli comments collect --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
    yuanflow-cli works detail --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
    yuanflow-cli works download --platform douyin --target "https://v.douyin.com/xxx/" --region CN --format agent-json
    yuanflow-cli search content --platform xiaohongshu --keyword "美妆" --format agent-json
    yuanflow-cli search users --platform instagram --keyword "nasa" --format agent-json
    yuanflow-cli trending video-hot-list --format agent-json
    yuanflow-cli douyin web get-sec-user-id --url "https://v.douyin.com/xxx/" --format agent-json
    yuanflow-cli douyin user-profile <sec_user_id> --format agent-json
    yuanflow-cli douyin user-posts <sec_user_id> --count 20 --cursor 0 --format agent-json
    yuanflow-cli knowledge docs --format agent-json
    yuanflow-cli knowledge entry --output-format short_video_script --domain 自媒体运营 --content-goal "写一个创业者短视频选题" --target-audience 创业者 --format agent-json
    yuanflow-cli oss signed-url --key path/to/file.png --ttl-seconds 1800 --format agent-json
    yuanflow-cli browser profile-path --platform douyin --account main --format agent-json
    yuanflow-cli browser task-plan --platform xiaohongshu --task publish --account main --format agent-json
    yuanflow-cli video init --input "D:\素材" --primary-audio "D:\素材\口播.mp3" --broll "D:\素材\画面.mp4" --format agent-json
    yuanflow-cli video strategy --project "D:\素材\yuanflow-video-edit" --template-type talking_head --rules-file "D:\规则\logic.json,D:\规则\template.json,D:\规则\cli.json" --format agent-json
    yuanflow-cli video plan --project "D:\素材\yuanflow-video-edit" --timeline-plan "D:\素材\yuanflow-video-edit\timeline_plan.agent.json" --format agent-json
    yuanflow-cli ai qwen3-vl-plus --prompt "描述这张图" --image-url "https://example.com/image.png" --format agent-json
    yuanflow-cli ai qwen3-vl-plus --prompt "总结这个视频画面" --video-url "https://example.com/video.mp4" --format agent-json
    yuanflow-cli ai qwen3-vl-plus --prompt "描述本地视频" --video-file "D:\素材\demo.mp4" --format agent-json
    yuanflow-cli ai doubao-tts voices --format agent-json
    yuanflow-cli ai doubao-tts voice --voice zh_female_xiaohe_uranus_bigtts --format agent-json
    yuanflow-cli ai doubao-tts voice-download --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\preview.mp3" --format agent-json
    yuanflow-cli ai doubao-tts --text "你好" --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\doubao.mp3" --format agent-json
    yuanflow-cli ai fun-asr --audio-url "https://example.com/audio.wav" --response-format verbose_json --format agent-json
    yuanflow-cli list douyin

    环境变量:

    YUANCHUANG_API_TOKEN=<你的令牌>

    token 优先级:--token > YUANCHUANG_API_TOKEN > 本地 config.token。独立 CLI 用户可以使用环境变量或 config set-token;在 YuanFlow-main 内置环境使用时,token 由 YuanFlow-main 内置环境注入,不需要手动配置。本地图片/视频上传统一使用 YuanFlow 文件中转,不需要用户配置第三方平台 Key。

    AI 模型命令

    ai 命令用于调用 YuanFlow API 的 OpenAI 兼容端点。CLI 对外只使用 YuanFlow API 模型参数,不暴露底层供应商内部模型名。

    yuanflow-cli ai help
    yuanflow-cli ai qwen3-vl-plus --prompt "描述这张图" --image-url "https://example.com/image.png" --format agent-json
    yuanflow-cli ai qwen3-vl-plus --prompt "总结这个视频画面" --video-url "https://example.com/video.mp4" --format agent-json
    yuanflow-cli ai qwen3-vl-plus --prompt "描述本地图片" --image-file "D:\素材\cover.png" --format agent-json
    yuanflow-cli ai qwen3-vl-plus --prompt "描述本地视频" --video-file "D:\素材\demo.mp4" --format agent-json
    yuanflow-cli ai qwen-voice-enrollment --file "D:\voice\sample.wav" --name demo --activate --format agent-json
    yuanflow-cli ai qwen3-tts-vc-realtime-2026-01-15 --text "你好" --voice voice_xxx --output "D:\voice\qwen.mp3" --format agent-json
    yuanflow-cli ai fun-asr --audio-url "https://example.com/audio.wav" --response-format verbose_json --format agent-json
    yuanflow-cli ai doubao-tts voices --format agent-json
    yuanflow-cli ai doubao-tts voice --voice zh_female_xiaohe_uranus_bigtts --format agent-json
    yuanflow-cli ai doubao-tts voice-download --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\preview.mp3" --format agent-json
    yuanflow-cli ai doubao-tts --text "你好" --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\doubao.mp3" --format agent-json

    qwen3-vl-plus 视觉理解

    qwen3-vl-plus 走 YuanFlow API 对外模型名,不在 CLI 里暴露或改写成底层供应商内部名称。它支持 4 种媒体输入方式,一次快捷调用只选一种:

    # 图片 URL
    yuanflow-cli ai qwen3-vl-plus --prompt "描述这张图" --image-url "https://example.com/image.png" --format agent-json
    
    # 视频 URL
    yuanflow-cli ai qwen3-vl-plus --prompt "总结这个视频画面" --video-url "https://example.com/video.mp4" --format agent-json
    
    # 本地图片:先上传到 YuanFlow 文件中转,再把临时访问链接传给 YuanFlow API
    yuanflow-cli ai qwen3-vl-plus --prompt "描述本地图片" --image-file "D:\素材\cover.png" --format agent-json
    
    # 本地视频:先上传到 YuanFlow 文件中转,再把临时访问链接传给 YuanFlow API
    yuanflow-cli ai qwen3-vl-plus --prompt "描述本地视频" --video-file "D:\素材\demo.mp4" --format agent-json

    本地文件上传要求:

    • 只需要 YuanFlow API token;CLI 会调用 POST /atomic/oss/temp-upload 完成 YuanFlow 文件中转。
    • 文件上传请求体包含 filenamecontent_base64content_type 和可选 key,返回里的 signed_url 会继续传给 qwen3-vl-plus
    • 该临时访问链接仅用于本次或短期处理,不建议长期保存;后续 skill 应在每次处理本地文件时重新上传。
    • --dry-run 不读取、不上传本地文件,只预览最终请求结构。

    视频调用注意:

    • 视频 URL 需要能被 YuanFlow API 访问,响应头建议包含 Content-LengthContent-Type
    • 视觉模型侧建议单个视频最大 2GB,时长 2 秒到 1 小时;本地上传会经过 YuanFlow 文件中转,超大视频建议优先使用可公网访问的视频 URL。
    • 图片/视频不要同时传;--image-url--video-url--image-file--video-file 四选一。

    命令清单:

    • ai qwen3-vl-plusPOST /v1/chat/completions,文本/图片/视频理解,常用参数 --prompt--image-url--video-url--image-file--video-file
    • ai qwen-voice-enrollmentPOST /v1/audio/voices,音色复刻,常用参数 --file--audio-url--name--activate
    • ai qwen3-tts-vc-realtime-2026-01-15POST /v1/audio/speech,复刻音色合成,--voice 使用 voice_xxxdefault
    • ai fun-asrPOST /v1/audio/transcriptions,语音识别,--audio-url 适合远程音频,--file 适合本地音频直传。
    • ai doubao-ttsPOST /v1/audio/speech,豆包语音合成,--voice 直接传豆包官方音色 ID。
    • ai doubao-tts voicesGET /api/voice-assets/doubao/voices,查询 doubao-tts 可用音色列表。
    • ai doubao-tts voiceGET /api/voice-assets/doubao/voices/{voice_type},查询单个音色详情。
    • ai doubao-tts voice-downloadGET /api/voice-assets/doubao/voices/{voice_type}/download,获取试听音频签名地址,传 --output 时下载试听音频到本地。

    所有 AI 命令都支持 --dry-run 预览请求映射,支持 --format agent-json 输出稳定 Agent JSON 外壳。音频合成命令真实调用时必须传 --output 保存音频文件。

    doubao-tts 音色查询、试听和合成

    doubao-tts 的音色资源接口和合成接口要配套使用。音色接口只负责查询和下载试听音频,不参与模型调用计费;真正合成时仍调用 ai doubao-tts,并把音色记录里的 voice_type 传给 --voice

    完整流程:

    # 1. 查询全部可用音色
    yuanflow-cli ai doubao-tts voices --format agent-json
    
    # 2. 查看某个音色详情
    yuanflow-cli ai doubao-tts voice --voice zh_female_xiaohe_uranus_bigtts --format agent-json
    
    # 3. 下载该音色的试听音频
    yuanflow-cli ai doubao-tts voice-download --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\preview-xiaohe.mp3" --format agent-json
    
    # 4. 使用同一个 voice_type 进行真实语音合成
    yuanflow-cli ai doubao-tts --text "你好,这是豆包语音合成测试。" --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\doubao-xiaohe.mp3" --format agent-json

    音色列表返回的关键字段:

    • display_name:给用户看的名称,例如“小何”。
    • name:更完整的展示名称,例如“小何 2.0”。
    • voice_type:真正合成时传给 --voice 的 YuanFlow 音色参数,建议外部系统用它做缓存 key。
    • category:音色分类,例如通用场景。
    • language:语言。
    • capabilities:能力说明,例如情感变化、指令遵循、ASMR。
    • preview_audio_key:试听音频在资源 bucket 里的对象 key。
    • preview_audio_content_type:试听音频 MIME 类型,通常是 audio/mpeg

    voice-download 默认返回签名下载地址;传 --output 时 CLI 会继续下载试听音频到本地。签名 URL 会过期,不建议长期保存;外部应用应缓存 voice_type 和本地试听文件,过期后重新调用 voice-download 获取新 URL。

    外部系统推荐展示逻辑:

    • 下拉框展示 display_namename
    • 实际合成提交 voice_type
    • 用户点击试听时先查本地缓存;没有缓存再调用 voice-download
    • 合成接口固定使用 YuanFlow API 对外模型名 doubao-tts,不要把底层供应商内部资源名写到外部参数里。

    作品评论采集

    评论采集统一走 comments collect,用于把 Agent 的自然语言需求稳定映射到平台评论接口:

    yuanflow-cli comments collect --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
    yuanflow-cli comments collect --platform xiaohongshu --target note_id --action replies --comment-id root_comment_id --format agent-json
    yuanflow-cli comments collect --platform youtube --target video_id --action comments --dry-run --format agent-json

    常用参数:

    • --platform:平台标识,如 douyinxiaohongshubilibiliwechat_mptiktokinstagramkuaishoureddittwitterweiboyoutubezhihu
    • --action:评论类型,默认 comments,可选 repliespost_commentspost_replies
    • --target:作品、文章、帖子、视频或回答 ID,也可以传支持的平台链接。
    • --comment-id:采集二级评论或评论回复时使用。
    • --prefer fallback:使用备用接口。
    • --dry-run:只预览请求映射,不发起真实接口请求,也不要求 token。

    Agent 可以先用 yuanflow-cli commands list 查看全部命令,再用 yuanflow-cli schema comments.douyin.comments 查看某个评论采集命令的参数、接口路径和返回说明。

    综合作品工具

    四类综合工具统一走受控命令,适合 Agent 通过自然语言稳定调用:

    yuanflow-cli works detail --platform douyin --target "https://v.douyin.com/xxx/" --format agent-json
    yuanflow-cli works download --platform youtube --target "dQw4w9WgXcQ" --format agent-json
    yuanflow-cli search content --platform xiaohongshu --keyword "美妆" --format agent-json
    yuanflow-cli search users --platform instagram --keyword "nasa" --format agent-json

    命令 key:

    • works.<platform>.detail:单作品详情。
    • works.<platform>.download:播放/下载地址候选或视频流信息。
    • search.<platform>.content:内容、作品、笔记、文章、帖子搜索。
    • search.<platform>.users:账号、用户、作者、频道搜索。

    Agent 不确定参数时先执行 commands list,再用 schema works.douyin.detailschema search.xiaohongshu.content 查看参数。--dry-run 可预览请求映射,不发起真实接口请求,也不要求 token。

    热门内容整理

    热门内容整理统一走 trending video-hot-list,一次性查询抖音视频热榜五类榜单,并输出统一 JSON:

    yuanflow-cli trending video-hot-list --format agent-json
    yuanflow-cli trending video-hot-list --page 1 --page-size 10 --date-window 2 --format agent-json
    yuanflow-cli trending video-hot-list --tags-json "[{\"value\":\"顶级垂类标签id\",\"children\":[{\"value\":\"子级垂类标签id\"}]}]" --format agent-json

    默认查询:

    • 1001 视频总榜
    • 1002 低粉爆款
    • 1003 高完播率
    • 1004 高涨粉率
    • 1005 高点赞率

    Agent 使用该命令后,应结合用户个人创作信息、个人创作库历史记录、历史任务或对话记录,输出可执行的选题、内容结构和发布建议,而不是只罗列榜单。

    帐号监控

    帐号监控 随 npm 包安装到 Skill bundle,用于把帐号搜索、主页资料、主页作品、历史快照和变化对比串成稳定流程。

    抖音完整链路:

    yuanflow-cli douyin web get-sec-user-id --url "https://v.douyin.com/xxx/" --format agent-json
    yuanflow-cli search users --platform douyin --keyword "<sec_user_id>" --format agent-json
    yuanflow-cli douyin user-profile <sec_user_id> --format agent-json
    yuanflow-cli douyin user-posts <sec_user_id> --count 20 --cursor 0 --format agent-json

    如果主页作品数据缺少播放、点赞、评论、转发、收藏等统计,再用:

    yuanflow-cli works detail --platform douyin --target "<aweme_id 或 share_url>" --format agent-json

    快照默认保存到 YuanFlow 数据目录下的 runtime_tools/account-monitor/snapshots

    自媒体知识库

    知识库能力独立于社媒 /social 接口,走 YuanFlow API 的 /api/knowledge-base/docs/atomic/agent-rules/navigate

    yuanflow-cli knowledge docs --format agent-json
    yuanflow-cli knowledge entry --output-format short_video_script --domain 自媒体运营 --content-goal "写一个创业者短视频选题" --target-audience 创业者 --format agent-json
    yuanflow-cli knowledge rules --pack-code topic_pain_point_pack --output-format short_video_script --content-goal "写一个创业者短视频选题" --target-audience 创业者 --format agent-json
    yuanflow-cli knowledge rule-detail --rule-code some_rule_code --output-format short_video_script --content-goal "写一个创业者短视频选题" --target-audience 创业者 --format agent-json

    Agent 应先查看 knowledge docs,再把用户需求整理成 task_frame,按接口返回的 next_actions 渐进查询。v2 接口不要求 task_intent;旧字段仅保留兼容。packsrulesdata 可能直接是数组,Agent 不应假设固定对象结构,应优先读取 next_actions 继续下钻。

    查询前必须先明确用户具体需求,再从知识库的一级能力开始,依次使用渐进式查询。不能跳级、跨越式查询。

    knowledge entryknowledge packsknowledge evaluate 会按规则库实际校验要求本地检查 task_frame.domaintask_frame.content_goal,CLI 调用时必须传 --domain--content-goal,或通过 --task-frame-file 提供同名字段。rulesrule-detail 用于按已选包/规则继续下钻,仍必须分别传 --pack-code--rule-code

    视频智能剪辑

    视频剪辑链路先查自媒体知识库中的 video_editing_strategy,再进入 video 命令执行。第一版人工测试流程是:查询规则包、保存策略快照、扫描素材、通过“音视频在线转文字”取得 ASR/时间戳结果、导入音频对齐、1 秒 1 帧抽帧、导入视觉理解结果、Agent 生成 timeline_plan.agent.json、CLI 校验并渲染。

    yuanflow-cli knowledge rules --pack-code video_edit_logic_layer_pack --domain 视频剪辑 --content-goal "口播视频剪辑,需要主音频匹配 B-roll 并生成 EDL" --output-format video_edit_plan --format agent-json --output "D:\规则\logic.json"
    yuanflow-cli video init --input "D:\素材" --primary-audio "D:\素材\口播.mp3" --broll "D:\素材\画面.mp4" --format agent-json
    yuanflow-cli video strategy --project "D:\素材\yuanflow-video-edit" --template-type talking_head --rules-file "D:\规则\logic.json,D:\规则\talking_head.json,D:\规则\cli.json" --format agent-json
    yuanflow-cli video inspect --project "D:\素材\yuanflow-video-edit" --format agent-json
    yuanflow-cli video align --project "D:\素材\yuanflow-video-edit" --asr-file "D:\素材\asr.json" --format agent-json
    yuanflow-cli video timeline --project "D:\素材\yuanflow-video-edit" --fps 1 --format agent-json
    yuanflow-cli video visual-review --project "D:\素材\yuanflow-video-edit" --review-file "D:\素材\yuanflow-video-edit\visual_review.agent.json" --format agent-json
    yuanflow-cli video plan --project "D:\素材\yuanflow-video-edit" --timeline-plan "D:\素材\yuanflow-video-edit\timeline_plan.agent.json" --format agent-json
    yuanflow-cli video render-preview --project "D:\素材\yuanflow-video-edit" --format agent-json
    yuanflow-cli video evaluate --project "D:\素材\yuanflow-video-edit" --file "D:\素材\yuanflow-video-edit\preview.mp4" --format agent-json
    yuanflow-cli video render-final --project "D:\素材\yuanflow-video-edit" --format agent-json

    video align 只导入已有 ASR 或 forced alignment 结果,不直接调用在线 ASR;在线 ASR 由“音视频在线转文字”Skill 执行。video visual-review 只导入 Agent/人工对抽帧图片的视觉理解,不替 Agent 做语义判断。--template-type 当前支持 talking_headshort_video_sales。知识库查询由 knowledge 命令负责,video 命令只导入规则结果并保存 strategy_snapshot.json,不直接远程查规则库。

    业务创作类 Skill

    以下业务 Skill 随 npm 包一起安装,统一流程是:先检查 个人创作库 是否有对应历史参考记录,再调用 自媒体知识库next_actions 分层查询方法摘要,最后结合用户要求输出结果。输出后会询问用户是否满意、是否记录到个人创作库,并询问是否需要生成 HTML 可视化汇总。

    • IP运营:个人或品牌 IP 的内容运营节奏、栏目组合、互动策略和增长路径。
    • 直播话术生成:直播开场、留人、转场、成交、互动和控场话术。
    • 帐号定位:账号人设、内容边界、目标受众、价值主张和栏目方向。
    • 选题策划:选题池、系列选题、热点选题和选题优先级排序。
    • 文案创作:小红书、公众号、朋友圈、短视频口播、直播预告、海报和转化型文案。
    • 热门内容整理:一次性查询视频总榜、低粉爆款、高完播率、高涨粉率、高点赞率,并结合用户创作方向输出建议。
    • 创作总监:负责内容方向把控、创新判断、复查验收和跨技能创作统筹。
    • 视频投流策略:短视频、图文视频或内容素材的投流目标、人群、预算、素材分层和测试节奏。
    • 直播投流策略:直播预热、直播引流、直播成交和直播间投放的人群、预算、素材、节奏和复盘策略。

    YuanFlow 文件中转

    YuanFlow 文件中转能力独立封装为兼容命令 oss,用于临时上传、签名链接和对象复制:

    yuanflow-cli oss temp-upload --file ./cover.png --content-type image/png --format agent-json
    yuanflow-cli oss signed-url --key path/to/file.png --ttl-seconds 1800 --method GET --format agent-json
    yuanflow-cli oss copy --source-key temp/cover.png --target-key final/cover.png --format agent-json

    上传本地文件前必须确认用户授权,不能上传密钥、cookie、账号凭据或隐私文件。

    自媒体浏览器自动化

    browser 命令是自媒体平台专用浏览器自动化协议,用于账号登录态隔离、Cookie/profile 本地保存、账号页面采集、作品发布前检查和发布流程规划。它不用于普通网页搜索、通用浏览、截图或 CDP 连接。

    如果要做发布类任务,先优先用用户电脑里已有的 Chrome,第二优先用 Edge。两个都没有时,再提示用户安装给浏览器自动化用的 Chromium。不要把这件事说得太技术化,直接告诉用户“需要一个能给自动化程序用的浏览器”就够了。

    如果 Chromium 连续下载 3 次还是失败,就停止继续重试,明确告诉用户可能是网络、权限、下载源不可用或安全软件拦截,并引导用户手动下载和安装后再继续。

    当前命令只返回受控路径、任务计划和 dry-run 预检结果,不直接暴露裸 Playwright 或 Chrome 调试能力:

    yuanflow-cli browser profile-path --platform douyin --account main --format agent-json
    yuanflow-cli browser session-init --platform xiaohongshu --account main --format agent-json
    yuanflow-cli browser cookie-policy --platform douyin --account main --format agent-json
    yuanflow-cli browser task-plan --platform douyin --task publish --account main --format agent-json
    yuanflow-cli browser dry-run --platform xiaohongshu --task publish --account main --file ./post.mp4 --title "标题" --caption "正文" --cover ./cover.png --format agent-json

    支持平台:douyinxiaohongshuweibobilibilitiktokyoutubetwitter

    固定边界:

    • Cookie、localStorage、sessionStorage 和 profile 只保存在本地受控目录,不输出、不上传。
    • 扫码、验证码、人机验证、平台风控必须暂停并让用户手动处理。
    • 最终发布、删除、修改账号资料等线上状态变更前必须获得用户确认。
    • 普通网页浏览请使用 YuanFlow 通用浏览器能力,不使用本命令。

    音视频在线转文字

    音视频在线转文字 随 npm 包安装到 Skill bundle,用于通过 YuanFlow 在线 ASR 接口把音频或视频转成干净文本。视频输入需要先用 ffmpeg 分离音频,再上传到 YuanFlow 文件中转。

    固定链路:

    1. 判断用户提交的是音频还是视频。
    2. 视频先抽取为音频,音频上传前改成英文文件名。
    3. 使用 yuanflow-cli oss temp-upload 上传音频到 YuanFlow 文件中转。
    4. ASR 请求必须优先使用文件中转返回的 data.signed_url 作为 metadata.audio_url,不要优先使用裸域名 data.url
    5. 调用 POST https://open.yuanchuangai.com/v1/audio/transcriptions,模型 doubao-asrresponse_format=json
    6. 默认只返回响应里的 text 干净文本;视频剪辑任务需要音频对齐时,要优先保留 ASR 响应中的 segments / words 时间戳结构,后续交给 yuanflow-cli video align --asr-file 导入。接口没有返回时间戳时,不编造时间戳,改用 forced alignment 或人工按文案切分时间。

    请求体示例:

    {
      "model": "doubao-asr",
      "response_format": "json",
      "metadata": {
        "audio_url": "<YuanFlow 文件中转 signed_url>"
      }
    }

    生图技能

    生图技能 随 npm 包安装到 Skill bundle。YuanFlow-main 内置环境优先使用受控工具 yuanflow_image_request,自动注入当前用户 token 并缓存返回图片。

    • 生成图片:/v1/images/generations,主模型 gpt-image-2-c,备用模型 gpt-image-2,请求体使用 prompt
    • 编辑图片:/v1/images/edits,必须使用 multipart/form-data 上传本地图片文件。
    • gpt-image-2-c 通常返回 URL,gpt-image-2 通常返回 b64_json;两种返回都应缓存后再展示。
    • 中文用户或中文任务默认使用中文语境生图;如果画面必须出现文字,提示词应明确要求清晰简体中文。正文配图优先要求无文字、无字母、无 Logo、无水印,避免生成英文占位内容。
    • 生成图片必填参数:prompt。可选参数:size(默认 1024x1024)、quality(默认 standard)、style(默认 vivid)、n(默认 1,范围 1~10)、response_format(默认 url)。
    • 编辑图片除 prompt 外还必须上传本地图片文件,Skill 内使用 image_path 表示本地文件路径,实际请求以 multipart/form-dataimage 字段上传。

    HTML 报告生成

    HTML报告生成 随 npm 包安装到 Skill bundle,用于把自媒体分析、数据复盘、文案方案、账号监控、知识梳理和执行计划生成可直接打开的单页 HTML 报告。

    • 内置 9 种报告形态:洞察简报、数据仪表盘、深度报告、横向对比、卡片集合、流程步骤、时间线、行动看板、知识地图。
    • 正式模板默认使用米色留白风格,模板位于 HTML报告生成/templates/warm-beige/
    • 蓝白、黑金、黑白红、柔和科技作为扩展主题逻辑保留在 HTML报告生成/references/theme-system.md
    • 模板和引用文档跟随 Skill 目录一起安装,不需要用户单独复制资源文件。

    Skill 安装器

    yuanflow-skill list-agents
    yuanflow-skill list-skills
    yuanflow-skill install
    yuanflow-skill install --agent codex,cursor
    yuanflow-skill install --project
    yuanflow-skill install --dry-run
    yuanflow-skill uninstall --agent codex

    安装器会自动发现 YuanFlow-skill 根目录和一级子目录中的 SKILL.md,并以 yuanflow-skill bundle 形式注入到目标 Agent。

    开发检查

    npm test
    npm run pack:check
    npm run release:check