social-media-automation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese自媒体运营自动化技能
Social Media Operations Automation Skill
触发条件
Trigger Conditions
当用户提到以下内容时自动触发:
- "生成小红书笔记"
- "发布到小红书"
- "生成自媒体内容"
- "发布到抖音/公众号/视频号"
- "自媒体运营"
- "社交媒体内容生成"
- "批量生成内容"
- "每日热点推荐"
- "热点内容推荐"
- "根据热点生成内容"
Automatically trigger when the user mentions any of the following:
- "Generate a Xiaohongshu note"
- "Publish to Xiaohongshu"
- "Generate social media content"
- "Publish to Douyin/WeChat Official Account/WeChat Channels"
- "Social media operations"
- "Social media content generation"
- "Batch-generate content"
- "Daily trending content recommendations"
- "Trending content recommendations"
- "Generate content based on trending topics"
MCP 配置说明
MCP Configuration Notes
重要原则
Key Principles
本 Skill 是通用的,不包含任何硬编码的 MCP 配置或密钥信息。
This Skill is generic and does not contain any hard-coded MCP configuration or key information.
MCP 使用流程
MCP Usage Flow
-
用户提供 MCP 配置
- 用户会提供 HAP 应用的 MCP 配置信息
- MCP 配置格式:
{"hap-mcp-{应用名称}": {"url": "https://api.mingdao.com/mcp?HAP-Appkey=...&HAP-Sign=..."}} - 或用户明确指定使用哪个 MCP
-
确认当前连接的 MCP
- 执行操作前,必须先调用 确认当前连接的 HAP 应用
mcp_hap-mcp-_get_app_info() - 如果用户提供了 MCP 配置,需要确认是否匹配
- 执行操作前,必须先调用
-
从 HAP 动态读取配置
- 所有 API 密钥和配置都存储在 HAP "API服务配置" 表中
- 使用时动态从表中读取,不在代码中硬编码
- 通过 动态获取工作表列表
get_app_worksheets_list() - 优先通过别名(alias)匹配工作表,如果别名不存在则使用名称(name)匹配
- 绝对不要使用硬编码的工作表 ID
-
工作表动态识别(重要)
- 不假设工作表 ID 是固定的,必须通过别名或名称匹配
- 通过 获取工作表列表
get_app_worksheets_list() - 优先通过 字段匹配,如果不存在则使用
alias字段匹配name - 通过 获取工作表结构
get_worksheet_structure() - 通过字段名称或别名匹配所需字段
-
The user provides the MCP configuration
- The user will provide MCP configuration information for a HAP application
- MCP configuration format:
{"hap-mcp-{application_name}": {"url": "https://api.mingdao.com/mcp?HAP-Appkey=...&HAP-Sign=..."}} - Alternatively, the user explicitly specifies which MCP to use
-
Confirm the currently connected MCP
- Before performing any operation, must first be called to confirm the currently connected HAP application
mcp_hap-mcp-_get_app_info() - If the user provided an MCP configuration, verify whether it matches
- Before performing any operation,
-
Dynamically read configuration from HAP
- All API keys and configurations are stored in the HAP "API Service Configuration" table
- Read them dynamically from the table at runtime; do not hard-code them in code
- Use to dynamically obtain the worksheet list
get_app_worksheets_list() - Match worksheets by alias first; if no alias exists, match by name
- Never use hard-coded worksheet IDs
-
Dynamic worksheet identification (important)
- Do not assume worksheet IDs are fixed; they must be matched by alias or name
- Obtain the worksheet list through
get_app_worksheets_list() - Prioritize the field; if it does not exist, use the
aliasfieldname - Obtain the worksheet structure through
get_worksheet_structure() - Match required fields by field name or alias
MCP 确认流程
MCP Confirmation Flow
用户请求
↓
1. 识别用户提供的 MCP 配置或指定的 MCP
↓
2. 调用 get_app_info() 确认当前连接的 MCP 应用
↓
3. 对比:当前连接 vs 用户指定的 MCP
↓
4. 如果不匹配 → 与用户确认
↓
5. 确认后执行操作User request
↓
1. Identify the MCP configuration provided by the user or the specified MCP
↓
2. Call get_app_info() to confirm the currently connected MCP application
↓
3. Compare: current connection vs. user-specified MCP
↓
4. If they do not match → confirm with the user
↓
5. Proceed after confirmation核心能力
Core Capabilities
1. 内容生成流程
1. Content Generation Flow
完整工作流
Complete Workflow
用户输入主题
↓
Step 1: 从 HAP "API服务配置" 表动态读取搜索 API 配置(Tavily/Serper)
↓
Step 2: 调用搜索 API 获取主题相关资料(Tavily API)
↓
Step 3: **【强制要求】从 HAP "账号人设" 表读取账号人设配置(必须在生成内容之前执行)**
- **禁止使用本地文件**:绝对不允许使用 `AGENTS.md` 或其他本地文件作为账号人设来源
- **必须调用 HAP MCP**:必须通过 MCP 调用 `get_record_list()` 从 HAP "账号人设" 表读取
- **读取流程**:
1. 确认当前连接的 HAP MCP 应用(通过 `get_app_info()`)
2. 动态获取"账号人设"表的 ID(通过别名 `account_persona` 或名称 `账号人设` 匹配)
3. 根据 `platform_type` 查询对应平台的账号人设(如:小红书)
4. **读取所有必需字段**:
- 账号定位(positioning)
- 目标受众(target_audience)
- 内容方向(content_direction)
- 内容风格(content_style)**【必须严格遵循】**
- 内容原则(content_principles)**【必须严格遵守】**
- 图片生成提示词(image_generation_prompt)
- **验证要求**:如果未找到账号人设配置,必须抛出异常,不允许继续生成内容
↓
Step 4: 根据搜索结果和账号人设撰写内容
- **严格遵循账号人设**:必须严格按照从 HAP 读取的 `content_style` 和 `content_principles` 生成内容
- **禁止使用本地人设**:不允许参考或使用本地 `AGENTS.md` 文件中的内容
- **结合搜索资料**:将搜索到的资料与从 HAP 读取的账号人设结合,生成符合账号定位的内容
- **确保符合人设**:确保内容符合目标受众、内容方向和账号定位
↓
Step 5: 生成封面标题(5-10个备选)
- 根据账号人设的内容风格生成标题
- 符合账号定位和目标受众
↓
Step 6: 选择话题标签(从 HAP 话题库)
- 根据内容主题和账号人设的内容方向选择
↓
Step 7: 生成配图建议
- 结合账号人设的图片生成提示词风格
- 根据内容主题生成配图建议
↓
Step 8: 保存到本地文件(预览,按笔记目录结构组织)
↓
Step 9: 与用户确认内容、标题、图片
↓
Step 10: 用户确认后,从 HAP "账号人设" 表读取图片生成提示词(图片风格)
↓
Step 11: 从 HAP "API服务配置" 表动态读取图片生成功能配置
↓
Step 12: 结合图片风格提示词和配图建议,生成完整提示词
↓
Step 13: 提取密钥,生成图片(可选,使用配置的 API 服务)
↓
Step 14: 与用户确认是否直接发布至小红书
↓
Step 15: 与用户确认是否同步到 HAP,确认后才上传
- **小红书笔记**:只上传图片 URL(封面图和其他配图),不上传 Markdown 文档
- **其他平台**:根据平台需求上传图片和文档
- **关联选题(如果适用)**:
- 如果内容是基于选题库中的选题创作的,在创建内容记录时关联对应的选题(`related_topic` 字段)
- 如果内容不是基于选题创作的,不关联选题
↓
Step 16: 发布到目标平台(使用 Playwright MCP,如用户确认)User enters a topic
↓
Step 1: Dynamically read the search API configuration (Tavily/Serper) from the HAP "API Service Configuration" table
↓
Step 2: Call the search API to retrieve material related to the topic (Tavily API)
↓
Step 3: **【MANDATORY】Read the account persona configuration from the HAP "Account Persona" table (must be performed before content generation)**
- **Local files are prohibited**: using AGENTS.md or any other local file as the account persona source is strictly prohibited
- **HAP MCP must be called**: MCP must be used to call get_record_list() to read from the HAP "Account Persona" table
- **Reading flow**:
1. Confirm the currently connected HAP MCP application through get_app_info()
2. Dynamically obtain the ID of the "Account Persona" table by matching the alias account_persona or the name 账号人设
3. Query the account persona for the relevant platform according to platform_type, such as Xiaohongshu
4. **Read all required fields**:
- Account positioning (positioning)
- Target audience (target_audience)
- Content direction (content_direction)
- Content style (content_style) **【MUST BE STRICTLY FOLLOWED】**
- Content principles (content_principles) **【MUST BE STRICTLY OBSERVED】**
- Image generation prompt (image_generation_prompt)
- **Validation requirement**: if no account persona configuration is found, throw an exception and do not continue content generation
↓
Step 4: Write the content based on the search results and account persona
- **Strictly follow the account persona**: content must be generated strictly according to content_style and content_principles read from HAP
- **Local personas are prohibited**: do not reference or use content from the local AGENTS.md file
- **Combine the search material**: combine the retrieved material with the account persona read from HAP to generate content aligned with the account positioning
- **Ensure persona alignment**: ensure the content matches the target audience, content direction, and account positioning
↓
Step 5: Generate cover titles (5–10 alternatives)
- Generate titles according to the account persona's content style
- Ensure they match the account positioning and target audience
↓
Step 6: Select topic hashtags (from the HAP Hashtag Library)
- Select them according to the content topic and the account persona's content direction
↓
Step 7: Generate image suggestions
- Combine the account persona's image generation prompt style
- Generate image suggestions based on the content topic
↓
Step 8: Save to a local file for preview, organized according to the note directory structure
↓
Step 9: Confirm the content, titles, and images with the user
↓
Step 10: After user confirmation, read the image generation prompt (image style) from the HAP "Account Persona" table
↓
Step 11: Dynamically read the image generation configuration from the HAP "API Service Configuration" table
↓
Step 12: Combine the image style prompt and image suggestions to generate a complete prompt
↓
Step 13: Extract the key and generate images (optional, using the configured API service)
↓
Step 14: Confirm with the user whether to publish directly to Xiaohongshu
↓
Step 15: Confirm with the user whether to synchronize the content to HAP; upload only after confirmation
- **Xiaohongshu notes**: upload only image URLs, including the cover image and other images; do not upload the Markdown document
- **Other platforms**: upload images and documents according to platform requirements
- **Related topic, if applicable**:
- If the content was created from a topic in the Topic Idea Library, associate it with the corresponding topic through the related_topic field when creating the content record
- If the content was not created from a topic, do not create an association
↓
Step 16: Publish to the target platform using Playwright MCP, if confirmed by the user每日热点内容推荐工作流
Daily Trending Content Recommendation Workflow
用户请求热点内容推荐
↓
Step 1: 从 HAP "热点平台关注表" 读取用户关注的平台(is_followed = 1)
- 按优先级(priority)排序
- 获取平台代码(platform_code)
↓
Step 2: 从 HAP "API服务配置" 表读取热点新闻 API 配置
- 功能名称:热点新闻API
- 服务类型:热点新闻
- Endpoint URL: https://orz.ai/api/v1/dailynews
↓
Step 3: 调用热点新闻 API 获取各平台热点
- 对每个关注的平台调用:GET https://orz.ai/api/v1/dailynews/?platform={platform_code}
- 获取热点标题、URL、评分、描述等信息
- 合并所有平台的热点数据
↓
Step 4: 从 HAP "账号人设" 表读取账号人设配置
- 账号定位(positioning)
- 目标受众(target_audience)
- 内容方向(content_direction)
- 内容风格(content_style)
- 内容原则(content_principles)
↓
Step 5: 基于热点和账号人设分析选题
- 筛选与账号定位和内容方向相关的热点
- 分析每个热点的选题价值(热度、相关性、可创作性)
- 生成 5-10 个选题建议,每个选题包含:
- 选题标题
- 来源平台
- 选题角度(如何结合账号人设)
- 预期内容方向
- 推荐理由
- 相关度评分(1-10分)
- **按相关度评分排序,标注最推荐的选题**
↓
Step 6: 以 Markdown 表格形式展示选题建议,供用户选择
- **必须使用 Markdown 表格格式展示**,更加直观
- **表格结构**:
- 最推荐选题表格(AI 相关或评分 10/10 的选题)
- 其他推荐选题表格(评分 6-9/10 的选题)
- **表格列**:序号、选题标题、来源平台、选题角度、推荐理由、相关度评分
- **明确标注最推荐的选题**(如:⭐ 最推荐选题)
- 展示所有选题建议
- 用户选择一个或多个选题
↓
Step 6.5: 询问用户是否将选题加入选题库
- **询问用户**:是否将推荐的选题加入 HAP "选题库" 表
- **询问方式**:在展示选题建议后,询问"是否将这些选题加入选题库?"
- 如果用户确认,将用户选择的选题保存到 HAP "选题库" 表:
- `topic_title`: 选题标题
- `source_platform`: 来源平台(关联热点平台关注表,使用平台记录的 rowid)
- `topic_angle`: 选题角度
- `recommendation_reason`: 推荐理由
- `relevance_score`: 相关度评分
- `source_url`: 原文链接
- `content_preview`: 内容预览
- `topic_status`: 选题状态(默认:待创作)
- 如果用户不加入,跳过此步骤
- **批量保存**:如果用户选择了多个选题,使用 `batch_create_records` 批量保存
↓
Step 7: 用户选择选题后,深度搜索相关资料
- 从 HAP "API服务配置" 表读取搜索 API 配置(Tavily)
- 基于选题标题和角度,调用搜索 API 获取深度资料
- 结合热点新闻中的原始信息
↓
Step 8: 基于热点信息和搜索资料生成内容
- 结合热点信息(原始标题、描述、URL)
- 结合搜索到的深度资料
- 严格遵循账号人设中的内容风格和内容原则
- 生成符合账号定位的内容
↓
Step 9: 后续流程与标准内容生成流程相同
- 生成封面标题(5-10个备选)
- 选择话题标签(从 HAP 话题库)
- 生成配图建议
- 保存到本地文件(预览)
- 与用户确认内容、标题、图片
- 生成图片(用户确认后)
- 同步到 HAP(用户确认后):
- **如果内容是基于选题库中的选题创作的**:
- 在创建内容记录时,关联对应的选题(`related_topic` 字段)
- 更新选题状态为"创作中"或"已创作"
- 选题库中的 `related_content` 字段会自动关联已创作的内容(双向关联)
- **如果内容不是基于选题创作的**:
- 不关联选题,`related_topic` 字段留空
- 发布到目标平台(用户确认后)热点新闻 API 使用说明:
API 地址:
https://orz.ai/api/v1/dailynews请求方式:
GET参数:
- : 平台代码(必需),支持的平台代码见"热点平台关注表"说明
platform
请求示例:
GET https://orz.ai/api/v1/dailynews/?platform=baidu
GET https://orz.ai/api/v1/dailynews/?platform=weibo
GET https://orz.ai/api/v1/dailynews/?platform=zhihu响应格式:
json
{
"status": "200",
"data": [
{
"title": "热点标题",
"url": "热点链接",
"score": "热度评分",
"desc": "热点描述"
}
],
"msg": "success"
}配置说明:
- 在 HAP "API服务配置" 表中添加一条记录:
- 功能名称:热点新闻API(标题字段)
- 服务提供商:orz.ai
- 服务类型:热点新闻(从下拉列表选择)
- Endpoint URL:https://orz.ai/api/v1/dailynews(**必需填写**)
- 用途说明:用于获取各平台的热点新闻数据,支持每日热点内容推荐
- 配置状态:启用
热点平台关注表配置:
- 用户需要在 HAP "热点平台关注表" 中添加关注的平台
- 设置 (勾选)表示关注此平台
is_followed = 1 - 设置 (优先级,1-10)控制获取顺序
priority - 必须与热点新闻 API 支持的平台代码一致
platform_code
选题建议展示格式(重要):
- 必须使用 Markdown 表格格式展示选题建议,更加直观
- 表格结构示例:
markdown
## ⭐ 最推荐选题(AI 相关,强烈推荐) | 序号 | 选题标题 | 来源平台 | 选题角度 | 推荐理由 | |------|---------|---------|---------|---------| | 1 | 选题标题1 | 平台1 | AI 技术科普 | 符合账号定位... | ## 📌 其他推荐选题 | 序号 | 选题标题 | 来源平台 | 选题角度 | 推荐理由 | 相关度 | |------|---------|---------|---------|---------|--------| | 1 | 选题标题2 | 平台2 | 技术趋势解读 | 符合内容方向... | 8/10 | - 必须明确标注最推荐的选题(如:⭐ 最推荐选题、相关度评分 10/10)
- 按相关度评分排序,最推荐的选题放在最前面
- 每个选题包含:标题、来源平台、选题角度、推荐理由、相关度评分
- 不要在对话中生成文件,直接在对话中以 Markdown 表格形式展示
User requests trending content recommendations
↓
Step 1: Read the platforms followed by the user from the HAP "Trending Platform Follow List" table (is_followed = 1)
- Sort by priority
- Obtain platform codes (platform_code)
↓
Step 2: Read the Trending News API configuration from the HAP "API Service Configuration" table
- Function name: Trending News API
- Service type: Trending News
- Endpoint URL: https://orz.ai/api/v1/dailynews
↓
Step 3: Call the Trending News API to retrieve trending topics for each platform
- For each followed platform, call: GET https://orz.ai/api/v1/dailynews/?platform={platform_code}
- Retrieve the headline, URL, score, description, and other information
- Merge the trending data from all platforms
↓
Step 4: Read the account persona configuration from the HAP "Account Persona" table
- Account positioning (positioning)
- Target audience (target_audience)
- Content direction (content_direction)
- Content style (content_style)
- Content principles (content_principles)
↓
Step 5: Analyze topics based on the trending data and account persona
- Select trending topics related to the account positioning and content direction
- Analyze the content potential of each topic, including popularity, relevance, and creatability
- Generate 5–10 topic suggestions, each containing:
- Topic title
- Source platform
- Topic angle (how to combine it with the account persona)
- Expected content direction
- Recommendation reason
- Relevance score (1–10)
- **Sort by relevance score and clearly mark the most highly recommended topic**
↓
Step 6: Present the topic suggestions in a Markdown table so the user can make a selection
- **A Markdown table must be used** to provide a more intuitive presentation
- **Table structure**:
- Top recommendation table (AI-related or scored 10/10)
- Other recommendation table (scored 6–9/10)
- **Table columns**: number, topic title, source platform, topic angle, recommendation reason, relevance score
- **Clearly mark the top recommendation**, such as ⭐ Top Recommendation
- Display all topic suggestions
- The user selects one or more topics
↓
Step 6.5: Ask the user whether to add the selected topics to the Topic Idea Library
- **Ask the user**: Would you like to add these topics to the HAP "Topic Idea Library" table?
- **How to ask**: after presenting the topic suggestions, ask "Would you like to add these topics to the Topic Idea Library?"
- If the user confirms, save the selected topics to the HAP "Topic Idea Library" table:
- topic_title: topic title
- source_platform: source platform, linked to the Trending Platform Follow List table using the platform record's rowid
- topic_angle: topic angle
- recommendation_reason: recommendation reason
- relevance_score: relevance score
- source_url: original article URL
- content_preview: content preview
- topic_status: topic status, with 待创作 as the default
- If the user does not want to add them, skip this step
- **Batch saving**: if the user selects multiple topics, use batch_create_records to save them in bulk
↓
Step 7: After the user selects a topic, perform an in-depth search for related material
- Read the Tavily search API configuration from the HAP "API Service Configuration" table
- Search for in-depth material based on the topic title and angle
- Combine it with the original information from the Trending News API
↓
Step 8: Generate content based on the trending information and search material
- Combine the original headline, description, and URL from the trending information
- Combine the in-depth search material
- Strictly follow the content style and content principles in the account persona
- Generate content aligned with the account positioning
↓
Step 9: Continue with the standard content generation workflow
- Generate cover titles (5–10 alternatives)
- Select topic hashtags from the HAP Hashtag Library
- Generate image suggestions
- Save to a local file for preview
- Confirm the content, titles, and images with the user
- Generate images after user confirmation
- Synchronize to HAP after user confirmation:
- **If the content was created from a topic in the Topic Idea Library**:
- Associate it with the corresponding topic through the related_topic field when creating the content record
- Update the topic status to 创作中 or 已创作
- The related_content field in the Topic Idea Library automatically links to the created content through a bidirectional relation
- **If the content was not created from a topic**:
- Do not create an association and leave related_topic empty
- Publish to the target platform after user confirmationTrending News API Usage Notes:
API URL:
https://orz.ai/api/v1/dailynewsRequest method:
GETParameter:
- : platform code, required. See the "Trending Platform Follow List" section for supported platform codes.
platform
Request examples:
GET https://orz.ai/api/v1/dailynews/?platform=baidu
GET https://orz.ai/api/v1/dailynews/?platform=weibo
GET https://orz.ai/api/v1/dailynews/?platform=zhihuResponse format:
json
{
"status": "200",
"data": [
{
"title": "Trending headline",
"url": "Trending article URL",
"score": "Popularity score",
"desc": "Trending description"
}
],
"msg": "success"
}Configuration notes:
- Add a record to the HAP "API Service Configuration" table:
- Function name: Trending News API (title field)
- Service provider: orz.ai
- Service type: Trending News, selected from the dropdown list
- Endpoint URL: https://orz.ai/api/v1/dailynews (required)
- Purpose: retrieve trending news data for each platform and support daily trending content recommendations
- Configuration status: Enabled
Trending Platform Follow List configuration:
- The user must add followed platforms to the HAP "Trending Platform Follow List" table
- Set to indicate that the platform is followed
is_followed = 1 - Set from 1 to 10 to control retrieval order
priority - must match a platform code supported by the Trending News API
platform_code
Topic Suggestion Display Format (important):
- Topic suggestions must be displayed in a Markdown table for a more intuitive presentation
- Example table structure:
markdown
## ⭐ Top Recommendation (AI-related, highly recommended) | No. | Topic Title | Source Platform | Topic Angle | Recommendation Reason | |------|---------|---------|---------|---------| | 1 | Topic title 1 | Platform 1 | AI technology explainer | Matches the account positioning... | ## 📌 Other Recommendations | No. | Topic Title | Source Platform | Topic Angle | Recommendation Reason | Relevance | |------|---------|---------|---------|---------|--------| | 1 | Topic title 2 | Platform 2 | Technology trend analysis | Matches the content direction... | 8/10 | - The top recommendation must be clearly marked, such as ⭐ Top Recommendation or a relevance score of 10/10
- Sort by relevance score and place the top recommendation first
- Every topic must include: title, source platform, topic angle, recommendation reason, and relevance score
- Do not generate a file in the conversation; present the suggestions directly in the conversation as a Markdown table
2. 平台支持
2. Platform Support
小红书
Xiaohongshu
内容格式:
- 标题:10字以内,疑问式/数字式/痛点式/反差式
- 正文:300-400字,故事化开头,结构清晰
- 话题标签:5-8个,从 HAP 话题库选取
- 图片:封面图 + 2-3张配图
发布流程:
- 导航到
https://creator.xiaohongshu.com/publish/publish?type=image_text - 上传图片(使用 )
setInputFiles - 填写标题
- 填写正文(包含话题标签)
- 点击发布
HAP 工作表:
- 工作表名:(通用表,支持多平台)
内容管理 - 字段:
- : 平台类型(SingleSelect: 小红书/抖音/微信公众号/视频号/其他)
platform_type - : 内容标题(标题字段)
content_title - : 封面标题
cover_title - : 正文内容
content - : 话题标签(空格分隔)
tags - : 封面图(附件)
cover_image - : 其他配图(附件)
other_images - : Markdown 文档(附件)
markdown_doc - : 发布状态(草稿/待发布/已发布/已取消)
publish_status - : 发布时间
publish_time - : 内容链接(发布后更新,不同平台可能叫法不同)
note_url - : 浏览量
views - : 点赞数
likes - : 收藏数
collections - : 评论数
comments
Content format:
- Title: no more than 10 Chinese characters; use a question, number, pain-point, or contrast format
- Body: 300–400 Chinese characters; use a storytelling opening and a clear structure
- Hashtags: 5–8, selected from the HAP Hashtag Library
- Images: one cover image and 2–3 additional images
Publishing flow:
- Navigate to
https://creator.xiaohongshu.com/publish/publish?type=image_text - Upload the images using
setInputFiles - Enter the title
- Enter the body, including hashtags
- Click Publish
HAP worksheet:
- Worksheet name: , a shared table supporting multiple platforms
内容管理 - Fields:
- : platform type (SingleSelect: 小红书/抖音/微信公众号/视频号/其他)
platform_type - : content title (title field)
content_title - : cover title
cover_title - : body content
content - : hashtags, separated by spaces
tags - : cover image (attachment)
cover_image - : additional images (attachment)
other_images - : Markdown document (attachment)
markdown_doc - : publishing status (Draft/Pending/Published/Canceled)
publish_status - : publishing time
publish_time - : content URL, updated after publishing; the field name may vary by platform
note_url - : views
views - : likes
likes - : saves
collections - : comments
comments
抖音
Douyin
内容格式:
- 视频时长:15-60秒
- 文案:不超过50字
- 话题标签:3-5个
发布流程:
- 导航到
https://creator.douyin.com/ - 上传视频
- 填写文案
- 添加话题
- 点击发布
Content format:
- Video duration: 15–60 seconds
- Caption: no more than 50 Chinese characters
- Hashtags: 3–5
Publishing flow:
- Navigate to
https://creator.douyin.com/ - Upload the video
- Enter the caption
- Add hashtags
- Click Publish
微信公众号
WeChat Official Account
内容格式:
- 标题:不超过64字
- 正文:2000-5000字(HTML格式)
- 摘要:文章摘要
- 封面:封面图片
发布流程:
- 导航到
https://mp.weixin.qq.com/ - 点击"写新文章"
- 填写标题、正文、摘要
- 设置封面图
- 点击发布
Content format:
- Title: no more than 64 Chinese characters
- Body: 2,000–5,000 Chinese characters in HTML format
- Summary: article summary
- Cover: cover image
Publishing flow:
- Navigate to
https://mp.weixin.qq.com/ - Click "Write a New Article"
- Enter the title, body, and summary
- Set the cover image
- Click Publish
视频号
WeChat Channels
内容格式:
- 视频时长:30秒-30分钟
- 文案:不超过1000字
- 话题:3-5个
发布流程:
- 登录视频号管理后台
- 点击"发布视频"
- 上传视频
- 填写文案和话题
- 点击发布
Content format:
- Video duration: 30 seconds–30 minutes
- Caption: no more than 1,000 Chinese characters
- Hashtags: 3–5
Publishing flow:
- Log in to the WeChat Channels management console
- Click "Publish Video"
- Upload the video
- Enter the caption and hashtags
- Click Publish
3. 搜索资料(Tavily API)
3. Search Material (Tavily API)
使用 Tavily API 搜索相关资料
Use the Tavily API to Search for Related Material
API 服务配置管理:
搜索 API 配置统一存储在 HAP "API服务配置" 表中,按功能分类,每个功能一条记录包含所有配置字段。
重要:配置是动态获取的,不硬编码
配置读取流程:
- 确认 MCP 连接:先确认当前连接的 HAP 应用 MCP(通过 )
get_app_info() - 查询配置:从 HAP "API服务配置" 表查询搜索 API 配置
- 匹配配置:根据 (功能名称,如"Tavily 搜索API")或
function_name(服务类型:搜索API)匹配配置service_type - 验证状态:验证 (配置状态)为"启用"
config_status - 读取配置:读取该功能的所有配置字段(API Key、Base URL 等)
Tavily API 配置示例:
python
undefinedAPI Service Configuration Management:
Search API configurations are stored uniformly in the HAP "API Service Configuration" table. Each function has one record containing all configuration fields.
Important: configurations are obtained dynamically and are never hard-coded
Configuration reading flow:
- Confirm the MCP connection: first confirm the currently connected HAP application MCP through
get_app_info() - Query the configuration: query the search API configuration from the HAP "API Service Configuration" table
- Match the configuration: match by , such as "Tavily Search API", or
function_name, such as Search APIservice_type - Validate the status: ensure is Enabled
config_status - Read the configuration: read all configuration fields, including the API Key and Base URL
Tavily API configuration example:
python
undefinedStep 1: 确认当前连接的 MCP 应用
Step 1: Confirm the currently connected MCP application
current_app = mcp_hap-mcp-_get_app_info()
current_app_name = current_app['data']['name']
current_app = mcp_hap-mcp-_get_app_info()
current_app_name = current_app['data']['name']
Step 2: 动态获取工作表列表,通过别名匹配找到"API服务配置"表
Step 2: Dynamically obtain the worksheet list and find the API Service Configuration table by alias
重要:优先使用别名(alias)匹配,不要使用硬编码的 ID
Important: prioritize alias matching and do not use hard-coded IDs
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
api_config_worksheet_id = None
for ws in worksheets:
# 优先通过别名匹配,如果别名不存在则使用名称匹配
if ws.get('alias') == 'api_service_config' or ws.get('name') == 'API服务配置':
api_config_worksheet_id = ws['id']
break
if not api_config_worksheet_id:
raise Exception(f"在应用「{current_app_name}」中未找到「API服务配置」表(别名:api_service_config)")
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
api_config_worksheet_id = None
for ws in worksheets:
# Prioritize alias matching; use name matching when no alias exists
if ws.get('alias') == 'api_service_config' or ws.get('name') == 'API服务配置':
api_config_worksheet_id = ws['id']
break
if not api_config_worksheet_id:
raise Exception(f'Application {current_app_name} does not contain the API Service Configuration table (alias: api_service_config)')
Step 3: 查询 Tavily 搜索 API 配置
Step 3: Query the Tavily search API configuration
configs = mcp_hap-mcp-_get_record_list(
worksheet_id=api_config_worksheet_id,
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "function_name",
"operator": "contains",
"value": ["Tavily"]
},
{
"type": "condition",
"field": "config_status",
"operator": "eq",
"value": ["启用"]
}
]
}
)
configs = mcp_hap-mcp-_get_record_list(
worksheet_id=api_config_worksheet_id,
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "function_name",
"operator": "contains",
"value": ["Tavily"]
},
{
"type": "condition",
"field": "config_status",
"operator": "eq",
"value": ["启用"]
}
]
}
)
Step 4: 提取配置并调用 API
Step 4: Extract the configuration and call the API
if configs and len(configs) > 0:
config = configs[0]
api_key = config.get('api_key') # Tavily API Key(必需)
endpoint_url = config.get('endpoint_url') # Endpoint URL(必需)
# 验证必需字段
if not api_key:
raise Exception("Tavily API Key 未配置,请在 HAP 'API服务配置' 表中填写 api_key 字段")
if not endpoint_url:
raise Exception("Endpoint URL 未配置,请在 HAP 'API服务配置' 表中填写 endpoint_url 字段")
# 调用 Tavily API 搜索
import requests
response = requests.post(
f"{endpoint_url}/search",
headers={"Content-Type": "application/json"},
json={
"api_key": api_key,
"query": topic, # 用户输入的主题
"search_depth": "basic",
"max_results": 5,
"topic": "general",
"include_answer": False,
"include_raw_content": False,
"include_images": False
}
)
search_results = response.json().get('results', [])
# 使用搜索结果生成内容
**Tavily API 配置字段说明(必需字段):**
- `function_name`: 功能名称(Text,标题字段,如:"Tavily 搜索API")
- `provider`: 服务提供商(Text,如:"Tavily")
- `service_type`: 服务类型(SingleSelect: 搜索API/图片生成/内容生成/数据分析/其他)
- `api_key`: **API Key(Text,必需)** - Tavily API Key,如:tvly-dev-xxx...
- **何时填写**:搜索 API(Tavily、Serper 等)必须填写此字段
- `endpoint_url`: **Endpoint URL(Text,必需)** - API 基础地址,如:https://api.tavily.com
- **何时填写**:所有 API 服务都需要填写此字段,用于指定 API 的访问地址
- `config_status`: 配置状态(SingleSelect: 启用/禁用)
- `purpose`: 用途说明(Text,如:"用于搜索主题相关资料")
**搜索流程:**
1. **读取配置**:从 HAP "API服务配置" 表读取 Tavily 搜索 API 配置
2. **调用 API**:使用配置中的 API Key 调用 Tavily API 搜索主题相关资料
3. **处理结果**:提取搜索结果中的关键信息(标题、内容、URL 等)
4. **读取账号人设**(重要:必须在生成内容之前):从 HAP "账号人设" 表读取账号定位、内容风格、内容原则等
5. **生成内容**:将搜索结果与账号人设结合,严格遵循账号人设中的内容风格和内容原则,生成高质量内容
**搜索参数说明:**
- `query`: 搜索主题(用户输入)
- `search_depth`: 搜索深度(basic/advanced,推荐 basic)
- `max_results`: 最大结果数(推荐 5)
- `topic`: 主题类型(general/tech/business 等)
- `include_answer`: 是否包含答案摘要(False)
- `include_raw_content`: 是否包含原始内容(False)
- `include_images`: 是否包含图片(False)
**功能配置示例(HAP 表中):**
- **功能名称**:Tavily 搜索API(标题字段)
- **服务提供商**:Tavily
- **服务类型**:搜索API(从下拉列表选择)
- **用途说明**:用于搜索主题相关资料,获取最新信息
- **API Key**:tvly-dev-xxx...(**必需填写**,Tavily API Key)
- **Endpoint URL**:https://api.tavily.com(**必需填写**,API 基础地址)
- **配置状态**:启用(从下拉列表选择)
**热点新闻 API 配置示例(HAP 表中):**
- **功能名称**:热点新闻API(标题字段)
- **服务提供商**:orz.ai
- **服务类型**:热点新闻(从下拉列表选择)
- **用途说明**:用于获取各平台的热点新闻数据,支持每日热点内容推荐
- **Endpoint URL**:https://orz.ai/api/v1/dailynews(**必需填写**,API 基础地址)
- **配置状态**:启用(从下拉列表选择)
**重要提示:**
- `api_key` 和 `endpoint_url` 是搜索 API 的必需字段,必须填写
- `api_key` 用于 API 认证
- `endpoint_url` 用于指定 API 的访问地址,格式如:`https://api.tavily.com`
- **热点新闻 API 不需要 `api_key`**,只需要填写 `endpoint_url`if configs and len(configs) > 0:
config = configs[0]
api_key = config.get('api_key') # Tavily API Key, required
endpoint_url = config.get('endpoint_url') # Endpoint URL, required
# Validate required fields
if not api_key:
raise Exception('Tavily API Key is not configured. Enter api_key in the HAP API Service Configuration table')
if not endpoint_url:
raise Exception('Endpoint URL is not configured. Enter endpoint_url in the HAP API Service Configuration table')
# Call the Tavily API to search
import requests
response = requests.post(
f"{endpoint_url}/search",
headers={"Content-Type": "application/json"},
json={
"api_key": api_key,
"query": topic, # User-provided topic
"search_depth": "basic",
"max_results": 5,
"topic": "general",
"include_answer": False,
"include_raw_content": False,
"include_images": False
}
)
search_results = response.json().get('results', [])
# Use the search results to generate content
**Tavily API configuration fields (required fields):**
- `function_name`: function name (Text, title field), such as "Tavily Search API"
- `provider`: service provider (Text), such as "Tavily"
- `service_type`: service type (SingleSelect: Search API/Image Generation/Content Generation/Data Analysis/Other)
- `api_key`: **API Key (Text, required)** — Tavily API Key, such as `tvly-dev-xxx...`
- **When to enter it**: search APIs such as Tavily and Serper require this field
- `endpoint_url`: **Endpoint URL (Text, required)** — API base URL, such as `https://api.tavily.com`
- **When to enter it**: every API service requires this field to specify its endpoint
- `config_status`: configuration status (SingleSelect: Enabled/Disabled)
- `purpose`: purpose (Text), such as "Used to search for material related to a topic"
**Search flow:**
1. **Read the configuration**: read the Tavily search API configuration from the HAP "API Service Configuration" table
2. **Call the API**: use the configured API Key to call the Tavily API and search for material related to the topic
3. **Process the results**: extract key information from the search results, including titles, content, and URLs
4. **Read the account persona (important: must be done before content generation)**: read the account positioning, content style, content principles, and other settings from the HAP "Account Persona" table
5. **Generate content**: combine the search results with the account persona and strictly follow the persona's `content_style` and `content_principles` to generate high-quality content
**Search parameter notes:**
- `query`: search topic supplied by the user
- `search_depth`: search depth, basic/advanced; basic is recommended
- `max_results`: maximum number of results; 5 is recommended
- `topic`: topic type, such as general, tech, or business
- `include_answer`: whether to include an answer summary; False
- `include_raw_content`: whether to include raw content; False
- `include_images`: whether to include images; False
**Example functional configuration in the HAP table:**
- **Function name**: Tavily Search API (title field)
- **Service provider**: Tavily
- **Service type**: Search API, selected from the dropdown list
- **Purpose**: search for material related to a topic and obtain up-to-date information
- **API Key**: `tvly-dev-xxx...` (**required**, Tavily API Key)
- **Endpoint URL**: `https://api.tavily.com` (**required**, API base URL)
- **Configuration status**: Enabled, selected from the dropdown list
**Example Trending News API configuration in the HAP table:**
- **Function name**: Trending News API (title field)
- **Service provider**: orz.ai
- **Service type**: Trending News, selected from the dropdown list
- **Purpose**: retrieve trending news data for each platform and support daily trending content recommendations
- **Endpoint URL**: `https://orz.ai/api/v1/dailynews` (**required**, API base URL)
- **Configuration status**: Enabled, selected from the dropdown list
**Important notes:**
- `api_key` and `endpoint_url` are required fields for the search API and must be provided
- `api_key` is used for API authentication
- `endpoint_url` specifies the API endpoint, such as `https://api.tavily.com`
- The **Trending News API does not require an `api_key`**; only `endpoint_url` is needed4. 内容生成规范
4. Content Generation Standards
账号人设配置(重要:必须先读取)
Account Persona Configuration (important: must be read first)
必须从 HAP "账号人设" 表读取账号人设配置:
重要原则:生成内容之前,必须先从 HAP "账号人设" 表读取账号人设配置,严格遵循账号定位和内容规则。
强制要求:
- 禁止使用本地文件:绝对不允许使用 或其他本地文件作为账号人设来源
AGENTS.md - 必须从 HAP 读取:必须通过 HAP MCP 调用 从 HAP "账号人设" 表读取
get_record_list() - 必须在生成内容之前执行:如果未读取到账号人设配置,必须抛出异常,不允许继续生成内容
- 必须严格遵循:生成内容时必须严格按照从 HAP 读取的 和
content_style执行content_principles
读取流程:
- 确认当前连接的 MCP 应用
- 动态获取"账号人设"表的 ID(通过别名匹配)
- 根据 或
platform_name查询对应平台的账号人设platform_type - 读取所有必需字段:
- 账号定位(positioning):了解账号的核心定位
- 目标受众(target_audience):了解内容面向的受众群体
- 内容方向(content_direction):了解内容的主要方向
- 内容风格(content_style):了解内容应该采用的风格(必须严格遵循)
- 内容原则(content_principles):了解内容创作的原则和注意事项(必须严格遵守)
- 图片生成提示词(image_generation_prompt):了解图片风格要求
- 应用到内容生成:在生成内容时,严格遵循账号人设中的内容风格和内容原则
账号人设表字段:
- : 平台名称(Text,标题字段)
platform_name - : 平台类型(SingleSelect: 小红书/抖音/微信公众号/视频号)
platform_type - : 账号定位(Text,必需) - 账号的核心定位,用于指导内容方向
positioning - : 目标受众(Text,必需) - 内容面向的受众群体,用于调整内容风格和深度
target_audience - : 内容方向(Text,必需) - 内容的主要方向,用于确定内容主题和范围
content_direction - : 内容风格(Text,必需) - 内容应该采用的风格,必须严格遵循
content_style- 示例:专业但不高冷,用通俗易懂的语言解释复杂概念。简单直白,避免专业术语堆砌,必要时用类比和例子说明。
- : 内容原则(Text,必需) - 内容创作的原则和注意事项,必须严格遵守
content_principles- 示例:✅ 用简单语言解释复杂技术,让非技术人员也能理解;❌ 避免过度使用专业术语
- : 图片生成提示词(Text) - 用于生成图片的风格提示词
image_generation_prompt- 用途:用于生成图片的风格提示词,可以设置图片的整体风格、色彩、构图等
- 使用方式:生成图片时,将此提示词与具体图片内容描述结合
- 示例:中文手写信息海报风格插画,纵向构图,奶油系浅色底,可爱治愈、轻松幽默的科普视觉语言
使用示例(必须严格按照此流程执行):
python
undefinedThe account persona configuration must be read from the HAP "Account Persona" table:
Key principle: before generating content, always read the account persona configuration from the HAP "Account Persona" table and strictly follow the account positioning and content rules.
Mandatory requirements:
- Local files are prohibited: and other local files must never be used as the account persona source
AGENTS.md - Must be read from HAP: HAP MCP must be used to call to read from the HAP "Account Persona" table
get_record_list() - Must be performed before content generation: if no account persona configuration is read, throw an exception and do not continue content generation
- Must be strictly followed: content must be generated strictly according to and
content_styleread from HAPcontent_principles
Reading flow:
- Confirm the currently connected MCP application
- Dynamically obtain the ID of the "Account Persona" table by alias
- Query the account persona for the relevant platform according to or
platform_nameplatform_type - Read all required fields:
- Account positioning (): understand the account's core positioning
positioning - Target audience (): understand the audience for whom the content is intended
target_audience - Content direction (): understand the account's main content areas
content_direction - Content style (): understand the style to use; it must be strictly followed
content_style - Example: professional but approachable, explaining complex concepts in plain language. Use straightforward wording and avoid excessive technical jargon; use analogies and examples when necessary.
- Content principles (): understand the principles and considerations for content creation; they must be strictly observed
content_principles - Example: ✅ Explain complex technology in simple language so nontechnical readers can understand; ❌ Avoid excessive use of technical terminology
- Image generation prompt (): understand the image style requirements
image_generation_prompt
- Account positioning (
- Apply them to content generation: strictly follow the and
content_stylewhen generating contentcontent_principles
Account Persona table fields:
- : platform name (Text, title field)
platform_name - : platform type (SingleSelect: 小红书/抖音/微信公众号/视频号)
platform_type - : account positioning (Text, required) — the account's core positioning, used to guide content direction
positioning - : target audience (Text, required) — the audience for whom the content is intended, used to adjust style and depth
target_audience - : content direction (Text, required) — the account's main content areas, used to determine subject matter and scope
content_direction - : content style (Text, required) — the style to use when creating content; it must be strictly followed
content_style- Example: professional but not overly academic; explain complex concepts in accessible language. Keep the wording simple and direct, avoid piling on technical jargon, and use analogies and examples when necessary.
- : content principles (Text, required) — principles and considerations for content creation; they must be strictly observed
content_principles- Example: ✅ Explain complex technology in simple language so nontechnical readers can understand; ❌ Avoid excessive use of technical terminology
- : image generation prompt (Text) — style prompt used when generating images
image_generation_prompt- Purpose: defines the overall image style, colors, composition, and other visual requirements
- How to use it: combine this prompt with a specific image content description when generating an image
- Example: Chinese handwritten information-poster illustration style, vertical composition, cream-colored light background, cute and healing, lighthearted and humorous educational visual language
Usage example (this flow must be followed exactly):
python
undefinedStep 1: 确认当前连接的 HAP MCP 应用
Step 1: Confirm the currently connected HAP MCP application
current_app = mcp_hap-mcp-_get_app_info()
current_app_name = current_app['data']['name']
print(f"当前连接的 HAP 应用:{current_app_name}")
current_app = mcp_hap-mcp-_get_app_info()
current_app_name = current_app['data']['name']
print(f"Currently connected HAP application: {current_app_name}")
Step 2: 通过别名匹配找到"账号人设"表(不要使用硬编码 ID)
Step 2: Find the Account Persona table by alias; do not use a hard-coded ID
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
persona_worksheet_id = None
for ws in worksheets:
# 优先通过别名匹配,如果别名不存在则使用名称匹配
if ws.get('alias') == 'account_persona' or ws.get('name') == '账号人设':
persona_worksheet_id = ws['id']
break
if not persona_worksheet_id:
raise Exception(f"在应用「{current_app_name}」中未找到「账号人设」表(别名:account_persona)。请确保 HAP 应用中存在此表。")
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
persona_worksheet_id = None
for ws in worksheets:
# Prioritize alias matching; use name matching when no alias exists
if ws.get('alias') == 'account_persona' or ws.get('name') == '账号人设':
persona_worksheet_id = ws['id']
break
if not persona_worksheet_id:
raise Exception(f'Application {current_app_name} does not contain the Account Persona table (alias: account_persona). Create this table in the HAP application.')
Step 3: 查询小红书账号人设(重要:必须在生成内容之前读取)
Step 3: Query the Xiaohongshu account persona; this must happen before content generation
personas = mcp_hap-mcp-_get_record_list(
worksheet_id=persona_worksheet_id, # 使用通过别名匹配获取的 ID
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "platform_type",
"operator": "eq",
"value": ["小红书"]
}
]
}
)
personas = mcp_hap-mcp-_get_record_list(
worksheet_id=persona_worksheet_id, # Use the ID obtained through alias matching
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "platform_type",
"operator": "eq",
"value": ["小红书"]
}
]
}
)
Step 4: 验证是否读取到账号人设(强制要求)
Step 4: Validate that the account persona was read; this is mandatory
if not personas or len(personas) == 0:
raise Exception(f"在应用「{current_app_name}」的「账号人设」表中未找到小红书账号人设配置。请先在 HAP 中添加账号人设记录。")
persona = personas[0]
if not personas or len(personas) == 0:
raise Exception(f'No Xiaohongshu account persona configuration was found in the Account Persona table of application {current_app_name}. Add a persona record in HAP first.')
persona = personas[0]
Step 5: 读取所有账号人设字段(必需)
Step 5: Read all required account persona fields
positioning = persona.get('positioning') # 账号定位
target_audience = persona.get('target_audience') # 目标受众
content_direction = persona.get('content_direction') # 内容方向
content_style = persona.get('content_style') # 内容风格(必须严格遵循)
content_principles = persona.get('content_principles') # 内容原则(必须严格遵守)
image_prompt_base = persona.get('image_generation_prompt', '') # 图片风格基础提示词
positioning = persona.get('positioning') # Account positioning
target_audience = persona.get('target_audience') # Target audience
content_direction = persona.get('content_direction') # Content direction
content_style = persona.get('content_style') # Content style; must be strictly followed
content_principles = persona.get('content_principles') # Content principles; must be strictly observed
image_prompt_base = persona.get('image_generation_prompt', '') # Base image style prompt
Step 6: 验证必需字段是否存在
Step 6: Validate that all required fields exist
if not content_style:
raise Exception(f"账号人设配置中缺少「内容风格」(content_style)字段,无法生成内容。")
if not content_principles:
raise Exception(f"账号人设配置中缺少「内容原则」(content_principles)字段,无法生成内容。")
if not content_style:
raise Exception('The account persona configuration is missing content_style. Content generation cannot continue.')
if not content_principles:
raise Exception('The account persona configuration is missing content_principles. Content generation cannot continue.')
Step 7: 打印账号人设信息(用于确认)
Step 7: Print the account persona information for confirmation
print(f"\n✅ 已从 HAP 读取账号人设配置:")
print(f" - 账号定位:{positioning}")
print(f" - 目标受众:{target_audience}")
print(f" - 内容方向:{content_direction}")
print(f" - 内容风格:{content_style[:100]}...")
print(f" - 内容原则:{content_principles[:100]}...")
print(f"\n✅ Account persona configuration read from HAP:")
print(f" - Account positioning: {positioning}")
print(f" - Target audience: {target_audience}")
print(f" - Content direction: {content_direction}")
print(f" - Content style: {content_style[:100]}...")
print(f" - Content principles: {content_principles[:100]}...")
Step 8: 根据账号人设和搜索结果生成内容
Step 8: Generate content based on the account persona and search results
必须严格遵循从 HAP 读取的 content_style 和 content_principles
Strictly follow content_style and content_principles read from HAP
禁止使用本地 AGENTS.md 文件或其他本地文件
Do not use the local AGENTS.md file or any other local file
生成内容示例:
Content generation example:
1. 根据 content_style 确定写作风格(如:通俗易懂、专业但不高冷等)
1. Determine the writing style from content_style, such as accessible language or a professional but approachable style
2. 根据 content_principles 确定内容原则(如:用简单语言解释复杂技术、避免专业术语堆砌等)
2. Determine the content principles from content_principles, such as explaining complex technology in simple terms and avoiding excessive jargon
3. 根据 positioning 确定内容定位(如:IT公司产品经理视角)
3. Determine the account positioning from positioning, such as an IT company product manager perspective
4. 根据 target_audience 调整内容深度和表达方式
4. Adjust content depth and expression for the target_audience
5. 根据 content_direction 确定内容主题和范围
5. Determine the content subject and scope from content_direction
6. 结合搜索结果中的资料,生成符合账号人设的内容
6. Combine the search material with the account persona to generate content aligned with the positioning
生成标题时,也要遵循从 HAP 读取的 content_style 和 positioning
When generating titles, also follow content_style and positioning read from HAP
生成配图建议时,要结合从 HAP 读取的 image_prompt_base
When generating image suggestions, combine them with image_prompt_base read from HAP
生成图片时,将从 HAP 读取的 image_prompt_base 与具体内容结合
When generating images, combine image_prompt_base read from HAP with the specific content
undefinedundefined内容撰写要求(重要:必须遵循账号人设)
Content Writing Requirements (important: follow the account persona)
内容生成流程:
- 先读取账号人设:从 HAP "账号人设" 表读取账号定位、内容风格、内容原则等(必须在生成内容之前)
- 结合搜索资料:将搜索到的资料与账号人设结合
- 严格遵循账号人设:
- 必须按照 (内容风格)来撰写
content_style - 必须遵守 (内容原则)
content_principles - 确保内容符合 (账号定位)
positioning - 确保内容适合 (目标受众)
target_audience - 确保内容符合 (内容方向)
content_direction
- 必须按照
小红书笔记(300-400字)通用要求:
- 开场吸引:故事化开头,带情感色彩(兴奋/好奇/思考),用产品经理的视角
- 技术科普:用简单语言解释复杂概念,避免专业术语堆砌
- 产品视角:分析技术对行业和用户的影响
- 总结升华:行动建议/思考启发
内容生成流程(参考 wechat-article-writer skill):
- Step 1: 搜索资料(Tavily API)
- Step 2: 撰写文章(必须先读取账号人设)
- Step 3: 生成标题(5-10个备选,参考小红书爆款标题风格)
- Step 4: 排版优化 + 配图建议
微信公众号文章(2000-5000字)通用要求:
- 标题:吸引眼球,不超过64字
- 摘要:文章核心观点
- 正文:HTML格式,结构清晰
- 引言
- 主体内容(分章节)
- 总结
- 配图:封面图 + 正文配图
注意:以上是通用要求,实际撰写时必须严格遵循账号人设中的 和 。
content_stylecontent_principlesContent generation flow:
- Read the account persona first: read the account positioning, content style, content principles, and other settings from the HAP "Account Persona" table before generating content
- Combine the search material: combine the retrieved material with the account persona
- Strictly follow the account persona:
- Write according to
content_style - Observe
content_principles - Ensure the content matches
positioning - Ensure the content is suitable for
target_audience - Ensure the content matches
content_direction
- Write according to
General requirements for Xiaohongshu notes (300–400 Chinese characters):
- Engaging opening: use a storytelling opening with emotional resonance, such as excitement, curiosity, or reflection, from a product manager's perspective
- Technology explainer: explain complex concepts in simple language and avoid excessive technical terminology
- Product perspective: analyze the impact of technology on industries and users
- Conclusion and takeaways: provide actionable advice or thought-provoking conclusions
Content generation flow (referencing the wechat-article-writer skill):
- Step 1: Search for material through the Tavily API
- Step 2: Write the article after reading the account persona
- Step 3: Generate 5–10 alternative titles using popular Xiaohongshu title styles
- Step 4: Optimize the formatting and provide image suggestions
General requirements for WeChat Official Account articles (2,000–5,000 Chinese characters):
- Title: eye-catching and no more than 64 Chinese characters
- Summary: summarize the article's central argument
- Body: HTML format with a clear structure
- Introduction
- Main content divided into sections
- Conclusion
- Images: cover image and body images
Note: These are general requirements. Actual writing must strictly follow and in the account persona.
content_stylecontent_principles封面标题生成(必须遵循账号人设,参考小红书爆款标题风格)
Cover Title Generation (follow the account persona and popular Xiaohongshu title styles)
生成 5-10 个备选标题,参考小红书爆款标题特点:
标题类型:
- 疑问式:引发好奇("agentic 是什么?AI 终于能自己干活了")
- 数字式:具体数字更有说服力("3分钟搞懂 agentic AI!")
- 痛点式:直击读者痛处("还在手动操作?agentic AI 让你一次指令全搞定")
- 反差式:制造冲突("AI 不再'等指令'!agentic 让 AI 主动工作")
- 揭秘式:制造悬念("揭秘 agentic:AI 从'问答机'到'智能助手'的进化")
- 结果式:先展示价值("AI 也能自主决策了!agentic 到底是什么?")
- 对比式:清晰展示差异("传统 AI vs agentic AI:从被动响应到主动执行")
- 趋势式:强调时代感("agentic 是什么?AI 的'数字员工'时代来了")
- 身份标签式:符合账号人设("产品经理视角:agentic AI 如何改变我们的工作方式")
重要:
- 标题风格必须符合账号人设中的 (内容风格)
content_style - 标题要符合账号人设中的 (账号定位)和
positioning(目标受众)target_audience - 参考小红书爆款标题的特点:吸引眼球、引发好奇、强调价值、降低学习门槛
- 推荐首选标题,并说明理由
Generate 5–10 alternative titles based on the characteristics of popular Xiaohongshu titles.
Title types:
- Question-based: stimulate curiosity, such as "What is agentic? AI can finally work on its own"
- Number-based: specific numbers are more persuasive, such as "Understand agentic AI in 3 minutes!"
- Pain-point-based: address the reader's pain points directly, such as "Still working manually? agentic AI handles everything with one instruction"
- Contrast-based: create a contrast, such as "AI no longer 'waits for commands'! agentic lets AI work proactively"
- Reveal-based: create suspense, such as "Revealing agentic: AI's evolution from a question-answering machine to an intelligent assistant"
- Result-based: present the value first, such as "AI can make autonomous decisions too! What exactly is agentic?"
- Comparison-based: clearly present the difference, such as "Traditional AI vs. agentic AI: from passive responses to proactive execution"
- Trend-based: emphasize the era, such as "What is agentic? The era of AI 'digital employees' has arrived"
- Identity-based: align with the account persona, such as "A product manager's perspective: how agentic AI changes the way we work"
Important:
- The title style must comply with the account persona's
content_style - Titles must match the account persona's and
positioningtarget_audience - Follow the characteristics of popular Xiaohongshu titles: attention-grabbing, curiosity-inducing, value-focused, and accessible
- Recommend a primary title and explain why
话题标签选择(必须符合账号人设)
Hashtag Selection (must align with the account persona)
从 HAP 话题库表中选取:
选择策略:
- 优先使用高热度标签(提升曝光)
- 根据主题匹配话题类型
- 搭配精准标签吸引目标用户
- 确保标签符合账号人设中的 (内容方向)和
content_direction(目标受众)target_audience
查询方法:
python
undefinedSelect hashtags from the HAP Hashtag Library table.
Selection strategy:
- Prioritize high-heat hashtags to improve exposure
- Match the hashtag type to the content topic
- Combine precise hashtags to attract the target audience
- Ensure the hashtags align with the account persona's and
content_directiontarget_audience
Query method:
python
undefinedStep 1: 通过别名匹配找到"话题库"表(不要使用硬编码 ID)
Step 1: Find the Hashtag Library table by alias; do not use a hard-coded ID
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
topics_worksheet_id = None
for ws in worksheets:
# 优先通过别名匹配,如果别名不存在则使用名称匹配
if ws.get('alias') == 'topic_library' or ws.get('name') == '话题库':
topics_worksheet_id = ws['id']
break
if not topics_worksheet_id:
raise Exception(f"在应用「{current_app_name}」中未找到「话题库」表(别名:topic_library)")
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
topics_worksheet_id = None
for ws in worksheets:
# Prioritize alias matching; use name matching when no alias exists
if ws.get('alias') == 'topic_library' or ws.get('name') == '话题库':
topics_worksheet_id = ws['id']
break
if not topics_worksheet_id:
raise Exception(f'Application {current_app_name} does not contain the Hashtag Library table (alias: topic_library)')
Step 2: 查询高热度话题
Step 2: Query high-heat hashtags
mcp_hap-mcp-_get_record_list(
worksheet_id=topics_worksheet_id, # 使用通过别名匹配获取的 ID
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "heat_level",
"operator": "eq",
"value": ["高热度"]
}
]
}
)
mcp_hap-mcp-_get_record_list(
worksheet_id=topics_worksheet_id, # Use the ID obtained through alias matching
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "heat_level",
"operator": "eq",
"value": ["高热度"]
}
]
}
)
查询特定平台的内容(通过别名匹配获取工作表ID)
Query content for a specific platform by obtaining the worksheet ID through alias matching
Step 1: 通过别名匹配找到"内容管理"表(不要使用硬编码 ID)
Step 1: Find the Content Management table by alias; do not use a hard-coded ID
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
content_worksheet_id = None
for ws in worksheets:
# 优先通过别名匹配,如果别名不存在则使用名称匹配
if ws.get('alias') == 'content_management' or ws.get('name') == '内容管理':
content_worksheet_id = ws['id']
break
if not content_worksheet_id:
raise Exception(f"在应用「{current_app_name}」中未找到「内容管理」表(别名:content_management)")
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
content_worksheet_id = None
for ws in worksheets:
# Prioritize alias matching; use name matching when no alias exists
if ws.get('alias') == 'content_management' or ws.get('name') == '内容管理':
content_worksheet_id = ws['id']
break
if not content_worksheet_id:
raise Exception(f'Application {current_app_name} does not contain the Content Management table (alias: content_management)')
Step 2: 查询小红书内容
Step 2: Query Xiaohongshu content
mcp_hap-mcp-_get_record_list(
worksheet_id=content_worksheet_id,
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "platform_type",
"operator": "eq",
"value": ["小红书"]
}
]
}
)
undefinedmcp_hap-mcp-_get_record_list(
worksheet_id=content_worksheet_id,
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "platform_type",
"operator": "eq",
"value": ["小红书"]
}
]
}
)
undefined4. 图片生成
4. Image Generation
支持多个图片生成 API 配置
Support for Multiple Image Generation API Configurations
API 服务配置管理:
所有 API 服务配置统一存储在 HAP "API服务配置" 表中,按功能分类,每个功能一条记录包含所有配置字段。
重要:配置是动态获取的,不硬编码
多配置选择机制:
- 支持多个图片生成 API 配置:可以在 HAP "API服务配置" 表中配置多个图片生成 API(如 TUZI API、火山引擎即梦 API 等)
- "是否默认"字段控制:通过 (是否默认)字段控制使用哪个配置
is_default- 如果存在标记为"默认"的配置,优先使用该配置
- 如果没有默认配置,使用第一个启用的配置
- 配置状态控制:只有 (配置状态)为"启用"的配置才会被使用
config_status
配置读取流程:
- 确认 MCP 连接:先确认当前连接的 HAP 应用 MCP(通过 )
get_app_info() - 查询配置:从 HAP "API服务配置" 表查询所有图片生成类型的配置(且
service_type = 图片生成)config_status = 启用 - 选择配置:
- 优先选择 (是默认)的配置
is_default = 1 - 如果没有默认配置,使用第一个启用的配置
- 优先选择
- 读取配置:读取该配置的所有配置字段(API Key、Endpoint URL、Access Key ID 等)
配置选择示例:
python
undefinedAPI Service Configuration Management:
All API service configurations are stored uniformly in the HAP "API Service Configuration" table. Each function has one record containing all configuration fields.
Important: configurations are obtained dynamically and are never hard-coded
Multiple-configuration selection mechanism:
- Multiple image generation API configurations are supported: multiple image generation APIs, such as TUZI API and Volcengine Jimeng API, can be configured in the HAP "API Service Configuration" table
- The field controls selection: use the
is_defaultfield to select the configurationis_default- If a configuration is marked as the default, use it first
- If no default configuration exists, use the first enabled configuration
- Configuration status controls availability: only configurations with set to Enabled are used
config_status
Configuration reading flow:
- Confirm the MCP connection: first confirm the currently connected HAP application MCP through
get_app_info() - Query the configurations: query all image generation configurations from the HAP "API Service Configuration" table where and
service_type = 图片生成config_status = 启用 - Select the configuration:
- Prioritize configurations with
is_default = 1 - If no default configuration exists, use the first enabled configuration
- Prioritize configurations with
- Read the configuration: read all configuration fields, including the API Key, Endpoint URL, Access Key ID, and other fields
Configuration selection example:
python
undefinedStep 1: 确认当前连接的 MCP 应用
Step 1: Confirm the currently connected HAP MCP application
current_app = mcp_hap-mcp-_get_app_info()
current_app_name = current_app['data']['name']
current_app = mcp_hap-mcp-_get_app_info()
current_app_name = current_app['data']['name']
Step 2: 通过别名匹配找到"API服务配置"表
Step 2: Find the API Service Configuration table by alias
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
api_config_worksheet_id = None
for ws in worksheets:
if ws.get('alias') == 'api_service_config' or ws.get('name') == 'API服务配置' or ws.get('name') == '密钥管理':
api_config_worksheet_id = ws['id']
break
if not api_config_worksheet_id:
raise Exception(f"在应用「{current_app_name}」中未找到「API服务配置」表(别名:api_service_config)")
worksheets = mcp_hap-mcp-_get_app_worksheets_list()
api_config_worksheet_id = None
for ws in worksheets:
if ws.get('alias') == 'api_service_config' or ws.get('name') == 'API服务配置' or ws.get('name') == '密钥管理':
api_config_worksheet_id = ws['id']
break
if not api_config_worksheet_id:
raise Exception(f'Application {current_app_name} does not contain the API Service Configuration table (alias: api_service_config)')
Step 3: 查询所有图片生成 API 配置(启用状态)
Step 3: Query all enabled image generation API configurations
configs = mcp_hap-mcp-_get_record_list(
worksheet_id=api_config_worksheet_id,
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "service_type",
"operator": "eq",
"value": ["图片生成"]
},
{
"type": "condition",
"field": "config_status",
"operator": "eq",
"value": ["启用"]
}
]
}
)
configs = mcp_hap-mcp-_get_record_list(
worksheet_id=api_config_worksheet_id,
filter={
"type": "group",
"logic": "AND",
"children": [
{
"type": "condition",
"field": "service_type",
"operator": "eq",
"value": ["图片生成"]
},
{
"type": "condition",
"field": "config_status",
"operator": "eq",
"value": ["启用"]
}
]
}
)
Step 4: 选择配置(优先使用默认配置)
Step 4: Select the configuration, prioritizing the default configuration
if configs and len(configs) > 0:
# 优先选择标记为"默认"的配置
default_config = None
for config in configs:
if config.get('is_default') == 1:
default_config = config
break
# 如果没有默认配置,使用第一个启用的配置
if not default_config:
default_config = configs[0]
config = default_config
# 根据服务提供商读取对应的配置字段
provider = config.get('provider', '').upper()
if 'TUZI' in provider:
# TUZI API (OpenAI 兼容接口)
api_key = config.get('api_key') # 必需
endpoint_url = config.get('endpoint_url', 'https://api.tu-zi.com/v1') # 必需
# 使用 OpenAI SDK 调用
elif '火山引擎' in provider or '即梦' in config.get('function_name', ''):
# 火山引擎即梦 API
access_key_id = config.get('access_key_id') # 必需
secret_access_key = config.get('secret_access_key') # 必需
region = config.get('region', 'cn-beijing')
service = config.get('service', 'cv')
api_version = config.get('api_version', 'jimeng_t2i_v31')
sdk_name = config.get('sdk_name', 'volcenginesdkcv20240606')
# 使用火山引擎 SDK 调用
**生成流程:**
1. **确认 MCP**:确认当前连接的 HAP 应用 MCP(通过用户提供或指定)
2. **读取账号人设**:从 HAP "账号人设" 表读取对应平台的账号人设配置
3. **获取图片风格**:从账号人设中提取 `image_generation_prompt`(图片生成提示词)
4. **动态读取配置**:从 HAP "API服务配置" 表查询所有图片生成类型的配置
5. **选择配置**:
- 优先选择 `is_default = 1`(是默认)的配置
- 如果没有默认配置,使用第一个启用的配置
6. **提取密钥**:根据服务提供商提取对应的密钥字段
- TUZI API:`api_key`、`endpoint_url`
- 火山引擎即梦:`access_key_id`、`secret_access_key`、`region`、`service` 等
7. **生成提示词**:将账号人设中的图片风格提示词与具体配图建议结合,生成完整的图片生成提示词
- 格式:`{image_generation_prompt},{具体配图内容描述}`
- 示例:`手绘风格插画,清新活泼的卡通插画风格,{具体图片内容}`
8. **调用 API 生成图片**:
- **TUZI API**:使用 OpenAI SDK,支持多个模型(gemini-3-pro-image-preview、dall-e-3、dall-e-2)
- **必须使用 `response_format="url"` 参数**:确保 API 返回 URL 格式而非 base64
- **请求参数**:`model`、`prompt`、`n=1`、`response_format="url"`、`size="{width}x{height}"`
- **火山引擎即梦**:使用火山引擎 SDK
- **并行生成**:使用线程池并行生成多张图片(最多3个并发),大幅提升生成速度
- **自动跳过已存在**:检查本地文件是否存在,如果已存在则跳过生成,节省时间和成本
9. **处理 API 响应**:
- **优先处理 URL**:如果 API 返回 HTTP/HTTPS URL,直接使用
- **处理 base64 数据**:如果 API 返回 base64 数据(data URI 或 base64 字符串),自动解码并保存为图片文件
- **错误处理**:如果 API 返回无效数据,记录错误并继续生成其他图片
10. **保存图片**:
- **保存图片 URL**:保存图片 URL 到 `配图/image_urls.json`(只保存 URL,不保存 base64)
- **自动下载图片**:从 URL 自动下载图片文件到 `配图/{图片名称}.png`,方便本地查看和展示
- **图片文件命名**:封面图.png、对比图.png、流程图.png、应用场景图.png 等
- **下载失败处理**:如果下载失败,保留 URL 并记录警告,不影响后续流程
11. **上传到 HAP**:
- **小红书笔记**:只上传图片 URL(封面图和其他配图)到 HAP 附件字段,不上传 Markdown 文档
- **其他平台**:根据平台需求上传图片和文档
- **上传时使用 URL**:上传到 HAP 时使用图片 URL,不需要 base64 数据
**图片格式要求(小红书):**
- **尺寸**:768x1024(小红书 3:4 格式,竖屏)
- **风格**:手绘风格插画(清新活泼的卡通插画风格)
- **内容要求**:图片内容必须与正文内容强相关,表达核心含义(流程、介绍、对比等)
**图片类型(必须遵循账号人设):**
- **封面图**:结合账号人设的图片风格提示词 + 具体内容描述 + **封面标题文字**
- 封面图必须包含封面标题文字,使用粗体装饰性字体,带笔画和渐变效果
- 标题文字要醒目,占据封面重要位置,符合小红书封面图设计规范
- **对比图**:结合账号人设的图片风格提示词 + 对比内容描述(与内容强相关)
- **流程图**:结合账号人设的图片风格提示词 + 流程内容描述(与内容强相关)
- **应用场景图**:结合账号人设的图片风格提示词 + 场景内容描述(与内容强相关)
**手绘风格插画特点(参考):**
- **整体风格**:清新活泼的卡通插画风格,充满正能量和活力
- **线条**:粗黑描边,手绘质感,流畅自然
- **色彩**:明亮饱和的色彩 - 橙色、黄色、蓝色、绿色、红色等温暖色调,和谐配色
- **渲染**:平面风格为主,搭配简单的渐变和高光,增加立体感
- **字体**:粗体装饰性字体,带笔画和渐变效果
- **氛围**:积极向上、充满活力、科技感、温馨可爱
- **设计哲学**:简洁明快、视觉冲击力强、适合数字媒体传播
**重要**:
- 配图建议必须结合账号人设中的 `image_generation_prompt`(图片生成提示词)来生成
- 图片内容必须与正文内容强相关,表达核心含义(流程、介绍、对比等)
- 封面图必须包含封面标题文字
- 图片格式必须符合平台要求(小红书:768x1024,3:4格式)
**图片提示词生成规则:**
1. 从 HAP "账号人设" 表读取 `image_generation_prompt`(图片风格基础提示词)
2. 将风格提示词与具体图片内容描述结合
3. **格式**:`{image_generation_prompt},{具体图片内容描述,与内容强相关}`
4. **封面图特殊要求**:封面图必须包含封面标题文字
- 格式:`{image_generation_prompt},封面图内容: {具体内容描述},标题文字: "{封面标题}",使用粗体装饰性字体,带笔画和渐变效果`
5. **示例(封面图)**:
- 账号人设中的风格:`创建一个手绘风格的插画作品,具有以下特点: 整体风格: 清新活泼的卡通插画风格,充满正能量和活力...`
- 具体图片内容:`展示"agentic 是什么"的核心概念,中心是一个可爱的大脑图标,大脑周围有多个小机器人或执行箭头,表示自主规划和执行能力`
- 封面标题:`3分钟搞懂 agentic AI!`
- 最终提示词:`{image_generation_prompt},封面图内容: 展示"agentic 是什么"的核心概念,中心是一个可爱的大脑图标,大脑周围有多个小机器人或执行箭头,表示自主规划和执行能力。上方有粗体装饰性标题文字"3分钟搞懂 agentic AI!",使用粗体装饰性字体,带笔画和渐变效果,增强视觉冲击力。标题文字要醒目,占据封面重要位置,符合小红书封面图设计规范。`
6. **示例(对比图)**:
- 账号人设中的风格:`创建一个手绘风格的插画作品...`
- 具体图片内容:`左右分屏对比,左侧展示传统AI - 一个简单的问答机形象,只能被动回答问题,用问号表示。右侧展示agentic AI - 一个智能助手形象,正在自主规划任务、执行操作,用执行箭头和任务卡片表示。中间用粗箭头连接,表示从"被动响应"到"主动执行"的转变。整体清晰易懂,色彩对比鲜明。`
- 最终提示词:`{image_generation_prompt},{具体图片内容描述}`if configs and len(configs) > 0:
# Prioritize configurations marked as the default
default_config = None
for config in configs:
if config.get('is_default') == 1:
default_config = config
break
# If no default configuration exists, use the first enabled configuration
if not default_config:
default_config = configs[0]
config = default_config
# Read the appropriate configuration fields based on the service provider
provider = config.get('provider', '').upper()
if 'TUZI' in provider:
# TUZI API, an OpenAI-compatible interface
api_key = config.get('api_key') # Required
endpoint_url = config.get('endpoint_url', 'https://api.tu-zi.com/v1') # Required
# Use the OpenAI SDK to call the API
elif '火山引擎' in provider or '即梦' in config.get('function_name', ''):
# Volcengine Jimeng API
access_key_id = config.get('access_key_id') # Required
secret_access_key = config.get('secret_access_key') # Required
region = config.get('region', 'cn-beijing')
service = config.get('service', 'cv')
api_version = config.get('api_version', 'jimeng_t2i_v31')
sdk_name = config.get('sdk_name', 'volcenginesdkcv20240606')
# Use the Volcengine SDK to call the API
**Generation flow:**
1. **Confirm the MCP**: confirm the HAP application MCP provided or specified by the user
2. **Read the account persona**: read the account persona configuration for the relevant platform from the HAP "Account Persona" table
3. **Obtain the image style**: extract `image_generation_prompt` from the account persona
4. **Dynamically read the configurations**: query all image generation configurations from the HAP "API Service Configuration" table
5. **Select the configuration**:
- Prioritize `is_default = 1`
- If no default configuration exists, use the first enabled configuration
6. **Extract the credentials**: read the appropriate credential fields based on the service provider
- TUZI API: `api_key`, `endpoint_url`
- Volcengine Jimeng: `access_key_id`, `secret_access_key`, `region`, `service`, and other fields
7. **Generate the prompt**: combine the account persona's image style prompt with the specific image suggestion to create a complete image generation prompt
- Format: `{image_generation_prompt}, {specific image content description}`
- Example: `hand-drawn illustration style, fresh and lively cartoon illustration style, {specific image content}`
8. **Call the API to generate images**:
- **TUZI API**: use the OpenAI SDK and support multiple models, including gemini-3-pro-image-preview, dall-e-3, and dall-e-2
- **The `response_format="url"` parameter must be used** to ensure the API returns a URL rather than base64
- **Request parameters**: `model`, `prompt`, `n=1`, `response_format="url"`, and `size="{width}x{height}"`
- **Volcengine Jimeng**: use the Volcengine SDK
- **Parallel generation**: use a thread pool to generate multiple images in parallel, with up to 3 concurrent requests, to significantly improve generation speed
- **Automatically skip existing files**: check whether the local file already exists and skip generation if it does, saving time and cost
9. **Process the API response**:
- **Prioritize URLs**: if the API returns an HTTP/HTTPS URL, use it directly
- **Handle base64 data**: if the API returns base64 data, either as a data URI or a base64 string, automatically decode and save it as an image file
- **Error handling**: if the API returns invalid data, log the error and continue generating the other images
10. **Save the images**:
- **Save the image URLs**: save the URLs to `配图/image_urls.json`; do not save base64 data
- **Automatically download the images**: download the image files from the URLs to `配图/{image_name}.png` for convenient local viewing and display
- **Image file naming**: names such as `封面图.png`, `对比图.png`, `流程图.png`, and `应用场景图.png`
- **Download failure handling**: if a download fails, retain the URL and log a warning without interrupting the remaining workflow
11. **Upload to HAP**:
- **Xiaohongshu notes**: upload only the image URLs, including the cover image and other images, to the HAP attachment fields; do not upload the Markdown document
- **Other platforms**: upload images and documents according to platform requirements
- **Use URLs when uploading**: upload image URLs to HAP; base64 data is not required
**Image format requirements for Xiaohongshu:**
- **Dimensions**: 768x1024, the vertical 3:4 Xiaohongshu format
- **Style**: hand-drawn illustration in a fresh and lively cartoon style
- **Content requirements**: image content must be strongly related to the body content and communicate its core meaning, such as a process, introduction, or comparison
**Image types (must follow the account persona):**
- **Cover image**: combine the account persona's image style prompt, specific content description, and **cover title text**
- The cover image must contain the cover title, using a bold decorative font with strokes and gradient effects
- The title must be prominent, occupy an important position on the cover, and comply with Xiaohongshu cover design standards
- **Comparison image**: combine the account persona's image style prompt with a comparison description strongly related to the content
- **Flowchart**: combine the account persona's image style prompt with a process description strongly related to the content
- **Use-case image**: combine the account persona's image style prompt with a use-case description strongly related to the content
**Hand-drawn illustration characteristics (reference):**
- **Overall style**: a fresh and lively cartoon illustration style full of positive energy and vitality
- **Lines**: thick black outlines, a hand-drawn texture, and smooth, natural strokes
- **Colors**: bright, saturated colors such as orange, yellow, blue, green, and red, with harmonious warm-tone combinations
- **Rendering**: primarily flat design, enhanced with simple gradients and highlights to add depth
- **Typography**: bold decorative fonts with strokes and gradient effects
- **Atmosphere**: positive, energetic, technology-oriented, warm, and cute
- **Design philosophy**: concise and lively, with strong visual impact and suitability for digital media distribution
**Important**:
- Image suggestions must be generated by combining the account persona's `image_generation_prompt`
- Image content must be strongly related to the body content and communicate its core meaning, such as a process, introduction, or comparison
- The cover image must contain the cover title text
- Image formats must comply with platform requirements, such as 768x1024 and 3:4 for Xiaohongshu
**Image prompt generation rules:**
1. Read `image_generation_prompt` from the HAP "Account Persona" table
2. Combine the style prompt with the specific image content description
3. **Format**: `{image_generation_prompt}, {specific image content description that is strongly related to the content}`
4. **Special cover image requirements**: the cover image must contain the cover title text
- Format: `{image_generation_prompt}, cover image content: {specific content description}, title text: "{cover title}", using a bold decorative font with strokes and gradient effects`
5. **Example (cover image)**:
- Account persona style: `Create a hand-drawn illustration with the following characteristics: overall style: a fresh and lively cartoon illustration style full of positive energy and vitality...`
- Specific image content: `Show the core concept of what agentic is, with a cute brain icon in the center and multiple small robots or execution arrows around it to represent autonomous planning and execution capabilities`
- Cover title: `Understand agentic AI in 3 minutes!`
- Final prompt: `{image_generation_prompt}, cover image content: Show the core concept of what agentic is, with a cute brain icon in the center and multiple small robots or execution arrows around it to represent autonomous planning and execution capabilities. A prominent decorative title reading "Understand agentic AI in 3 minutes!" appears at the top, using a bold decorative font with strokes and gradient effects to enhance visual impact. The title must be prominent, occupy an important position on the cover, and comply with Xiaohongshu cover design standards.`
6. **Example (comparison image)**:
- Account persona style: `Create a hand-drawn illustration with the following characteristics...`
- Specific image content: `Use a left-right split-screen comparison. The left side shows traditional AI as a simple question-answering machine that can only respond passively, with question marks. The right side shows agentic AI as an intelligent assistant autonomously planning tasks and executing actions, with execution arrows and task cards. Connect the two sides with a thick arrow to represent the transition from passive response to proactive execution. The overall image should be clear and easy to understand, with a distinct color contrast.`
- Final prompt: `{image_generation_prompt}, {specific image content description}`5. HAP 数据管理
5. HAP Data Management
工作表结构
Worksheet Structure
内容管理表(通用表,支持多平台):
- : 平台类型(SingleSelect: 小红书/抖音/微信公众号/视频号/其他)
platform_type - : 内容标题(Text,标题字段)
content_title - : 封面标题(Text)
cover_title - : 正文内容(Text)
content - : 话题标签(Text)
tags - : 封面图(Attachment)
cover_image - : 其他配图(Attachment)
other_images - : Markdown 文档(Attachment,小红书笔记不使用此字段)
markdown_doc - : 关联选题(Relation,关联选题库表,单选,双向关联)
related_topic - : 发布状态(SingleSelect: 草稿/待发布/已发布/已取消)
publish_status - : 发布时间(DateTime)
publish_time - : 内容链接(Text,不同平台可能叫法不同)
note_url - : 浏览量(Number)
views - : 点赞数(Number)
likes - : 收藏数(Number)
collections - : 评论数(Number)
comments
重要说明:
- 小红书笔记不同步 Markdown 文档:同步小红书笔记到 HAP 时,只上传图片(封面图和其他配图),不上传 Markdown 文档
- 字段仅用于其他平台(如微信公众号),小红书笔记不使用此字段
markdown_doc - 双向关联选题库:
- 如果内容是基于选题库中的选题创作的,需要在内容记录中关联对应的选题
- 如果内容不是基于选题创作的,可以不关联
- 选题库中的 字段会自动关联已创作的内容
related_content
设计说明:
- 使用统一的"内容管理"表管理所有平台的内容
- 通过 字段区分不同平台
platform_type - 不同平台共享通用字段,特殊需求可通过备注或扩展字段处理
话题标签库表:
- : 话题名称(Text)
topic_name - : 话题类型(SingleSelect)
topic_type - : 热度等级(SingleSelect: 高热度/中热度/低热度)
heat_level - : 说明(Text)
description - : 最后更新(DateTime)
last_updated
选题库表:
- : 选题标题(Text,标题字段)
topic_title - : 来源平台(Relation,关联热点平台关注表,单选)
source_platform - : 选题角度(Text,如何结合账号人设)
topic_angle - : 推荐理由(Text)
recommendation_reason - : 相关度评分(Number,1-10分)
relevance_score - : 原文链接(Text)
source_url - : 内容预览(Text,多行文本)
content_preview - : 选题状态(SingleSelect: 待创作/创作中/已创作/已取消)
topic_status - : 关联内容(Relation,关联内容管理表,多选,双向关联)
related_content - : 备注(Text,多行文本)
notes
设计说明:
- 选题库用于存储推荐的选题,方便后续管理和创作
- 关联热点平台关注表,可以追溯选题来源
- 双向关联内容管理表:
- 选题库中的 字段可以关联多个已创作的内容
related_content - 内容管理表中的 字段可以关联对应的选题
related_topic - 如果内容是基于选题创作的,需要在创建内容时关联选题
- 如果内容不是基于选题创作的,可以不关联
- 选题库中的
- 选题状态用于跟踪选题的创作进度
账号人设表:
- : 平台名称(Text,标题字段)
platform_name - : 平台类型(SingleSelect: 小红书/抖音/微信公众号/视频号)
platform_type - : 账号定位(Text)
positioning - : 目标受众(Text)
target_audience - : 内容方向(Text)
content_direction - : 内容风格(Text)
content_style - : 内容原则(Text)
content_principles - : 图片生成提示词(Text)
image_generation_prompt- 用途:用于生成图片的风格提示词,可以设置图片的整体风格、色彩、构图等
- 使用方式:生成图片时,将此提示词与具体图片内容描述结合
- 示例:简洁科技风格,蓝紫色渐变背景,现代扁平设计,高质量,专业感
热点平台关注表:
- : 平台名称(Text,标题字段,如:"百度热搜"、"微博热搜")
platform_name - : 平台代码(Text,如:"baidu"、"weibo",对应热点新闻 API 的平台代码)
platform_code - : 平台类型(SingleSelect: 综合新闻/科技/社交媒体/财经/技术社区/其他)
platform_type - : 是否关注(Checkbox)- 用户是否关注此平台的热点
is_followed - : 优先级(Number,1-10,数字越大优先级越高)
priority - : 平台说明(Text,描述平台特点和内容类型)
description - : 最后获取时间(DateTime,记录最后一次获取该平台热点的时间)
last_fetch_time
支持的平台代码(对应热点新闻 API):
- : 百度热搜(社会热点、娱乐、事件)
baidu - : 少数派(科技、数码、生活方式)
sspai - : 微博热搜(社交媒体热点、娱乐、事件)
weibo - : 知乎热榜(问答、深度内容、社会热点)
zhihu - : 36氪(科技创业、商业资讯)
tskr - : 吾爱破解(技术、软件、安全)
ftpojie - : 哔哩哔哩(视频、动漫、游戏、生活)
bilibili - : 豆瓣(书影音、文化、讨论)
douban - : 虎扑(体育、游戏、数码)
hupu - : 百度贴吧(兴趣社区、话题讨论)
tieba - : 掘金(编程、技术文章)
juejin - : 抖音(短视频热点、娱乐)
douyin - : V2EX(技术、编程、创意)
vtex - : 今日头条(新闻、热点事件)
jinritoutiao - : Stack Overflow(编程问答、技术讨论)
stackoverflow - : GitHub Trending(开源项目、编程语言)
github - : Hacker News(科技新闻、创业、编程)
hackernews - : 新浪财经(财经新闻、股市资讯)
sina_finance - : 东方财富(财经资讯、投资理财)
eastmoney - : 雪球(股票投资、财经社区)
xueqiu - : 财联社(财经快讯、市场动态)
cls - : 腾讯网(综合新闻、娱乐、科技)
tenxunwang
API服务配置表:
- : 功能名称(Text,标题字段,如:"Tavily 搜索API"、"TUZI 图片生成"、"即梦图片生成"、"热点新闻API")
function_name - : 服务提供商(Text,如:"Tavily"、"TUZI"、"火山引擎"、"orz.ai")
provider - : 服务类型(SingleSelect: 搜索API/图片生成/内容生成/数据分析/热点新闻/其他)
service_type - : 用途说明(Text,如:"用于搜索主题相关资料"、"用于生成图片"、"用于获取热点新闻")
purpose - : 是否默认(Checkbox) - 用于控制使用哪个图片生成 API 配置
is_default- 用途:当存在多个图片生成 API 配置时,优先使用标记为"默认"的配置
- 使用方式:勾选表示默认使用此配置,不勾选表示非默认配置
- 选择逻辑:优先选择 (是默认)的配置,如果没有默认配置则使用第一个启用的配置
is_default = 1
- : Endpoint URL(Text,必需) - API 基础地址
endpoint_url- 热点新闻 API:
https://orz.ai/api/v1/dailynews
- 热点新闻 API:
密钥字段(用户可填写):
- : API Key(Text,必需) - 用于 API 认证
api_key- 何时填写:
- 搜索 API(Tavily、Serper 等):必须填写
- OpenAI、Anthropic、Midjourney 等使用 API Key 认证的服务:必须填写
- 何时填写:
- : Endpoint URL(Text,必需) - API 基础地址
endpoint_url- 何时填写:所有 API 服务都必须填写,用于指定 API 的访问地址
- 格式示例:
- Tavily:
https://api.tavily.com - OpenAI:
https://api.openai.com/v1 - 自定义代理:
https://proxy.example.com
- Tavily:
- : Access Key ID(Text)
access_key_id- 何时填写:火山引擎、阿里云、腾讯云等使用 Access Key 认证的服务需要填写
- : Secret Access Key(Text)
secret_access_key- 何时填写:与 Access Key ID 配对使用,火山引擎、阿里云、腾讯云等需要填写
- : API Secret(Text)
api_secret- 何时填写:与 API Key 配对使用,部分服务需要填写
- : Token(Text)
token- 何时填写:GitHub、GitLab、JWT Token 认证的服务需要填写
- : App ID(Text)
app_id- 何时填写:微信、企业微信、钉钉等使用 App ID 认证的服务需要填写
- : App Secret(Text)
app_secret- 何时填写:与 App ID 配对使用,微信、企业微信、钉钉等需要填写
配置字段:
- : Endpoint URL(Text,必需) - API 基础地址
endpoint_url- 何时填写:所有 API 服务都必须填写
- 格式示例:
- Tavily 搜索 API:
https://api.tavily.com - OpenAI API:
https://api.openai.com/v1 - 火山引擎即梦:
https://ark.cn-beijing.volces.com/api/v3 - 自定义代理:
https://proxy.example.com
- Tavily 搜索 API:
- : Region(Text)
region- 何时填写:AWS、阿里云、腾讯云、火山引擎等需要指定区域的服务需要填写(如:cn-beijing、us-east-1)
- : Service(Text)
service- 何时填写:火山引擎等需要指定服务名称的需要填写(如:cv、ocr)
- : API版本(Text)
api_version- 何时填写:需要指定 API 版本的服务需要填写(如:jimeng_t2i_v31、v1、v2)
- : SDK名称(Text)
sdk_name- 何时填写:使用 Python SDK 时需要填写 SDK 包名(如:volcenginesdkcv20240606、openai)
- : 其他配置(Text)
extra_config- 何时填写:需要额外配置参数时填写,JSON 格式(如:{"timeout": 30, "max_retries": 3})
- : 配置状态(SingleSelect: 启用/禁用)
config_status - : 备注(Text)
notes
使用说明:
- 所有 API 服务都必须填写 (API 基础地址)
endpoint_url - 根据不同的 API 服务类型,填写对应的密钥字段:
- Tavily 搜索API:必须填写 和
api_keyendpoint_url - 火山引擎即梦:使用 、
access_key_id和secret_access_keyendpoint_url - OpenAI/Anthropic:必须填写 和
api_keyendpoint_url - 微信/企业微信:使用 、
app_id和app_secretendpoint_url
- Tavily 搜索API:必须填写
- 所有密钥字段均为可见,用户可以直接在 HAP 中填写和编辑
- 格式:完整的 API 基础地址,如
endpoint_url或https://api.tavily.comhttps://api.openai.com/v1
功能配置示例:
-
Tavily 搜索API:用于搜索主题相关资料
- 服务提供商:Tavily
- 服务类型:搜索API(从下拉列表选择)
- API Key:tvly-dev-xxx...(必需填写,Tavily API Key)
- Endpoint URL:https://api.tavily.com(**必需填写**,API 基础地址)
- 用途说明:在生成内容前搜索最新资料,提升内容质量
- 配置状态:启用(从下拉列表选择)
-
TUZI 图片生成:用于生成图片(OpenAI 兼容接口)
- 服务提供商:TUZI
- 服务类型:图片生成(从下拉列表选择)
- API Key:sk-xxx...(必需填写,TUZI API Key)
- Endpoint URL:https://api.tu-zi.com/v1(**必需填写**,API 基础地址)
- 是否默认:是(复选框,勾选表示默认使用此配置)
- 配置状态:启用(从下拉列表选择)
- 备注:使用 OpenAI 兼容接口,支持多个模型(gemini-3-pro-image-preview、dall-e-3、dall-e-2)
-
即梦图片生成:用于生成图片(文生图3.1)
- 服务提供商:火山引擎
- 服务类型:图片生成(从下拉列表选择)
- Endpoint URL:https://ark.cn-beijing.volces.com/api/v3(可选,API 基础地址)
- Access Key ID:用于 API 认证(用户填写)
- Secret Access Key:用于 API 签名(用户填写)
- Region:cn-beijing(用户填写)
- Service:cv(用户填写)
- API版本:jimeng_t2i_v31(用户填写)
- SDK名称:volcenginesdkcv20240606(用户填写)
- 是否默认:否(复选框,不勾选表示非默认配置)
- 配置状态:启用(从下拉列表选择)
重要:
- 所有配置信息都由用户在 HAP "API服务配置" 表中填写
- Skill 只负责从表中读取,不包含任何默认值或硬编码配置
- 用户需要根据实际使用的 API 服务填写对应的配置字段
Content Management table, a shared table supporting multiple platforms:
- : platform type (SingleSelect: 小红书/抖音/微信公众号/视频号/其他)
platform_type - : content title (Text, title field)
content_title - : cover title (Text)
cover_title - : body content (Text)
content - : hashtags (Text)
tags - : cover image (Attachment)
cover_image - : additional images (Attachment)
other_images - : Markdown document (Attachment, not used for Xiaohongshu notes)
markdown_doc - : related topic (Relation, linked to the Topic Idea Library table, single-select, bidirectional relation)
related_topic - : publishing status (SingleSelect: 草稿/待发布/已发布/已取消)
publish_status - : publishing time (DateTime)
publish_time - : content URL (Text; the field name may vary by platform)
note_url - : views (Number)
views - : likes (Number)
likes - : saves (Number)
collections - : comments (Number)
comments
Important notes:
- Do not synchronize Markdown documents for Xiaohongshu notes: when synchronizing a Xiaohongshu note to HAP, upload only the cover image and other image URLs; do not upload the Markdown document
- The field is used only for other platforms, such as WeChat Official Accounts, and is not used for Xiaohongshu notes
markdown_doc - Bidirectional relation with the Topic Idea Library:
- If content is created from a topic in the Topic Idea Library, associate it with the corresponding topic in the content record
- If content is not created from a topic, an association is optional
- The field in the Topic Idea Library automatically links to created content
related_content
Design notes:
- Use a shared "Content Management" table for content from all platforms
- Distinguish platforms through the field
platform_type - All platforms share common fields, while special requirements can be handled through notes or extension fields
Hashtag Library table:
- : hashtag name (Text)
topic_name - : hashtag type (SingleSelect)
topic_type - : heat level (SingleSelect: High/Medium/Low)
heat_level - : description (Text)
description - : last updated (DateTime)
last_updated
Topic Idea Library table:
- : topic title (Text, title field)
topic_title - : source platform (Relation, linked to the Trending Platform Follow List table, single-select)
source_platform - : topic angle (Text, explaining how to combine the topic with the account persona)
topic_angle - : recommendation reason (Text)
recommendation_reason - : relevance score (Number, 1–10)
relevance_score - : original article URL (Text)
source_url - : content preview (Text, multiline text)
content_preview - : topic status (SingleSelect: 待创作/创作中/已创作/已取消)
topic_status - : related content (Relation, linked to the Content Management table, multi-select, bidirectional relation)
related_content - : notes (Text, multiline text)
notes
Design notes:
- The Topic Idea Library stores recommended topics to simplify subsequent management and creation
- Its relation to the Trending Platform Follow List table makes topic sources traceable
- Bidirectional relation with the Content Management table:
- The field in the Topic Idea Library can link to multiple created content records
related_content - The field in the Content Management table can link to the corresponding topic
related_topic - When content is created from a topic, associate it with the topic when creating the content
- When content is not created from a topic, an association is optional
- The
- Topic status tracks the content creation progress
Account Persona table:
- : platform name (Text, title field)
platform_name - : platform type (SingleSelect: 小红书/抖音/微信公众号/视频号)
platform_type - : account positioning (Text)
positioning - : target audience (Text)
target_audience - : content direction (Text)
content_direction - : content style (Text)
content_style - : content principles (Text)
content_principles - : image generation prompt (Text)
image_generation_prompt- Purpose: defines the overall image style, colors, composition, and other visual requirements
- How to use it: combine this prompt with a specific image content description when generating an image
- Example: minimalist technology style, blue-purple gradient background, modern flat design, high quality, professional appearance
Trending Platform Follow List table:
- : platform name (Text, title field), such as "Baidu Hot Search" or "Weibo Hot Search"
platform_name - : platform code (Text), such as
platform_codeorbaidu, corresponding to a code supported by the Trending News APIweibo - : platform type (SingleSelect: General News/Technology/Social Media/Finance/Developer Community/Other)
platform_type - : followed (Checkbox), indicating whether the user follows this platform's trending topics
is_followed - : priority (Number, 1–10; a larger number means a higher priority)
priority - : platform description (Text), describing the platform's characteristics and content types
description - : last retrieval time (DateTime), recording when this platform's trending topics were last retrieved
last_fetch_time
Supported platform codes for the Trending News API:
- : Baidu Hot Search, covering social, entertainment, and event trends
baidu - : SSPAI, covering technology, digital products, and lifestyle
sspai - : Weibo Hot Search, covering social media, entertainment, and event trends
weibo - : Zhihu Hot List, covering questions and answers, in-depth content, and social trends
zhihu - : 36Kr, covering technology, startups, and business information
tskr - :吾爱破解, covering technology, software, and security
ftpojie - : Bilibili, covering videos, animation, games, and lifestyle
bilibili - : Douban, covering books, films, music, and cultural discussion
douban - : Hupu, covering sports, games, and digital products
hupu - : Baidu Tieba, covering interest communities and topic discussions
tieba - : Juejin, covering programming and technical articles
juejin - : Douyin, covering short-video trends and entertainment
douyin - : V2EX, covering programming, technology, and creativity
vtex - : Jinri Toutiao, covering news and trending events
jinritoutiao - : Stack Overflow, covering programming questions and technical discussions
stackoverflow - : GitHub Trending, covering open-source projects and programming languages
github - : Hacker News, covering technology news, startups, and programming
hackernews - : Sina Finance, covering financial news and stock-market information
sina_finance - : Eastmoney, covering financial information and investment guidance
eastmoney - : Xueqiu, covering stock investment and financial community content
xueqiu - : CLS, covering financial news flashes and market updates
cls - : Tencent News, covering general news, entertainment, and technology
tenxunwang
API Service Configuration table:
- : function name (Text, title field), such as "Tavily Search API", "TUZI Image Generation", "Jimeng Image Generation", or "Trending News API"
function_name - : service provider (Text), such as "Tavily", "TUZI", "火山引擎", or "orz.ai"
provider - : service type (SingleSelect: 搜索API/图片生成/内容生成/数据分析/热点新闻/其他)
service_type - : purpose (Text), such as "search for material related to a topic", "generate images", or "retrieve trending news"
purpose - : default (Checkbox) — controls which image generation API configuration is used
is_default- Purpose: when multiple image generation API configurations exist, prioritize the configuration marked as the default
- How to use it: check the box to use the configuration by default; leave it unchecked for a nondefault configuration
- Selection logic: prioritize ; if no default configuration exists, use the first enabled configuration
is_default = 1
- : Endpoint URL (Text, required) — API base URL
endpoint_url- Trending News API:
https://orz.ai/api/v1/dailynews
- Trending News API:
Credential fields that users can provide:
- : API Key (Text, required) — used for API authentication
api_key- When to enter it:
- Search APIs, such as Tavily and Serper, must provide this field
- Services authenticated with an API Key, including OpenAI, Anthropic, and Midjourney, must provide this field
- When to enter it:
- : Endpoint URL (Text, required) — API base URL
endpoint_url- When to enter it: every API service must provide this field to specify the API endpoint
- Example formats:
- Tavily:
https://api.tavily.com - OpenAI:
https://api.openai.com/v1 - Custom proxy:
https://proxy.example.com
- Tavily:
- : Access Key ID (Text)
access_key_id- When to enter it: services such as 火山引擎, Alibaba Cloud, and Tencent Cloud that use Access Key authentication require this field
- : Secret Access Key (Text)
secret_access_key- When to enter it: used together with the Access Key ID for services such as 火山引擎, Alibaba Cloud, and Tencent Cloud
- : API Secret (Text)
api_secret- When to enter it: used together with an API Key by some services
- : Token (Text)
token- When to enter it: required for services such as GitHub, GitLab, and JWT Token authentication
- : App ID (Text)
app_id- When to enter it: required for services such as WeChat, WeCom, and DingTalk that use App ID authentication
- : App Secret (Text)
app_secret- When to enter it: used together with the App ID for services such as WeChat, WeCom, and DingTalk
Configuration fields:
- : Endpoint URL (Text, required) — API base URL
endpoint_url- When to enter it: every API service must provide this field to specify the API endpoint
- Example formats:
- Tavily Search API:
https://api.tavily.com - OpenAI API:
https://api.openai.com/v1 - Volcengine Jimeng:
https://ark.cn-beijing.volces.com/api/v3 - Custom proxy:
https://proxy.example.com
- Tavily Search API:
- : Region (Text)
region- When to enter it: required for services that specify a region, including AWS, Alibaba Cloud, Tencent Cloud, and 火山引擎, such as cn-beijing or us-east-1
- : Service (Text)
service- When to enter it: required for services that specify a service name, such as 火山引擎, for example cv or ocr
- : API version (Text)
api_version- When to enter it: required when a specific API version must be used, such as jimeng_t2i_v31, v1, or v2
- : SDK name (Text)
sdk_name- When to enter it: required when using a Python SDK, such as volcenginesdkcv20240606 or openai
- : additional configuration (Text)
extra_config- When to enter it: required when additional parameters are needed, in JSON format, such as
{"timeout": 30, "max_retries": 3}
- When to enter it: required when additional parameters are needed, in JSON format, such as
- : configuration status (SingleSelect: Enabled/Disabled)
config_status - : notes (Text)
notes
Usage notes:
- Every API service must provide , the API base URL
endpoint_url - Provide the appropriate credential fields according to the API service type:
- Tavily Search API: and
api_keyare requiredendpoint_url - Volcengine Jimeng: use ,
access_key_id, andsecret_access_keyendpoint_url - OpenAI/Anthropic: and
api_keyare requiredendpoint_url - WeChat/WeCom: use ,
app_id, andapp_secretendpoint_url
- Tavily Search API:
- All credential fields are visible so users can enter and edit them directly in HAP
- The format must be a complete API base URL, such as
endpoint_urlorhttps://api.tavily.comhttps://api.openai.com/v1
Example functional configurations:
-
Tavily Search API: used to search for material related to a topic
- Service provider: Tavily
- Service type: Search API, selected from the dropdown list
- API Key: (required, Tavily API Key)
tvly-dev-xxx... - Endpoint URL: (required, API base URL)
https://api.tavily.com - Purpose: search for the latest material before content generation and improve content quality
- Configuration status: Enabled, selected from the dropdown list
-
TUZI Image Generation: used to generate images through an OpenAI-compatible interface
- Service provider: TUZI
- Service type: Image Generation, selected from the dropdown list
- API Key: (required, TUZI API Key)
sk-xxx... - Endpoint URL: (required, API base URL)
https://api.tu-zi.com/v1 - Default: Yes, with the checkbox indicating that this configuration is used by default
- Configuration status: Enabled, selected from the dropdown list
- Notes: uses an OpenAI-compatible interface and supports gemini-3-pro-image-preview, dall-e-3, and dall-e-2
-
Jimeng Image Generation: used to generate images with text-to-image 3.1
- Service provider: 火山引擎
- Service type: Image Generation, selected from the dropdown list
- Endpoint URL: (optional, API base URL)
https://ark.cn-beijing.volces.com/api/v3 - Access Key ID: used for API authentication and provided by the user
- Secret Access Key: used for API signing and provided by the user
- Region: cn-beijing, provided by the user
- Service: cv, provided by the user
- API version: jimeng_t2i_v31, provided by the user
- SDK name: volcenginesdkcv20240606, provided by the user
- Default: No, with the checkbox left unchecked
- Configuration status: Enabled, selected from the dropdown list
Important:
- All configuration information is entered by the user in the HAP "API Service Configuration" table
- The Skill only reads the table and contains no default values or hard-coded configuration
- The user must provide the appropriate configuration fields for each API service used
数据同步流程
Data Synchronization Flow
1. 搜索资料(Tavily API)→ 获取最新信息
2. 生成内容 → 保存到本地文件(预览,按笔记目录结构:`内容/{平台}/{笔记标题}/{笔记标题}.md`)
3. 与用户确认内容、标题、图片
4. 用户确认后生成图片 → 保存到笔记目录的配图文件夹(`内容/{平台}/{笔记标题}/配图/`)
5. 与用户确认是否发布和同步
6. 用户确认后同步到 HAP:
- **小红书笔记**:只上传图片 URL(封面图和其他配图),不上传 Markdown 文档
- **其他平台**:根据平台需求上传图片和文档
7. 用户确认后发布 → 使用 Playwright 发布到目标平台
8. 发布成功 → 更新发布状态和笔记链接
目录结构说明:
- `内容/`:根目录
- `内容/{平台}/`:平台目录(小红书/抖音/微信公众号/视频号)
- `内容/{平台}/{笔记标题}/`:笔记目录,使用封面标题作为目录名
- `内容/{平台}/{笔记标题}/{笔记标题}.md`:Markdown 文档(仅本地保存,小红书不同步到 HAP)
- `内容/{平台}/{笔记标题}/配图/`:配图文件夹
重要说明:
- **小红书笔记的 Markdown 文档不同步到 HAP**,只同步图片 URL
- Markdown 文档仅保存在本地,用于预览和编辑
- 图片生成后:
1. 保存图片 URL 到 `配图/image_urls.json`
2. **下载图片到本地**:保存图片文件到 `配图/{图片名称}.png`(如:封面图.png、对比图.png),方便本地查看和展示
3. 通过 MCP 上传 URL 到 HAP(上传时使用 URL,不需要 base64)1. Search for material through the Tavily API → obtain the latest information
2. Generate content → save it to a local file for preview, using the note directory structure: 内容/{platform}/{note_title}/{note_title}.md
3. Confirm the content, titles, and images with the user
4. After user confirmation, generate images → save them in the note's image directory: 内容/{platform}/{note_title}/配图/
5. Confirm whether to publish and synchronize
6. After user confirmation, synchronize to HAP:
- **Xiaohongshu notes**: upload only the image URLs, including the cover image and other images; do not upload the Markdown document
- **Other platforms**: upload images and documents according to platform requirements
7. After user confirmation, publish → use Playwright to publish to the target platform
8. After successful publication → update the publishing status and note URL
Directory structure notes:
- 内容/: root directory
- 内容/{platform}/: platform directory, including 小红书/抖音/微信公众号/视频号
- 内容/{platform}/{note_title}/: note directory, using the cover title as the directory name
- 内容/{platform}/{note_title}/{note_title}.md: Markdown document, stored locally only and not synchronized to HAP for Xiaohongshu
- 内容/{platform}/{note_title}/配图/: image directory
Important notes:
- **Markdown documents for Xiaohongshu notes are not synchronized to HAP**; only image URLs are synchronized
- Markdown documents are stored locally only for previewing and editing
- After image generation:
1. Save the image URLs to 配图/image_urls.json
2. **Download the images locally**: save the image files to 配图/{image_name}.png, such as 封面图.png or 对比图.png, for convenient local viewing and display
3. Upload the URLs to HAP through MCP; use the URLs rather than base64 data when uploading6. 自动化发布
6. Automated Publishing
使用 Playwright MCP
Use Playwright MCP
发布前准备:
- 确认用户已登录目标平台
- 检查内容完整性(标题、正文、图片、标签)
- 验证 HAP 数据已同步
发布流程(小红书示例):
javascript
// 1. 导航到发布页面
await page.goto('https://creator.xiaohongshu.com/publish/publish?type=image_text');
// 2. 上传图片
const fileInput = await page.locator('input[type="file"]').first();
await fileInput.setInputFiles(imageFiles);
// 3. 填写标题
await page.getByRole('textbox', { name: '填写标题会有更多赞哦~' }).fill(title);
// 4. 填写正文(包含话题标签)
await page.getByRole('textbox').nth(1).fill(content + '\n\n' + tags);
// 5. 点击发布
await page.getByRole('button', { name: '发布' }).click();
// 6. 等待发布成功,获取笔记链接
// 7. 更新 HAP 记录:发布状态、发布时间、笔记链接发布后处理:
- 获取发布成功的内容链接
- 更新 HAP "内容管理" 表记录:
- : 目标平台(小红书/抖音/微信公众号/视频号)
platform_type - : 已发布
publish_status - : 当前时间
publish_time - : 内容链接
note_url
Preparation before publishing:
- Confirm that the user has logged in to the target platform
- Check content completeness, including the title, body, images, and hashtags
- Verify that the HAP data has been synchronized
Publishing flow (Xiaohongshu example):
javascript
// 1. Navigate to the publishing page
await page.goto('https://creator.xiaohongshu.com/publish/publish?type=image_text');
// 2. Upload the images
const fileInput = await page.locator('input[type="file"]').first();
await fileInput.setInputFiles(imageFiles);
// 3. Enter the title
await page.getByRole('textbox', { name: '填写标题会有更多赞哦~' }).fill(title);
// 4. Enter the body, including hashtags
await page.getByRole('textbox').nth(1).fill(content + '\n\n' + tags);
// 5. Click Publish
await page.getByRole('button', { name: '发布' }).click();
// 6. Wait for successful publication and obtain the note URL
// 7. Update the HAP record: publishing status, publishing time, and note URLPost-publication processing:
- Obtain the URL of the successfully published content
- Update the corresponding record in the HAP "Content Management" table:
- : target platform (小红书/抖音/微信公众号/视频号)
platform_type - : Published
publish_status - : current time
publish_time - : content URL
note_url
使用示例
Usage Examples
示例 1: 生成并发布小红书笔记
Example 1: Generate and Publish a Xiaohongshu Note
用户:帮我生成一篇关于 "Skills 科普介绍" 的小红书笔记并发布
执行流程:
1. **确认 MCP**:确认当前连接的 HAP 应用 MCP(通过用户提供或指定)
2. **读取搜索配置**:从 HAP "API服务配置" 表读取 Tavily 搜索 API 配置
3. **搜索资料**:调用 Tavily API 搜索主题相关资料(获取最新 5 条结果)
4. **【强制要求】读取账号人设**(必须在生成内容之前执行):从 HAP "账号人设" 表读取账号人设配置
- **禁止使用本地文件**:绝对不允许使用 `AGENTS.md` 或其他本地文件
- **必须调用 HAP MCP**:必须通过 MCP 调用 `get_record_list()` 从 HAP "账号人设" 表读取
- **读取所有必需字段**:
- **账号定位**(positioning):了解账号的核心定位
- **目标受众**(target_audience):了解内容面向的受众群体
- **内容方向**(content_direction):了解内容的主要方向
- **内容风格**(content_style):了解内容应该采用的风格(必须严格遵循)
- **内容原则**(content_principles):了解内容创作的原则和注意事项(必须严格遵守)
- **图片生成提示词**(image_generation_prompt):了解图片风格要求
- **验证要求**:如果未找到账号人设配置,必须抛出异常,不允许继续生成内容
5. **撰写内容**:根据搜索结果和从 HAP 读取的账号人设撰写内容
- **严格遵循账号人设**:必须严格按照从 HAP 读取的 `content_style` 和 `content_principles` 来撰写
- **禁止使用本地人设**:不允许参考或使用本地 `AGENTS.md` 文件中的内容
- **结合搜索资料**:将搜索到的资料与从 HAP 读取的账号人设结合,生成符合定位的内容
- **符合目标受众**:确保内容适合目标受众阅读
6. **生成封面标题**:根据账号人设的内容风格生成 5-10 个封面标题
- 标题风格必须符合账号人设的内容风格
- 标题要符合账号定位和目标受众
7. **选择话题标签**:从 HAP 话题库选择 5-8 个话题标签(动态查询)
- 根据内容主题和账号人设的内容方向选择
8. **生成配图建议**:结合账号人设的图片生成提示词风格,生成配图建议
9. **保存预览**:保存到本地文件(按笔记目录结构:`内容/小红书/{笔记标题}/{笔记标题}.md`)
10. **与用户确认**:与用户确认内容、标题、图片
11. **生成图片**(用户确认后):从 HAP "账号人设" 表读取图片生成提示词,从 HAP "API服务配置" 表读取图片生成配置,生成图片
12. **与用户确认发布**:与用户确认是否直接发布至小红书
13. **与用户确认同步**:与用户确认是否同步到 HAP,确认后才上传
14. **同步 HAP**(用户确认后):同步到 HAP "内容管理" 表(platform_type = 小红书)
- **只上传图片**:上传封面图和其他配图的 URL 到 HAP
- **不上传 Markdown 文档**:小红书笔记的 Markdown 文档不同步到 HAP
15. **发布内容**(用户确认后):使用 Playwright 发布到小红书
16. **更新状态**:更新 HAP 发布状态和内容链接User: Generate a Xiaohongshu note about "An introduction to Skills" and publish it
Execution flow:
1. **Confirm the MCP**: confirm the currently connected HAP application MCP through the user-provided or user-specified configuration
2. **Read the search configuration**: read the Tavily search API configuration from the HAP "API Service Configuration" table
3. **Search for material**: call the Tavily API to retrieve the 5 latest results related to the topic
4. **【MANDATORY】Read the account persona** before generating content: read the account persona configuration from the HAP "Account Persona" table
- **Local files are prohibited**: never use AGENTS.md or any other local file
- **HAP MCP must be called**: use MCP to call get_record_list() to read from the HAP "Account Persona" table
- **Read all required fields**:
- **Account positioning** (positioning): understand the account's core positioning
- **Target audience** (target_audience): understand the audience for whom the content is intended
- **Content direction** (content_direction): understand the account's main content areas
- **Content style** (content_style): understand the style to use; it must be strictly followed
- **Content principles** (content_principles): understand the principles and considerations for content creation; they must be strictly observed
- **Image generation prompt** (image_generation_prompt): understand the image style requirements
- **Validation requirement**: if no account persona configuration is found, throw an exception and do not continue content generation
5. **Write the content**: write the content based on the search results and the account persona read from HAP
- **Strictly follow the account persona**: write strictly according to content_style and content_principles read from HAP
- **Local personas are prohibited**: do not reference or use content from the local AGENTS.md file
- **Combine the search material**: combine the retrieved material with the account persona read from HAP to generate content aligned with the positioning
- **Suit the target audience**: ensure the content is suitable for the target audience
6. **Generate cover titles**: generate 5–10 cover titles according to the account persona's content style
- The title style must comply with the account persona's content style
- Titles must match the account positioning and target audience
7. **Select hashtags**: select 5–8 hashtags from the HAP Hashtag Library through dynamic queries
- Select them according to the content topic and the account persona's content direction
8. **Generate image suggestions**: combine the account persona's image generation prompt style with the content topic to generate image suggestions
9. **Save the preview**: save it to a local file using the note directory structure: 内容/小红书/{note_title}/{note_title}.md
10. **Confirm with the user**: confirm the content, titles, and images
11. **Generate images after user confirmation**: read the image generation prompt from the HAP "Account Persona" table, read the image generation configuration from the HAP "API Service Configuration" table, and generate the images
12. **Confirm publication**: ask whether to publish directly to Xiaohongshu
13. **Confirm synchronization**: ask whether to synchronize the content to HAP, and upload only after confirmation
14. **Synchronize to HAP after user confirmation**: synchronize it to the HAP "Content Management" table with platform_type = 小红书
- **Upload only images**: upload the cover image and other image URLs to HAP
- **Do not upload the Markdown document**: do not synchronize the Xiaohongshu note's Markdown document to HAP
15. **Publish the content after user confirmation**: use Playwright to publish to Xiaohongshu
16. **Update the status**: update the HAP publishing status and content URL示例 2: 批量生成内容
Example 2: Batch-Generate Content
用户:帮我生成一周的小红书笔记(7篇),主题如下:
1. Claude Code 新功能
2. AI 工具推荐
3. 大模型应用场景
...
执行流程:
1. **确认 MCP**:确认当前连接的 HAP 应用 MCP
2. **批量生成**:对每个主题重复上述流程
3. **动态读取配置**:每次生成图片时从 HAP "API服务配置" 表动态读取配置
4. **批量保存**:批量生成并保存到 HAP "内容管理" 表(platform_type = 小红书)User: Generate a week of Xiaohongshu notes, 7 posts in total, with these topics:
1. New Claude Code features
2. Recommended AI tools
3. Large-model application scenarios
...
Execution flow:
1. **Confirm the MCP**: confirm the currently connected HAP application MCP
2. **Batch generation**: repeat the preceding workflow for each topic
3. **Dynamically read the configuration**: read the image generation configuration from the HAP "API Service Configuration" table whenever images are generated
4. **Save in bulk**: generate the content in bulk and save it to the HAP "Content Management" table with platform_type = 小红书示例 3: 多平台发布
Example 3: Publish to Multiple Platforms
用户:将这篇笔记发布到小红书和微信公众号
执行流程:
1. **确认 MCP**:确认当前连接的 HAP 应用 MCP
2. **读取内容**:从 HAP "内容管理" 表读取内容(platform_type = 小红书)
3. **动态获取工作表**:动态获取"内容管理"表的 ID 和字段结构
4. **适配格式**:适配不同平台的格式要求:
- 小红书:300-400字,5-8个话题标签
- 微信公众号:2000-5000字,HTML格式
5. **发布内容**:分别发布到两个平台
6. **更新 HAP**:在 HAP "内容管理" 表中创建新记录(platform_type = 微信公众号),或更新现有记录的发布状态User: Publish this note to both Xiaohongshu and WeChat Official Account
Execution flow:
1. **Confirm the MCP**: confirm the currently connected HAP application MCP
2. **Read the content**: read the content from the HAP "Content Management" table with platform_type = 小红书
3. **Dynamically obtain the worksheet**: dynamically obtain the ID and field structure of the "Content Management" table
4. **Adapt the format**: adapt the content to the format requirements of each platform:
- Xiaohongshu: 300–400 Chinese characters and 5–8 hashtags
- WeChat Official Account: 2,000–5,000 Chinese characters in HTML format
5. **Publish the content**: publish it separately to both platforms
6. **Update HAP**: create a new record in the HAP "Content Management" table with platform_type = 微信公众号, or update the existing record's publishing status技术实现
Technical Implementation
依赖工具
Dependent Tools
- Tavily API(配置存储在 HAP): 搜索相关资料,获取最新信息
- wechat-article-writer skill: 内容生成
- HAP MCP(用户提供): 数据管理,用于存储内容、配置、话题库等
- Playwright MCP: 自动化发布到各平台
- 第三方 API(配置存储在 HAP): 图片生成、内容生成等 API 服务
- Tavily API, with configuration stored in HAP: search for related material and obtain the latest information
- wechat-article-writer skill: content generation
- HAP MCP, provided by the user: data management for storing content, configurations, the Hashtag Library, and other data
- Playwright MCP: automated publishing to each platform
- Third-party APIs, with configuration stored in HAP: image generation, content generation, and other API services
MCP 配置要求
MCP Configuration Requirements
用户需要提供:
- HAP 应用的 MCP 配置(包含 Appkey 和 Sign)
- 或明确指定使用哪个已配置的 MCP
Skill 会自动:
- 识别当前连接的 MCP 应用
- 动态获取工作表列表和结构
- 从"API服务配置"表读取密钥和配置
- 根据平台类型筛选内容记录
The user must provide:
- The MCP configuration for the HAP application, including the Appkey and Sign
- Alternatively, an explicit specification of which configured MCP to use
The Skill will automatically:
- Identify the currently connected MCP application
- Dynamically obtain the worksheet list and structure
- Read keys and configurations from the "API Service Configuration" table
- Filter content records by platform type
文件结构
File Structure
social-media-operation/
├── AGENTS.md # 账号人设配置(可选,本地参考文件)
├── 笔记生成工作流.md # 工作流说明
├── 内容/ # 内容根目录
│ └── 小红书/ # 平台分类(小红书/抖音/微信公众号/视频号)
│ └── {笔记标题}/ # 每个笔记一个目录,使用封面标题作为目录名
│ ├── {笔记标题}.md # Markdown 文档(使用笔记标题命名)
│ └── 配图/ # 配图目录
│ ├── 封面图.png
│ ├── 架构图.png
│ └── 应用场景图.png
├── 话题库/ # 话题标签库(可选,本地参考文件)
│ └── {类型}.md
└── README.md # 项目说明
目录结构说明:
- 内容/:根目录,包含所有平台的内容
- 小红书/:平台目录,展示该平台的所有笔记标题(目录名)
- {笔记标题}/:笔记目录,使用封面标题作为目录名,更清晰直观
- {笔记标题}.md:Markdown 文档,使用笔记标题命名
- 配图/:配图文件夹,包含该笔记的所有配图
示例:
内容/
└── 小红书/
└── MCP 是什么?/ # 笔记标题作为目录名
├── MCP科普介绍.md # Markdown 文档
└── 配图/
├── 封面图.png
├── 架构图.png
└── 应用场景图.png
注意:
- 账号人设和话题库数据统一存储在 HAP 中
- 本地文件仅作为参考,实际使用时从 HAP 表读取
- 内容按笔记目录结构组织,每个笔记包含 md 文档和配图
- 目录名使用笔记标题,更清晰直观social-media-operation/
├── AGENTS.md # Account persona configuration (optional local reference file)
├── 笔记生成工作流.md # Workflow documentation
├── 内容/ # Content root directory
│ └── 小红书/ # Platform categories: 小红书/抖音/微信公众号/视频号
│ └── {note_title}/ # One directory per note, using the cover title as the directory name
│ ├── {note_title}.md # Markdown document, named after the note title
│ └── 配图/ # Image directory
│ ├── 封面图.png
│ ├── 架构图.png
│ └── 应用场景图.png
├── 话题库/ # Hashtag library (optional local reference file)
│ └── {type}.md
└── README.md # Project documentation
Directory structure notes:
- 内容/: root directory containing content for all platforms
- 小红书/: platform directory containing all note titles for that platform
- {note_title}/: note directory using the note title as the directory name for greater clarity
- {note_title}.md: Markdown document named after the note title
- 配图/: image directory containing all images for the note
Example:
内容/
└── 小红书/
└── 什么是 MCP?/ # Note title used as the directory name
├── MCP科普介绍.md # Markdown document
└── 配图/
├── 封面图.png
├── 架构图.png
└── 应用场景图.png
Notes:
- Account persona and Hashtag Library data are stored uniformly in HAP
- Local files are provided only as references; actual usage reads from HAP tables
- Content is organized by note directory, with each note containing an md document and images
- Directory names use note titles for greater clarityHAP 应用配置
HAP Application Configuration
重要:应用名称和 MCP 配置由用户提供,不硬编码
通用工作表结构(用户需要在 HAP 中创建):
- 内容管理(通用表,通过 platform_type 字段区分平台:小红书/抖音/微信公众号/视频号等)
- 话题标签库(存储各平台的话题标签)
- 账号人设(存储不同平台的账号人设配置)
- API服务配置(按功能分类,每个功能一条记录包含所有配置字段,包括密钥)
- 热点平台关注表(存储用户关注的热点平台,用于每日热点内容推荐)
- 选题库(存储推荐的选题,关联热点平台关注表和内容管理表)
- 社交媒体数据(可选,存储运营数据)
工作表创建:
- 用户需要在 HAP 应用中创建上述工作表
- 创建工作表时,建议设置别名(alias),便于后续查询
- 或用户提供已存在的应用 MCP,Skill 会自动识别工作表结构
- Skill 会通过 动态获取工作表列表
get_app_worksheets_list() - 查询时优先通过别名(alias)匹配,如果别名不存在则使用名称(name)匹配
- 绝对不使用硬编码的工作表 ID
Important: the application name and MCP configuration are provided by the user and are never hard-coded
General worksheet structure that the user must create in the HAP application:
- 内容管理, a shared table using to distinguish platforms such as 小红书, 抖音, 微信公众号, and 视频号
platform_type - 话题标签库, which stores hashtags for each platform
- 账号人设, which stores account persona configurations for different platforms
- API服务配置, with one record per function containing all configuration fields, including credentials
- 热点平台关注表, which stores the user's followed trending platforms for daily trending content recommendations
- 选题库, which stores recommended topics and relates to the Trending Platform Follow List and Content Management tables
- 社交媒体数据, an optional table for storing operational data
Worksheet creation:
- The user must create the worksheets above in the HAP application
- When creating worksheets, setting an alias is recommended to simplify subsequent queries
- Alternatively, the user can provide an existing application MCP, and the Skill will automatically identify the worksheet structure
- The Skill obtains the worksheet list dynamically through
get_app_worksheets_list() - When querying, prioritize alias matching; if no alias exists, use name matching
- Never use hard-coded worksheet IDs
注意事项
Notes
MCP 和配置管理
MCP and Configuration Management
-
MCP 配置由用户提供:
- Skill 不包含任何硬编码的 MCP 配置
- 用户需要提供 HAP 应用的 MCP 配置信息
- 或明确指定使用哪个已配置的 MCP
-
MCP 应用确认:
- 执行 HAP 操作前,必须先调用 确认当前连接的 MCP 应用
get_app_info() - 如果用户提供了 MCP 配置,需要对比确认是否匹配
- 不匹配时需要与用户确认
- 执行 HAP 操作前,必须先调用
-
动态读取配置:
- 所有 API 密钥和配置都存储在 HAP "API服务配置" 表中
- 使用时必须从表中动态读取,绝对不要在代码中硬编码
- 通过 查询配置,根据功能名称或服务类型匹配
get_record_list()
-
工作表动态识别(重要):
- 通过 动态获取工作表列表
get_app_worksheets_list() - 优先通过别名(alias)匹配工作表,如果别名不存在则使用名称(name)匹配
- 绝对不要使用硬编码的工作表 ID
- 所有查询操作都必须先通过别名或名称匹配获取工作表 ID,然后再使用该 ID 进行查询
- 通过
-
MCP configuration is provided by the user:
- The Skill contains no hard-coded MCP configuration
- The user must provide MCP configuration information for a HAP application
- Alternatively, the user explicitly specifies which configured MCP to use
-
MCP application confirmation:
- Before performing HAP operations, must be called to confirm the currently connected MCP application
get_app_info() - If the user provided an MCP configuration, compare and verify whether it matches
- If they do not match, confirm with the user
- Before performing HAP operations,
-
Dynamic configuration reading:
- All API keys and configurations are stored in the HAP "API Service Configuration" table
- Read them dynamically at runtime and never hard-code them in code
- Query configurations through and match them by function name or service type
get_record_list()
-
Dynamic worksheet identification (important):
- Obtain the worksheet list through
get_app_worksheets_list() - Prioritize alias matching; if no alias exists, use name matching
- Never use hard-coded worksheet IDs
- Every query must first obtain the worksheet ID through alias or name matching and then use that ID for the query
- Obtain the worksheet list through
内容生成
Content Generation
账号人设读取检查清单(必须严格执行):
- ✅ 确认 MCP 连接:执行任何操作前,必须先调用 确认当前连接的 HAP MCP 应用
get_app_info() - ✅ 动态获取工作表:通过 动态获取工作表列表,通过别名
get_app_worksheets_list()或名称account_persona匹配账号人设 - ✅ 查询账号人设:使用 根据
get_record_list()查询对应平台的账号人设记录platform_type - ✅ 验证必需字段:检查是否读取到 和
content_style字段,如果缺失则抛出异常content_principles - ✅ 禁止使用本地文件:绝对不允许使用 或其他本地文件作为账号人设来源
AGENTS.md - ✅ 严格遵循人设:生成内容时必须严格按照从 HAP 读取的 和
content_style执行content_principles
其他注意事项:
5. 内容预览:生成内容后先保存到本地文件,用户确认后再同步到 HAP
6. 图片生成:图片生成可能失败(SSL 错误),需要重试或手动制作
7. 发布登录:发布前需要用户先登录目标平台
8. 字数控制:不同平台的字数要求不同,需要适配
9. 话题标签:必须从 HAP 话题库中选取,不要自己编造
10. 账号人设:必须从 HAP "账号人设" 表中读取,禁止使用本地文件,包括图片生成提示词
11. 图片风格:生成图片时,将从 HAP 读取的账号人设中的 与具体配图建议结合
image_generation_promptAccount persona reading checklist (must be strictly followed):
- ✅ Confirm the MCP connection: before performing any operation, call to confirm the currently connected HAP MCP application
get_app_info() - ✅ Dynamically obtain the worksheet: call and match the
get_app_worksheets_list()alias or theaccount_personaname账号人设 - ✅ Query the account persona: call to retrieve the account persona for the relevant platform according to
get_record_list()platform_type - ✅ Validate the required fields: check whether and
content_stylewere read, and throw an exception if either is missingcontent_principles - ✅ Local files are prohibited: never use or any other local file as the account persona source
AGENTS.md - ✅ Strictly follow the persona: generate content strictly according to and
content_styleread from HAPcontent_principles
Other notes:
5. Content preview: save generated content to a local file and synchronize it to HAP only after user confirmation
6. Image generation: image generation may fail due to SSL errors and may require retries or manual creation
7. Publishing login: the user must log in to the target platform before publishing
8. Word-count control: adapt the content to the different word-count requirements of each platform
9. Hashtags: must be selected from the HAP Hashtag Library; do not invent them
10. Account persona: must be read from the HAP "Account Persona" table; local files are strictly prohibited, including the image generation prompt
11. Image style: when generating images, combine from the account persona read from HAP with the specific image suggestions
image_generation_prompt最佳实践
Best Practices
通用性设计
Generic Design
-
MCP 配置:
- 永远不硬编码 MCP 配置
- 始终从用户提供的 MCP 或指定的 MCP 读取配置
- 执行操作前先确认当前连接的 MCP 应用
-
配置管理:
- 所有密钥和配置存储在 HAP "API服务配置" 表中
- 使用时动态读取,不假设任何默认值
- 用户需要在 HAP 中填写所有必要的配置信息
-
工作表识别(重要):
- 动态获取工作表列表
- 优先通过别名(alias)匹配工作表,如果别名不存在则使用名称(name)匹配
- 绝对不要使用硬编码的工作表 ID
- 所有查询操作都必须先通过别名或名称匹配获取工作表 ID,然后再使用该 ID 进行查询
- 动态获取字段结构,通过名称或别名匹配字段 ID
-
MCP configuration:
- Never hard-code the MCP configuration
- Always read the configuration from the user-provided or user-specified MCP
- Confirm the currently connected MCP application before performing any operation
-
Configuration management:
- Store all keys and configurations in the HAP "API Service Configuration" table
- Read them dynamically and do not assume any default values
- The user must provide all necessary configuration information
-
Worksheet identification (important):
- Dynamically obtain the worksheet list
- Prioritize alias matching; if no alias exists, use name matching
- Never use hard-coded worksheet IDs
- Every query must first obtain the worksheet ID through alias or name matching and then use that ID for the query
- Dynamically obtain the field structure and match field IDs by name or alias
内容运营
Content Operations
- 内容质量:确保内容有价值,符合账号定位
- 更新频率:保持稳定的更新频率(建议每周3-5篇)
- 数据追踪:定期查看 HAP 中的数据,分析爆款规律
- 互动管理:及时回复评论,积极与用户互动
- 多平台适配:根据不同平台特点调整内容格式和风格
- Content quality: ensure the content provides value and aligns with the account positioning
- Publishing frequency: maintain a consistent publishing frequency, with a recommendation of 3–5 posts per week
- Data tracking: regularly review the data in HAP and analyze the characteristics of high-performing content
- Engagement management: respond to comments promptly and interact actively with users
- Multi-platform adaptation: adjust the content format and style according to the characteristics of each platform