从选题、创作、发布到复盘形成闭环,历史数据驱动自进化,越用越懂你。基于 Skill-as-Brain 架构,一份 SKILL.md 通吃 Hermes / Claude Code / Codex。
把你的 AI 助手变成懂小红书的博主搭档——从选题、创作、发布到复盘形成闭环,历史数据驱动自进化。
还没发或刚开始——三问对话建画像,竞品冷启动,每日选题/起稿/发布/复盘全流程。
已发 30~1000+ 条——批量导入历史,AI 反推画像,挖掘自己验证有效的 patterns,出账号体检报告。
可借鉴的 Skill-as-Brain 架构、业务路由 §0a、JSON Schema 契约、反模式禁令工程化实践。
业务逻辑全部在 SKILL.md 里,AI 助手读了它就是大脑; scripts/ 只是手脚,负责调 API、读写数据库、生成图片这些 AI 做不了的物理操作。
┌─────────────────────────────────────────┐
│ AI 助手(大脑 / Skill-as-Brain) │
│ │
│ §0a 业务路由 → §0b 平台识别/校验 │
│ ├─ §0c 老博主接入 (v2.2.0+) │
│ └─ §0/§1 新博主流程 │
│ → §2/§3/§4 选题/创作/发布/复盘 │
└┬────┬────┬────┬────┬────┬────┬────┬────┘
│ │ │ │ │ │ │ │
┌▼──┐┌▼──┐┌▼─┐┌▼─┐┌▼──┐┌▼──┐┌▼──┐┌▼──┐
│xhs││db ││img││fet││note││pre││imp││aud│
│.sh││.sh││.py││ch ││rx ││fli││ort││it │
│MCP││SQL││gen││ ││diag││chk││220││220│
└───┘└───┘└───┘└───┘└────┘└───┘└───┘└───┘
knowledge-base/ schemas/ (契约)
├ profile.json ├ state.*
├ preferences.json ├ profile.*
├ patterns.md ├ preferences.*
├ evolution-log.md └ audit-report.*
└ audit-YYYY-MM-DD
> runtime: online
4 个维度,完整覆盖博主运营闭环
根据你的身份选择接入路径
# 克隆仓库
$ git clone git@github.com:AI-flower/shuling.git && cd shuling
# 一键安装:自动检测平台 + 依赖预检 + init DB + 生成配置
$ bash install.sh
# 其他模式
$ bash install.sh --check # 只自检不动手
$ bash install.sh --dry-run # 预演将做什么
$ SHULING_ASSUME_YES=1 bash install.sh # CI / 远程非交互
$ bash scripts/import-existing.sh --limit 200
$ bash scripts/audit-report.sh --extract-patterns
一份 SKILL.md,所有平台产生相同业务行为
cron job + prompt: 使用 shuling skill
对话 + /loop 8h ...
对话触发
兼容 agents/ 规范
一条主线:AI → SKILL.md → scripts/ → DB + knowledge-base
shuling/
├── SKILL.md # 大脑剧本(AI 读这个,核心)
├── VERSION # 版本号 + BRAIN/HANDS/CALIB 清单
├── CHANGELOG.md / UPGRADE.md / RELEASING.md
├── README.md
├── install.sh # 六模式安装脚本 (v2.1.3+)
│
├── config/runtime.env.example
│
├── scripts/ # ──── Hands 层 ────
│ ├── preflight.py # 环境预检
│ ├── db.sh # SQLite CRUD (8 表)
│ ├── xhs.sh # MCP 统一入口 (9 工具+节流+限额+日志)
│ ├── image.py # Gemini / OpenAI 生图
│ ├── screenshot.cjs # HTML 模板截图 (Playwright 降级)
│ ├── fetch-post-data.sh # 合并拉 metrics + comments
│ ├── noterx-diagnose.sh # NoteRx 五维诊断
│ ├── import-existing.sh # 老博主批量导入 (v2.2.0+)
│ └── audit-report.sh # 账号体检报告 (v2.2.0+)
│
├── schemas/ # ──── AI 写入契约 (v2.1.3+) ────
│ ├── state.schema.json
│ ├── profile.schema.json
│ ├── preferences.schema.json
│ └── audit-report.schema.json # v2.2.0+
│
├── migrations/ # DB 迁移(幂等)
│ ├── v2.1.1.sh / v2.1.2.sh / v2.1.3.sh
│ └── v2.2.0.sh # ALTER posts + CREATE historical_stats
│
├── knowledge-base/ # ──── 运行时生成(私有) ────
│ ├── profile.json # 博主画像
│ ├── preferences.json # 偏好权重(自进化)
│ ├── patterns.md / anti-patterns.md
│ ├── image-patterns.md / image-anti-*
│ ├── evolution-log.md
│ ├── reviews/<YYYY-W##>.md
│ └── audit-<YYYY-MM-DD>.(md|json) # 老博主体检报告 (v2.2.0+)
│
├── data/xhs.db # SQLite 8 表
├── templates/post.html # 小红书风格 HTML 模板
├── docs/ # mcp-setup / features/
└── platform/ # hermes / claude-code / codex
按你的需求找到对应文档
开源 · MIT 许可 · 欢迎借鉴 Skill-as-Brain 架构