social-media-publisher
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSocial Media Publisher
社交媒体发布工具
Follow shared release-shell rules in:
- release-shell rules
postplus-shared
Use this skill when the user wants to operate social publishing through the PostPlus-managed Postiz workspace.
This skill is for:
- guiding users through the invite-link channel onboarding flow
- listing integrations available on the PostPlus Postiz workspace
- preparing a local publish request draft
- creating a Postiz draft or schedule only after explicit approval
- promoting an existing Postiz draft into the queue only after a second approval
遵循发布shell规则:
postplus-shared- 发布shell规则
postplus-shared
当用户希望通过PostPlus管理的Postiz工作区进行社交帖子发布操作时,使用本skill。
本skill适用于:
- 引导用户完成邀请链接渠道的入驻流程
- 列出PostPlus Postiz工作区可用的集成项
- 准备本地发布请求草稿
- 仅在获得明确批准后创建Postiz草稿或安排发布计划
- 仅在获得二次批准后将现有Postiz草稿推进至发布队列
Ownership model
所有权模型
PostPlus holds one platform-owned Postiz org and API key.
End users do not need their own Postiz accounts.
Channel onboarding uses the Postiz invite-link mechanism:
- the product calls with the PostPlus Postiz API key
GET /public/v1/social/{integration} - Postiz returns a social-platform OAuth URL (e.g. Instagram, TikTok) and stores a state → PostPlus org mapping in Redis for 1 hour
- the product delivers that URL to the end user (via UI or CLI)
- the user clicks the link and authorizes their social account on the platform's own OAuth consent screen — no Postiz registration required
- the resulting channel token lands in the PostPlus Postiz org
- the product labels the channel with the user's PostPlus account id via
PUT /integrations/:id/customer-name
PostPlus拥有一个平台专属的Postiz组织和API密钥。
终端用户无需拥有自己的Postiz账户。
渠道入驻采用Postiz邀请链接机制:
- 产品调用接口,使用PostPlus的Postiz API密钥
GET /public/v1/social/{integration} - Postiz返回社交平台的OAuth URL(例如Instagram、TikTok),并在Redis中存储状态→PostPlus组织的映射,有效期1小时
- 产品将该URL交付给终端用户(通过UI或CLI)
- 用户点击链接,在平台自身的OAuth授权界面授权其社交账户——无需注册Postiz
- 生成的渠道令牌存入PostPlus的Postiz组织
- 产品通过接口,用用户的PostPlus账户ID标记该渠道
PUT /integrations/:id/customer-name
Safe default
安全默认设置
create_post.mjsWithout , it:
--execute- validates the local request
- enforces the integration allowlist
- writes a local preview envelope
- emits an
approvalRequest - does not call Postiz
Actual remote mutation requires:
--execute--approval-file <approved.json>- a channel that has been onboarded via the invite-link flow above
Use to move a real Postiz draft from to
after a second explicit approval.
change_post_status.mjsdraftschedulecreate_post.mjs未添加参数时,它会:
--execute- 验证本地请求
- 强制执行集成项白名单
- 写入本地预览包
- 发送(批准请求)
approvalRequest - 不调用Postiz接口
实际远程修改需要满足:
- 添加参数
--execute - 添加参数
--approval-file <approved.json> - 渠道已通过上述邀请链接流程完成入驻
在获得二次明确批准后,使用将真实的Postiz草稿从(草稿)状态修改为(待发布)状态。
change_post_status.mjsdraftscheduleAuthentication
认证机制
Read .
references/api-contract.mdRelease workflow rules:
- PostPlus backend holds the Postiz API key server-side; scripts never receive it directly
- all Postiz API calls are proxied through the hosted capability bridge
- do not ask users for Postiz credentials of any kind
阅读文档。
references/api-contract.md发布工作流规则:
- PostPlus后端在服务器端存储Postiz API密钥;脚本不会直接获取该密钥
- 所有Postiz API调用均通过托管的能力桥接服务代理
- 切勿向用户索要任何形式的Postiz凭证
Default workflow
默认工作流
- User requests channel onboarding via the product UI or CLI.
- Product generates an invite link for the target platform.
- User authorizes their social account via the platform OAuth screen.
- Product labels the new channel integration with the user's account id.
- List integrations to confirm the exact integration id for the user's channel.
- Build the local request JSON.
- Run without
create_post.mjsto produce an approval artifact.--execute - After approval, re-run .
create_post.mjs --execute --approval-file ... - If the post should stay reviewable, keep it in .
draft - Only after a second approval, run to queue it for publishing.
change_post_status.mjs --status schedule
- 用户通过产品UI或CLI请求渠道入驻。
- 产品为目标平台生成邀请链接。
- 用户通过平台OAuth界面授权其社交账户。
- 产品用用户的账户ID标记新的渠道集成项。
- 列出集成项,确认用户渠道的准确集成ID。
- 构建本地请求JSON文件。
- 不带参数运行
--execute,生成批准工件。create_post.mjs - 获得批准后,重新运行。
create_post.mjs --execute --approval-file ... - 如果帖子需要保留可审核状态,保持其为(草稿)状态。
draft - 仅在获得二次批准后,运行将其加入发布队列。
change_post_status.mjs --status schedule
Main scripts
主要脚本
scripts/list_integrations.mjsscripts/integration_settings.mjsscripts/trigger_tool.mjsscripts/upload_media_from_url.mjsscripts/upload_file.mjsscripts/create_post.mjsscripts/change_post_status.mjsscripts/list_posts.mjsscripts/delete_post.mjsscripts/delete_post_group.mjsscripts/get_missing_content.mjsscripts/update_release_id.mjsscripts/platform_analytics.mjsscripts/post_analytics.mjsscripts/list_notifications.mjsscripts/render_publish_report.mjs
scripts/list_integrations.mjsscripts/integration_settings.mjsscripts/trigger_tool.mjsscripts/upload_media_from_url.mjsscripts/upload_file.mjsscripts/create_post.mjsscripts/change_post_status.mjsscripts/list_posts.mjsscripts/delete_post.mjsscripts/delete_post_group.mjsscripts/get_missing_content.mjsscripts/update_release_id.mjsscripts/platform_analytics.mjsscripts/post_analytics.mjsscripts/list_notifications.mjsscripts/render_publish_report.mjs
Command examples
命令示例
Prepare a publish request preview:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
--request "<request.json>" \
--customer-config "<postiz.config.json>" \
--output "<create-post.preview.json>"Execute the approved create:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
--request "<request.json>" \
--customer-config "<postiz.config.json>" \
--output "<create-post.result.json>" \
--execute \
--approval-file "<approval.json>"Promote a draft into the publish queue:
bash
node skills/50-publishing/social-media-publisher/scripts/change_post_status.mjs \
--post-id "<post-id>" \
--status schedule \
--output "<status.result.json>" \
--execute \
--approval-file "<approval.json>"准备发布请求预览:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
--request "<request.json>" \
--customer-config "<postiz.config.json>" \
--output "<create-post.preview.json>"执行已批准的创建操作:
bash
node skills/50-publishing/social-media-publisher/scripts/create_post.mjs \
--request "<request.json>" \
--customer-config "<postiz.config.json>" \
--output "<create-post.result.json>" \
--execute \
--approval-file "<approval.json>"将草稿推进至发布队列:
bash
node skills/50-publishing/social-media-publisher/scripts/change_post_status.mjs \
--post-id "<post-id>" \
--status schedule \
--output "<status.result.json>" \
--execute \
--approval-file "<approval.json>"