agentleFS
JakeyhbJakeyhb/football-content-ops-skill/skills/xhs-flowus-db/SKILL.md

xhs-flowus-db

Skill1 starsChanged 14 days agoMITView on GitHub

小红书运营平台的核心数据持久化层。所有笔记内容、发布状态、数据追踪都通过 FlowUs 数据库管理。 参数:标题(必填)、分类(足球/科技/生活/摄影/AI/其他)、标签(逗号分隔)、状态(草稿/已发布/已删除/待审核,默认草稿) 错误:页面创建后没有标题,Flowus 显示空白。 原因:创建时没带 properties,或 标题 字段为空。 解决:用封装脚本,或创建时必须包含 properties.标题,且标题不能为空。 Flowus API 限制:url 和 number 类型在页面创建时不能显式设置(会报 Invalid database page properties)。但数据库 schema 会自动为所有字段创建空值。 正确做法:创建时只设置 title、select、multi_select、rich_text,url/number/date 由数据库自动填充。 创建后,数据库会自动为 链接、发布时间、点赞数、收藏数、评论数 创建空字段。 **多选(multi_select)**: **富文本(rich_text)**: 创建页面后,用 flowus markdown put 或 block API 写入正文内容:

The file

Files
SKILL.md

Skill: FlowUs 数据库页面管理

小红书运营平台的核心数据持久化层。所有笔记内容、发布状态、数据追踪都通过 FlowUs 数据库管理。

数据库结构

字段(Properties)

字段名类型说明可选值
标题title笔记标题必填
分类select内容分类足球 / 科技 / 生活 / 摄影 / AI / 其他
标签multi_select内容标签阿森纳 / 曼城 / 英超 / 社区盾 / 欧冠 / 转会 / 战术
状态select发布状态草稿 / 已发布 / 已删除
链接url笔记链接发布后填写
发布时间date发布时间发布后填写
笔记IDrich_text小红书笔记ID发布后填写
点赞数number点赞数量发布后追踪
收藏数number收藏数量发布后追踪
评论数number评论数量发布后追踪

创建新页面

推荐方式:用封装脚本(永不犯错)

# 一键创建,自动包含所有必填属性
scripts/xhs-flowus-create.sh "标题" "分类" "标签1,标签2,标签3" "状态"

# 示例
scripts/xhs-flowus-create.sh "曼城揭幕战!" "足球" "曼城,英超,社区盾" "草稿"
scripts/xhs-flowus-create.sh "AI绘画技巧" "AI" "Midjourney,Stable Diffusion" "待审核"

参数:标题(必填)、分类(足球/科技/生活/摄影/AI/其他)、标签(逗号分隔)、状态(草稿/已发布/已删除/待审核,默认草稿)

手动方式(用模板)

# 1. 复制模板
cp xhs-db-new-page.json /tmp/new-page.json

# 2. 编辑模板,填入实际值(标题必填!)
# 3. 创建页面
flowus page create --body /tmp/new-page.json

⚠️ 最常见的错误

错误:页面创建后没有标题,Flowus 显示空白。 原因:创建时没带 properties,或 标题 字段为空。 解决:用封装脚本,或创建时必须包含 properties.标题,且标题不能为空。

步骤

  1. 准备页面数据(标题、分类、标签等)
  2. 构建 JSON body,必须包含 properties
  3. 调用 flowus page create --body <json文件>

⚠️ 关键规则:url 和 number 不能显式设置

Flowus API 限制:url 和 number 类型在页面创建时不能显式设置(会报 Invalid database page properties)。但数据库 schema 会自动为所有字段创建空值。

正确做法:创建时只设置 title、select、multi_select、rich_text,url/number/date 由数据库自动填充。

错误示例(会报错):

{
  "parent": { "database_id": "060f200e-...", "type": "database_id" },
  "properties": {
    "标题": { "title": [...], "type": "title" },
    "链接": { "url": null },
    "点赞数": { "number": null }
  }
}

正确示例:

{
  "icon": { "emoji": "📝", "type": "emoji" },
  "parent": { "database_id": "060f200e-...", "type": "database_id" },
  "properties": {
    "标题": {
      "title": [{ "text": { "content": "笔记标题" }, "type": "text" }],
      "type": "title"
    },
    "分类": { "select": { "name": "足球" }, "type": "select" },
    "标签": { "multi_select": [{ "name": "阿森纳" }], "type": "multi_select" },
    "状态": { "select": { "name": "草稿" }, "type": "select" },
    "笔记ID": { "rich_text": [{ "text": { "content": "" }, "type": "text" }], "type": "rich_text" }
  }
}

创建后,数据库会自动为 链接、发布时间、点赞数、收藏数、评论数 创建空字段。

各字段 JSON 格式

标题(title):

"标题": {
  "title": [{ "text": { "content": "这里是标题" }, "type": "text" }],
  "type": "title"
}

单选(select):

"分类": { "select": { "name": "足球" }, "type": "select" }

多选(multi_select):

"标签": { "multi_select": [{ "name": "阿森纳" }, { "name": "英超" }], "type": "multi_select" }

富文本(rich_text):

"笔记ID": { "rich_text": [{ "text": { "content": "abc123" }, "type": "text" }], "type": "rich_text" }

数字(number):

"点赞数": { "number": 123 }

链接(url):

"链接": { "url": "https://www.xiaohongshu.com/explore/xxx" }

日期(date):

"发布时间": { "date": { "start": "2026-08-18T10:00:00+08:00" } }

写入页面内容(Blocks)

创建页面后,用 flowus markdown put 或 block API 写入正文内容:

# 方式 1:写入 markdown
flowus markdown put --file content.md <PAGE_ID>

# 方式 2:写入 blocks
flowus api call PATCH /v2/blocks/<PAGE_ID>/children --body blocks.json

查询页面

# 查询数据库中的所有页面
flowus database query 060f200e-f17e-48cb-a677-fc26efb07807 --body query.json

注意事项

  1. 创建页面时必须带 properties,否则页面没有标题和字段
  2. 标题是必填字段,不能为空
  3. 分类/标签/状态 必须从预设选项中选择
  4. 发布后才填写 链接、发布时间、笔记ID、互动数据

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.