Qstar Video Ecom
Use this skill when the user wants to make a Chinese e-commerce short video quickly, especially for Douyin, Xiaohongshu, Taobao, Pinduoduo, JD, or WeChat Video.
Default value: keep the old one-click product video flow as the stable path, then layer newer video-factory style modes on top.
What this skill supports
This skill now has 4 modes:
- 1. INLINECODE0
Classic one-click product video.
Best when the user says "做个产品视频", "生成电商视频", "帮我出一条带解说的视频".
- 2. INLINECODE1
Single-image fast start.
Best when the user already has one product image, poster, hero shot, or reference visual and wants to start from it.
- 3. INLINECODE2
Batch multiple short-video variants from one product brief.
Best when the user wants several hooks, tones, or platform versions in one go.
- 4. INLINECODE3
Natural-language revision mode.
Best when the user already has a generated video and says things like "把背景换掉", "节奏快一点", "换成男声", "再来 3 个版本".
If the user does not specify a mode, use classic.
Important boundary
Do not pretend the backend already has magical edit APIs if it does not.
For newer modes:
- - If the current
bot.guanma.top/sora-api endpoints can support the request with the existing generate flow, use them. - If the request exceeds current API capability, convert the user intent into a structured generation brief and explain that you are using the nearest supported workflow.
- Prefer a truthful fallback over a fake "done".
Step 0 — Extract USER_ID
Extract platform and sender_id from the current session key and convert to {platform}:{sender_id}.
Examples:
- -
agent:main:telegram:direct:5239705501 -> INLINECODE8 - INLINECODE9 -> INLINECODE10
- INLINECODE11 -> INLINECODE12
- INLINECODE13 -> INLINECODE14
- INLINECODE15 -> INLINECODE16
Always inline the real value into commands. Do not rely on shell variables.
Step 1 — Detect mode
Route by user intent:
User wants one finished e-commerce short video and has no advanced request.
User gives or mentions a specific product image / hero image / visual reference and wants to start from that one image.
User asks for multiple versions, multiple hooks, multiple platforms, multiple tones, or "批量跑素材".
User already has an existing video and wants changes in plain language.
If mixed, prefer:
revise > batch-variants > single-image > INLINECODE24
Step 2 — Check profile
CODEBLOCK0
If onboarded: false, run the onboarding flow before generation.
Opening message:
CODEBLOCK1
Ask:
- 1. INLINECODE26
- INLINECODE27
- INLINECODE28
Then:
CODEBLOCK2
Step 3 — Mode-specific intake
Mode A: classic
Follow the stable old flow:
- 1. Ask target platform
- Ask script style template
- Ask product name + 2-3 core selling points
- Ask voice choice
- Check quota
- If paid, allow product image upload
- Generate one finished video
Mode B: single-image
Ask for:
- 1. Target platform
- Product name
- One-sentence video goal
- 2-3 selling points
- Voice choice
- One image upload or image URL
Then convert the brief into a structured product field like:
INLINECODE32
If the image is available and the user has paid quota, prefer passing a direct public image_url.
Only use the documented upload endpoint if it is confirmed live in the current environment.
If image upload is unavailable, say you are falling back to the standard image-assisted generation path.
Mode C: batch-variants
Ask for:
- 1. Target platform or platforms
- Product name
- Core selling points
- Number of variants
- Preferred dimensions of variation:
- hook
- tone
- audience
- CTA
- voice
Then produce a variant plan first, for example:
- - Variant 1: price-shock
- Variant 2: bestie recommendation
- Variant 3: curiosity bait
Run the current generation path once per variant if the backend only supports single-job generation.
Do not claim server-side batch execution unless it truly exists.
Mode D: revise
Ask for:
- 1. Existing video link or generation context
- What to change, in plain language
- Whether the user wants:
- overwrite-style replacement
- one more revised version
- several revised versions
Translate the user's request into a structured revision brief:
- - scene/background change
- faster/slower rhythm
- stronger CTA
- female/male voice
- platform-specific format
- more dramatic / more everyday / more premium tone
If no true edit API exists, tell the user you are generating a revised new version instead of frame-accurate editing.
Step 4 — Platform choice
Use this mapping:
CODEBLOCK3
Prompt:
CODEBLOCK4
Step 5 — Script style template
For classic and most batch-variants cases, use the proven template system.
Template details live in TEMPLATES.md.
Prompt:
CODEBLOCK5
Map:
- - INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
- INLINECODE43
When the user chooses 1-5, auto-build the product brief using the template style plus platform.
Step 6 — Voice choice
Prompt:
CODEBLOCK6
Map:
- - INLINECODE44
- INLINECODE45
Step 7 — Quota and image upload
Check quota:
CODEBLOCK7
If credits > 0, allow image upload:
CODEBLOCK8
If the user sends an image, first obtain a public image URL through the host platform's image handling path, then:
CODEBLOCK9
Read image_url from the response.
If that endpoint returns 404 or equivalent unavailability, do not loop on the upload flow. Pass the original public image URL directly in the generate request instead.
The image URL must be reachable by the generation backend, not just by the local machine. Avoid internal-only hosts or asset domains that fail public DNS resolution.
If free user or skipped upload, keep image_url empty.
Step 8 — Generate
Tell the user generation is running:
CODEBLOCK10
Then:
CODEBLOCK11
Step 9 — Response handling
If success:
INLINECODE50
INLINECODE51
INLINECODE52
For batch-variants, summarize all successful outputs clearly by variant label.
For revise, explicitly say this is a revised version if you had to regenerate rather than edit in place.
If HTTP 402 or quota exceeded:
run the payment flow.
Step 10 — Payment flow
Show:
CODEBLOCK12
Then ask payment channel:
CODEBLOCK13
Create order:
CODEBLOCK14
Read order_id, amount, qr_url.
Send the QR image first, then:
CODEBLOCK15
Poll every 10 seconds, up to 18 times:
CODEBLOCK16
If status == "paid":
CODEBLOCK17
Then return to Step 7.
If timeout:
CODEBLOCK18
Operating rules
- - Prefer the stable
classic mode unless the user clearly wants a newer mode. - Use
single-image when the image is the center of the request, not just an optional add-on. - Use
batch-variants when the user cares about scale or testing multiple hooks. - Use
revise when the user wants changes to an existing output. - Be explicit when a "revision" is actually a new regenerated version.
- Never hide quota/payment boundaries.
Data and privacy
This skill is provided by Q-star via https://guanma.top.
- product description text
- optional public product image URL
- platform-linked user ID
- optional contact info
- HTTPS API calls to
bot.guanma.top
- generated videos are stored in Qiniu for delivery
- - This skill does not read local files directly
- This skill does not access system credentials
- Payment QR codes are generated by the payment provider bound to Q-star services
Qstar 视频电商
当用户想要快速制作中文电商短视频时使用此技能,尤其适用于抖音、小红书、淘宝、拼多多、京东或视频号。
默认值:保留旧的一键产品视频流程作为稳定路径,然后在其上叠加更新的视频工厂风格模式。
此技能支持的功能
此技能现有4种模式:
- 1. classic
经典一键产品视频。
最适合用户说做个产品视频、生成电商视频、帮我出一条带解说的视频时使用。
- 2. single-image
单图快速启动。
最适合用户已有一张产品图、海报、主图或参考视觉素材并希望以此为基础开始制作时使用。
- 3. batch-variants
根据一份产品简介批量生成多个短视频变体。
最适合用户希望一次性获得多个钩子、风格或平台版本时使用。
- 4. revise
自然语言修改模式。
最适合用户已有生成的视频并说把背景换掉、节奏快一点、换成男声、再来3个版本时使用。
如果用户未指定模式,则使用classic。
重要边界
如果后端实际上没有神奇的编辑API,不要假装有。
对于较新的模式:
- - 如果当前的bot.guanma.top/sora-api端点能够通过现有生成流程支持该请求,则使用它们。
- 如果请求超出当前API能力,则将用户意图转换为结构化生成简介,并说明你正在使用最接近的支持工作流。
- 优先选择诚实的降级方案,而不是虚假的已完成。
步骤0 — 提取用户ID
从当前会话密钥中提取平台和发送者ID,并转换为{platform}:{sender_id}格式。
示例:
- - agent:main:telegram:direct:5239705501 -> tg:5239705501
- agent:main:wechat:direct:oh8CU6xxx -> wx:oh8CU6xxx
- agent:main:wecom:direct:zhangsan -> wecom:zhangsan
- agent:main:feishu:direct:ouxxx -> feishu:ouxxx
- agent:main:slack:direct:U12345 -> slack:U12345
始终将实际值内联到命令中。不要依赖shell变量。
步骤1 — 检测模式
根据用户意图进行路由:
用户想要一个完整的电商短视频,且没有高级要求。
用户提供或提及特定的产品图/主图/视觉参考素材,并希望从该单张图片开始制作。
用户要求多个版本、多个钩子、多个平台、多种风格,或批量跑素材。
用户已有现有视频,并希望用自然语言进行修改。
如果混合,优先级为:
revise > batch-variants > single-image > classic
步骤2 — 检查用户档案
bash
curl -s https://bot.guanma.top/sora-api/user/profile/{USER_ID}
如果onboarded: false,则在生成前运行引导流程。
开场消息:
text
🎬 欢迎使用AI电商视频生成!
📌 使用须知:
• 免费版:每天1次,仅支持通用商品视频
• 付费版:不限次数,支持上传产品实拍图,生成更贴近真实商品的视频
如果你想做基于真实产品图的视频,建议使用付费版。
询问:
- 1. 你主要在哪个平台经营?(淘宝/小红书/抖音/其他)
- 你的主营产品类目是?(服装/数码/美妆/食品/其他)
- 售后联系方式(选填,可跳过)
然后:
bash
curl -s -X POST https://bot.guanma.top/sora-api/user/onboard \
-H Content-Type: application/json \
-d {
userid: {USERID},
main_platform: {用户回答1},
category: {用户回答2},
contact: {用户回答3}
}
步骤3 — 模式特定信息收集
模式A:classic
遵循稳定的旧流程:
- 1. 询问目标平台
- 询问文案风格模板
- 询问产品名称 + 2-3个核心卖点
- 询问配音选择
- 检查配额
- 如果是付费用户,允许上传产品图
- 生成一个完整视频
模式B:single-image
询问:
- 1. 目标平台
- 产品名称
- 一句话视频目标
- 2-3个卖点
- 配音选择
- 一张图片上传或图片URL
然后将简介转换为结构化的product字段,例如:
[mode:single-image][platform:douyin] 产品名:{产品名};目标:{视频目标};卖点:{卖点列表};要求:基于已上传图片生成,保留商品核心外观。
如果图片可用且用户有付费配额,优先传递直接的公共image_url。
仅当确认当前环境中存在文档化的上传端点时才使用它。
如果图片上传不可用,说明你将回退到标准图片辅助生成路径。
模式C:batch-variants
询问:
- 1. 目标平台或多个平台
- 产品名称
- 核心卖点
- 变体数量
- 偏好的变体维度:
- 钩子
- 风格
- 受众
- 行动号召
- 配音
然后先制定变体计划,例如:
- - 变体1:价格冲击型
- 变体2:闺蜜推荐型
- 变体3:好奇心诱饵型
如果后端仅支持单任务生成,则每个变体运行一次当前生成路径。
除非确实存在服务端批量执行功能,否则不要声称有。
模式D:revise
询问:
- 1. 现有视频链接或生成上下文
- 要用自然语言更改的内容
- 用户是否想要:
- 覆盖式替换
- 再生成一个修改版本
- 生成多个修改版本
将用户的请求转换为结构化的修改简介:
- - 场景/背景更换
- 更快/更慢的节奏
- 更强的行动号召
- 女声/男声
- 特定平台格式
- 更戏剧化/更日常/更高端的风格
如果没有真正的编辑API,告诉用户你正在生成一个修改后的新版本,而不是逐帧编辑。
步骤4 — 平台选择
使用此映射:
text
1 淘宝/天猫 -> taobao
2 拼多多 -> pinduoduo
3 小红书 -> xiaohongshu
4 抖音/TikTok -> douyin
5 京东 -> jingdong
6 视频号 -> shipinhao
提示:
text
请选择视频发布平台:
1️⃣ 淘宝/天猫(16:9,8秒)
2️⃣ 拼多多(16:9,4秒)
3️⃣ 小红书(9:16,8秒)
4️⃣ 抖音/TikTok(9:16,8秒)
5️⃣ 京东(16:9,8秒)
6️⃣ 视频号(9:16,8秒)
步骤5 — 文案风格模板
对于classic和大多数batch-variants情况,使用经过验证的模板系统。
模板详情位于TEMPLATES.md。
提示:
text
请选择视频文案风格:
1️⃣ 痛点共鸣型
2️⃣ 价格冲击型
3️⃣ 闺蜜种草型
4️⃣ 专业测评型
5️⃣ 反常识悬念型
6️⃣ 自由描述
映射:
- - 1 -> T1痛点共鸣
- 2 -> T2价格冲击
- 3 -> T3闺蜜种草
- 4 -> T4专业测评
- 5 -> T5反常识悬念
- 6 -> free自由描述
当用户选择1-5时,使用模板风格加平台自动构建产品简介。
步骤6 — 配音选择
提示:
text
请选择解说声音:
🎙️ 1. 晓晓(女声·温柔)
🎙️ 2. 云希(男声·稳重)
映射:
步骤7 — 配额和图片上传
检查配额:
bash
curl -s https://bot.guanma.top/sora-api/quota/{USER_ID}
如果credits > 0,允许图片上传:
text
📸 是否上传产品实拍图?上传后视频会更贴近你的真实商品。
直接发图即可,或回复跳过。
如果用户发送图片,首先通过宿主平台的图片处理路径获取公共图片URL,然后:
bash
curl -s -X POST https://bot.guanma.top/sora-api/upload-image