autocrew 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HAMLETDEER.md +562 -0
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/README_CN.md +190 -0
- package/adapters/openclaw/index.ts +68 -0
- package/bin/autocrew.mjs +23 -0
- package/bin/autocrew.ts +13 -0
- package/openclaw.plugin.json +36 -0
- package/package.json +74 -0
- package/skills/_writing-style/SKILL.md +68 -0
- package/skills/audience-profiler/SKILL.md +241 -0
- package/skills/content-attribution/SKILL.md +128 -0
- package/skills/content-review/SKILL.md +257 -0
- package/skills/cover-generator/SKILL.md +93 -0
- package/skills/humanizer-zh/SKILL.md +75 -0
- package/skills/intel-digest/SKILL.md +57 -0
- package/skills/intel-pull/SKILL.md +74 -0
- package/skills/manage-pipeline/SKILL.md +63 -0
- package/skills/memory-distill/SKILL.md +89 -0
- package/skills/onboarding/SKILL.md +117 -0
- package/skills/pipeline-status/SKILL.md +51 -0
- package/skills/platform-rewrite/SKILL.md +125 -0
- package/skills/pre-publish/SKILL.md +142 -0
- package/skills/publish-content/SKILL.md +500 -0
- package/skills/remix-content/SKILL.md +77 -0
- package/skills/research/SKILL.md +127 -0
- package/skills/setup/SKILL.md +353 -0
- package/skills/spawn-batch-writer/SKILL.md +66 -0
- package/skills/spawn-planner/SKILL.md +72 -0
- package/skills/spawn-writer/SKILL.md +60 -0
- package/skills/teardown/SKILL.md +144 -0
- package/skills/title-craft/SKILL.md +234 -0
- package/skills/topic-ideas/SKILL.md +105 -0
- package/skills/video-timeline/SKILL.md +117 -0
- package/skills/write-script/SKILL.md +232 -0
- package/skills/xhs-cover-review/SKILL.md +48 -0
- package/src/adapters/browser/browser-cdp.ts +260 -0
- package/src/adapters/browser/browser-relay.ts +236 -0
- package/src/adapters/browser/gateway-client.ts +148 -0
- package/src/adapters/browser/types.ts +36 -0
- package/src/adapters/image/gemini.ts +219 -0
- package/src/adapters/research/tikhub.ts +19 -0
- package/src/cli/banner.ts +18 -0
- package/src/cli/bootstrap.ts +33 -0
- package/src/cli/commands/adapt.ts +28 -0
- package/src/cli/commands/advance.ts +28 -0
- package/src/cli/commands/assets.ts +24 -0
- package/src/cli/commands/audit.ts +18 -0
- package/src/cli/commands/contents.ts +18 -0
- package/src/cli/commands/cover.ts +58 -0
- package/src/cli/commands/events.ts +17 -0
- package/src/cli/commands/humanize.ts +27 -0
- package/src/cli/commands/index.ts +80 -0
- package/src/cli/commands/init.ts +28 -0
- package/src/cli/commands/intel.ts +55 -0
- package/src/cli/commands/learn.ts +34 -0
- package/src/cli/commands/memory.ts +18 -0
- package/src/cli/commands/migrate.ts +24 -0
- package/src/cli/commands/open.ts +21 -0
- package/src/cli/commands/pipelines.ts +18 -0
- package/src/cli/commands/pre-publish.ts +27 -0
- package/src/cli/commands/profile.ts +31 -0
- package/src/cli/commands/research.ts +36 -0
- package/src/cli/commands/restore.ts +28 -0
- package/src/cli/commands/review.ts +61 -0
- package/src/cli/commands/start.ts +28 -0
- package/src/cli/commands/status.ts +14 -0
- package/src/cli/commands/templates.ts +15 -0
- package/src/cli/commands/topics.ts +18 -0
- package/src/cli/commands/trash.ts +28 -0
- package/src/cli/commands/upgrade.ts +48 -0
- package/src/cli/commands/versions.ts +24 -0
- package/src/cli/index.ts +40 -0
- package/src/data/sensitive-words-builtin.json +114 -0
- package/src/data/source-presets.yaml +54 -0
- package/src/e2e.test.ts +596 -0
- package/src/modules/auth/cookie-manager.ts +113 -0
- package/src/modules/cards/template-engine.ts +74 -0
- package/src/modules/cards/templates/comparison-table.ts +71 -0
- package/src/modules/cards/templates/data-chart.ts +76 -0
- package/src/modules/cards/templates/flow-chart.ts +49 -0
- package/src/modules/cards/templates/key-points.ts +59 -0
- package/src/modules/cover/prompt-builder.test.ts +157 -0
- package/src/modules/cover/prompt-builder.ts +212 -0
- package/src/modules/cover/ratio-adapter.test.ts +122 -0
- package/src/modules/cover/ratio-adapter.ts +104 -0
- package/src/modules/filter/sensitive-words.test.ts +72 -0
- package/src/modules/filter/sensitive-words.ts +212 -0
- package/src/modules/humanizer/zh.test.ts +75 -0
- package/src/modules/humanizer/zh.ts +175 -0
- package/src/modules/intel/collector.ts +19 -0
- package/src/modules/intel/collectors/competitor.test.ts +71 -0
- package/src/modules/intel/collectors/competitor.ts +65 -0
- package/src/modules/intel/collectors/rss.test.ts +56 -0
- package/src/modules/intel/collectors/rss.ts +70 -0
- package/src/modules/intel/collectors/trends.test.ts +80 -0
- package/src/modules/intel/collectors/trends.ts +107 -0
- package/src/modules/intel/collectors/web-search.test.ts +85 -0
- package/src/modules/intel/collectors/web-search.ts +81 -0
- package/src/modules/intel/integration.test.ts +203 -0
- package/src/modules/intel/intel-engine.test.ts +103 -0
- package/src/modules/intel/intel-engine.ts +96 -0
- package/src/modules/intel/source-config.test.ts +113 -0
- package/src/modules/intel/source-config.ts +131 -0
- package/src/modules/learnings/diff-tracker.test.ts +144 -0
- package/src/modules/learnings/diff-tracker.ts +189 -0
- package/src/modules/learnings/rule-distiller.ts +141 -0
- package/src/modules/memory/distill.ts +208 -0
- package/src/modules/migrate/legacy-migrate.test.ts +169 -0
- package/src/modules/migrate/legacy-migrate.ts +229 -0
- package/src/modules/pro/api-client.ts +192 -0
- package/src/modules/pro/gate.test.ts +110 -0
- package/src/modules/pro/gate.ts +104 -0
- package/src/modules/profile/creator-profile.test.ts +178 -0
- package/src/modules/profile/creator-profile.ts +248 -0
- package/src/modules/publish/douyin-api.ts +34 -0
- package/src/modules/publish/wechat-mp.ts +320 -0
- package/src/modules/publish/xiaohongshu-api.ts +127 -0
- package/src/modules/research/free-engine.ts +360 -0
- package/src/modules/timeline/markup-generator.ts +63 -0
- package/src/modules/timeline/parser.ts +275 -0
- package/src/modules/workflow/templates.ts +124 -0
- package/src/modules/writing/platform-rewrite.ts +190 -0
- package/src/modules/writing/title-hashtag.ts +385 -0
- package/src/runtime/context.test.ts +97 -0
- package/src/runtime/context.ts +129 -0
- package/src/runtime/events.test.ts +83 -0
- package/src/runtime/events.ts +104 -0
- package/src/runtime/hooks.ts +174 -0
- package/src/runtime/tool-runner.test.ts +204 -0
- package/src/runtime/tool-runner.ts +282 -0
- package/src/runtime/workflow-engine.test.ts +455 -0
- package/src/runtime/workflow-engine.ts +391 -0
- package/src/server/index.ts +409 -0
- package/src/server/start.ts +39 -0
- package/src/storage/local-store.test.ts +304 -0
- package/src/storage/local-store.ts +704 -0
- package/src/storage/pipeline-store.test.ts +363 -0
- package/src/storage/pipeline-store.ts +698 -0
- package/src/tools/asset.ts +96 -0
- package/src/tools/content-save.ts +276 -0
- package/src/tools/cover-review.ts +221 -0
- package/src/tools/humanize.ts +54 -0
- package/src/tools/init.ts +133 -0
- package/src/tools/intel.ts +92 -0
- package/src/tools/memory.ts +76 -0
- package/src/tools/pipeline-ops.ts +109 -0
- package/src/tools/pipeline.ts +168 -0
- package/src/tools/pre-publish.ts +232 -0
- package/src/tools/publish.ts +183 -0
- package/src/tools/registry.ts +198 -0
- package/src/tools/research.ts +304 -0
- package/src/tools/review.ts +305 -0
- package/src/tools/rewrite.ts +165 -0
- package/src/tools/status.ts +30 -0
- package/src/tools/timeline.ts +234 -0
- package/src/tools/topic-create.ts +50 -0
- package/src/types/providers.ts +69 -0
- package/src/types/timeline.test.ts +147 -0
- package/src/types/timeline.ts +83 -0
- package/src/utils/retry.test.ts +97 -0
- package/src/utils/retry.ts +85 -0
- package/templates/AGENTS.md +99 -0
- package/templates/SOUL.md +31 -0
- package/templates/TOOLS.md +76 -0
package/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# AutoCrew
|
|
2
|
+
|
|
3
|
+
**One-person content studio powered by AI — from trending topics to published posts.**
|
|
4
|
+
|
|
5
|
+
English | [中文](README_CN.md)
|
|
6
|
+
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://www.npmjs.com/package/autocrew)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
AutoCrew is an AI-powered content operations pipeline for Chinese social media. It handles the entire workflow — research trending topics, write platform-native drafts, review for sensitivity and AI-sounding language, and publish to Xiaohongshu, Douyin, WeChat, and more.
|
|
14
|
+
|
|
15
|
+
Works standalone as a CLI, or as a plugin for [Claude Code](https://claude.ai/code) and [OpenClaw](https://openclaw.dev).
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
You: Find me topics for this week
|
|
19
|
+
AutoCrew: (searches trending lists + scores by your niche → recommends 5 topics)
|
|
20
|
+
|
|
21
|
+
You: Write #2 as a Xiaohongshu post
|
|
22
|
+
AutoCrew: (generates draft in your voice → checks for sensitive words → outputs title options + hashtags)
|
|
23
|
+
|
|
24
|
+
You: Too AI-sounding, make it more conversational
|
|
25
|
+
AutoCrew: (de-AI pass → remembers your preference → applies automatically next time)
|
|
26
|
+
|
|
27
|
+
You: Publish
|
|
28
|
+
AutoCrew: (6-point pre-publish check → publishes)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g autocrew
|
|
37
|
+
autocrew init
|
|
38
|
+
autocrew research
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
That's it. `init` creates your local data directory (`~/.autocrew/`), and `research` finds trending topics based on public sources (Zhihu, Weibo, industry keywords).
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
### Research
|
|
48
|
+
- Trending topic discovery from public sources (Zhihu Hot List, Weibo Trending, industry keywords)
|
|
49
|
+
- Topic scoring based on your niche and audience
|
|
50
|
+
- Intel pipeline for monitoring inspiration sources
|
|
51
|
+
|
|
52
|
+
### Write
|
|
53
|
+
- Style-calibrated drafts — 4-stage deep calibration learns your voice
|
|
54
|
+
- Hook-Body-CTA-Title structure optimized for Chinese social media
|
|
55
|
+
- Multi-platform rewrites (same topic, platform-native format)
|
|
56
|
+
|
|
57
|
+
### Review
|
|
58
|
+
- Sensitive word scanning (built-in + platform-specific throttled terms)
|
|
59
|
+
- De-AI-ification (去 AI 味) — removes robotic patterns from Chinese text
|
|
60
|
+
- Quality scoring: information density, hook strength, CTA clarity
|
|
61
|
+
|
|
62
|
+
### Publish
|
|
63
|
+
- Multi-platform: Xiaohongshu, Douyin, WeChat Video, WeChat Articles, Bilibili
|
|
64
|
+
- 6-point pre-publish checklist
|
|
65
|
+
- Cover image generation and A/B/C review
|
|
66
|
+
|
|
67
|
+
### Learn
|
|
68
|
+
- Auto-captures your edits as feedback
|
|
69
|
+
- After 5 similar corrections, distills them into writing rules
|
|
70
|
+
- Rules are applied automatically in future drafts
|
|
71
|
+
|
|
72
|
+
### Web Dashboard
|
|
73
|
+
- Built-in web UI for visual content management
|
|
74
|
+
- Script editor with timeline-based video production
|
|
75
|
+
- Jianying (剪映) export for video editing
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## How It Works
|
|
80
|
+
|
|
81
|
+
AutoCrew runs entirely on your machine. All content, drafts, and creator profiles are stored locally in `~/.autocrew/`. No data is uploaded anywhere.
|
|
82
|
+
|
|
83
|
+
The core is a standalone Node.js CLI with 20+ tools and 15+ skills. A thin plugin layer lets it work as a Claude Code MCP server or OpenClaw extension — but it doesn't depend on either.
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
~/.autocrew/
|
|
87
|
+
├── creator-profile.json # Your niche, audience, writing rules
|
|
88
|
+
├── STYLE.md # Writing voice profile
|
|
89
|
+
├── topics/ # Topic library
|
|
90
|
+
├── contents/ # Content projects
|
|
91
|
+
│ └── content-xxx/
|
|
92
|
+
│ ├── meta.json # Metadata + status + asset index
|
|
93
|
+
│ ├── draft.md # Current draft
|
|
94
|
+
│ ├── timeline.json # Video timeline (if generated)
|
|
95
|
+
│ └── versions/ # Version history
|
|
96
|
+
└── learnings/ # Edit history + distilled rules
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Use with Claude Code
|
|
102
|
+
|
|
103
|
+
Add AutoCrew as an MCP server in your Claude Code settings:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"mcpServers": {
|
|
108
|
+
"autocrew": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["tsx", "/path/to/AutoCrew/mcp/server.ts"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then just talk to Claude naturally — "find me topics", "write this as a post", "make it less AI-sounding".
|
|
117
|
+
|
|
118
|
+
## Use with OpenClaw
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
openclaw plugins install autocrew
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Works out of the box. All skills and tools are available in OpenClaw conversations.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## CLI Reference
|
|
129
|
+
|
|
130
|
+
| Command | Description |
|
|
131
|
+
|---------|-------------|
|
|
132
|
+
| `autocrew init` | Initialize data directory and creator profile |
|
|
133
|
+
| `autocrew status` | Pipeline overview |
|
|
134
|
+
| `autocrew research` | Discover trending topics |
|
|
135
|
+
| `autocrew topics` | List saved topics |
|
|
136
|
+
| `autocrew start <topic>` | Start a new content project |
|
|
137
|
+
| `autocrew contents` | List content items |
|
|
138
|
+
| `autocrew humanize <id>` | De-AI pass on a draft |
|
|
139
|
+
| `autocrew adapt <id> <platform>` | Platform-native rewrite |
|
|
140
|
+
| `autocrew review <id>` | Content review (sensitivity + quality) |
|
|
141
|
+
| `autocrew pre-publish <id>` | 6-point pre-publish checklist |
|
|
142
|
+
| `autocrew profile` | Show creator profile |
|
|
143
|
+
| `autocrew learn <id> --signal edit --feedback "too formal"` | Capture feedback |
|
|
144
|
+
| `autocrew intel` | Manage inspiration sources |
|
|
145
|
+
|
|
146
|
+
Run `autocrew --help` for the full command list.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Free vs Pro
|
|
151
|
+
|
|
152
|
+
| Feature | Free | Pro |
|
|
153
|
+
|---------|------|-----|
|
|
154
|
+
| Topic research | Public search (Zhihu/Weibo) | + Competitor crawling + platform hot lists |
|
|
155
|
+
| Content writing | Full workflow | Full workflow |
|
|
156
|
+
| De-AI-ification | Yes | Yes |
|
|
157
|
+
| Sensitive word scan | Yes | Yes |
|
|
158
|
+
| Platform rewrite | Xiaohongshu + Douyin | + WeChat + Bilibili |
|
|
159
|
+
| Cover generation | 3:4 | + 16:9 + 4:3 |
|
|
160
|
+
| Publishing | Xiaohongshu + Douyin | All platforms |
|
|
161
|
+
| Style calibration | Yes | Yes |
|
|
162
|
+
| Learning loop | Yes | Yes |
|
|
163
|
+
| Competitor monitoring | No | Yes |
|
|
164
|
+
| Video ASR extraction | No | Yes |
|
|
165
|
+
| Analytics reports | No | Yes |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Development
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
git clone https://github.com/alextangson/AutoCrew.git
|
|
173
|
+
cd AutoCrew
|
|
174
|
+
npm install
|
|
175
|
+
npm test # 341 tests
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Start the web dashboard in dev mode:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
cd web && npm run dev
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
MIT © [alextangson](https://github.com/alextangson)
|
package/README_CN.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# AutoCrew
|
|
2
|
+
|
|
3
|
+
**一个人的 AI 内容工作室 -- 从选题到发布,全流程自动化。**
|
|
4
|
+
|
|
5
|
+
[English](README.md) | 中文
|
|
6
|
+
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://www.npmjs.com/package/autocrew)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
AutoCrew 是为中文新媒体创作者打造的 AI 内容运营工具。覆盖选题调研、文案撰写、敏感词审核、去 AI 味、多平台改写、一键发布的完整流程。
|
|
14
|
+
|
|
15
|
+
支持独立 CLI 使用,也可作为 [Claude Code](https://claude.ai/code) 或 [OpenClaw](https://openclaw.dev) 的插件。
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
你:帮我找这周小红书的选题
|
|
19
|
+
AutoCrew:(搜索热榜 + 结合你的风格 → 推荐 5 个带评分的选题)
|
|
20
|
+
|
|
21
|
+
你:把第 2 个写成笔记
|
|
22
|
+
AutoCrew:(按你的写作风格生成 → 自动检查敏感词 → 输出标题备选 + hashtag)
|
|
23
|
+
|
|
24
|
+
你:太 AI 味了,改口语一点
|
|
25
|
+
AutoCrew:(去 AI 味处理 → 记录你的偏好 → 下次自动应用)
|
|
26
|
+
|
|
27
|
+
你:发到小红书
|
|
28
|
+
AutoCrew:(发布前 6 项检查 → 自动发布)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 快速开始
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g autocrew
|
|
37
|
+
autocrew init
|
|
38
|
+
autocrew research
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`init` 创建本地数据目录(`~/.autocrew/`),`research` 从公开来源发现热门选题。
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 核心功能
|
|
46
|
+
|
|
47
|
+
### 选题调研
|
|
48
|
+
- 从公开来源发现热门选题(知乎热榜、微博热搜、行业关键词)
|
|
49
|
+
- 基于你的领域和受众自动评分
|
|
50
|
+
- 灵感源监控管道
|
|
51
|
+
|
|
52
|
+
### 内容写作
|
|
53
|
+
- 风格校准 -- 4 阶段深度校准,学习你的表达方式
|
|
54
|
+
- Hook-Body-CTA-Title 结构,针对中文社媒优化
|
|
55
|
+
- 多平台改写 -- 同一选题生成小红书版、抖音版,各自独立
|
|
56
|
+
|
|
57
|
+
### 内容审核
|
|
58
|
+
- 敏感词扫描(内置词库 + 平台特定限流词)
|
|
59
|
+
- 去 AI 味(去除 AI 生成痕迹)
|
|
60
|
+
- 质量评分:信息密度、hook 强度、CTA 清晰度
|
|
61
|
+
|
|
62
|
+
### 发布
|
|
63
|
+
- 支持平台:小红书、抖音、微信视频号、微信公众号、B站
|
|
64
|
+
- 发布前 6 项自动检查
|
|
65
|
+
- 封面生成 + A/B/C 候选审核
|
|
66
|
+
|
|
67
|
+
### 学习循环
|
|
68
|
+
- 自动记录你的每次修改
|
|
69
|
+
- 同类修改累积 5 次后,自动提炼为写作规则
|
|
70
|
+
- 下次写作时自动应用
|
|
71
|
+
|
|
72
|
+
### Web 控制台
|
|
73
|
+
- 内置 Web UI,可视化管理内容
|
|
74
|
+
- 文案编辑器 + 时间轴式视频制作
|
|
75
|
+
- 支持导出剪映工程文件
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 运行原理
|
|
80
|
+
|
|
81
|
+
AutoCrew 完全运行在你的本地机器上。所有内容、草稿、创作者档案都存储在 `~/.autocrew/`,不会上传任何数据。
|
|
82
|
+
|
|
83
|
+
核心是独立的 Node.js CLI,包含 20+ 工具和 15+ 技能。薄薄的插件层让它可以作为 Claude Code MCP 服务器或 OpenClaw 扩展使用 -- 但不依赖任何一个。
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
~/.autocrew/
|
|
87
|
+
├── creator-profile.json # 创作者档案(领域、受众、写作规则)
|
|
88
|
+
├── STYLE.md # 写作风格档案
|
|
89
|
+
├── topics/ # 选题库
|
|
90
|
+
├── contents/ # 内容项目
|
|
91
|
+
│ └── content-xxx/
|
|
92
|
+
│ ├── meta.json # 元数据 + 状态 + 素材索引
|
|
93
|
+
│ ├── draft.md # 当前草稿
|
|
94
|
+
│ ├── timeline.json # 视频时间轴
|
|
95
|
+
│ └── versions/ # 版本历史
|
|
96
|
+
└── learnings/ # 修改记录 + 提炼的写作规则
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 搭配 Claude Code 使用
|
|
102
|
+
|
|
103
|
+
在 Claude Code 设置中添加 MCP 服务器:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"mcpServers": {
|
|
108
|
+
"autocrew": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["tsx", "/path/to/AutoCrew/mcp/server.ts"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
然后直接用自然语言对话 -- "帮我找选题"、"写成小红书笔记"、"去 AI 味"。
|
|
117
|
+
|
|
118
|
+
## 搭配 OpenClaw 使用
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
openclaw plugins install autocrew
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
安装后直接在 OpenClaw 对话里使用,无需额外配置。
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## CLI 命令
|
|
129
|
+
|
|
130
|
+
| 命令 | 说明 |
|
|
131
|
+
|------|------|
|
|
132
|
+
| `autocrew init` | 初始化数据目录和创作者档案 |
|
|
133
|
+
| `autocrew status` | 流水线概览 |
|
|
134
|
+
| `autocrew research` | 发现热门选题 |
|
|
135
|
+
| `autocrew topics` | 列出选题 |
|
|
136
|
+
| `autocrew start <topic>` | 从选题开始创作 |
|
|
137
|
+
| `autocrew contents` | 列出内容项目 |
|
|
138
|
+
| `autocrew humanize <id>` | 去 AI 味 |
|
|
139
|
+
| `autocrew adapt <id> <platform>` | 平台改写 |
|
|
140
|
+
| `autocrew review <id>` | 内容审核(敏感词 + 质量) |
|
|
141
|
+
| `autocrew pre-publish <id>` | 发布前 6 项检查 |
|
|
142
|
+
| `autocrew profile` | 查看创作者档案 |
|
|
143
|
+
| `autocrew learn <id> --signal edit --feedback "太正式了"` | 记录反馈 |
|
|
144
|
+
| `autocrew intel` | 灵感源管理 |
|
|
145
|
+
|
|
146
|
+
运行 `autocrew --help` 查看完整命令列表。
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Free vs Pro
|
|
151
|
+
|
|
152
|
+
| 功能 | Free | Pro |
|
|
153
|
+
|------|------|-----|
|
|
154
|
+
| 选题调研 | 公开搜索(知乎/微博热榜) | + 对标账号爬取 + 平台热榜 |
|
|
155
|
+
| 内容写作 | 完整工作流 | 完整工作流 |
|
|
156
|
+
| 去 AI 味 | 支持 | 支持 |
|
|
157
|
+
| 敏感词检测 | 支持 | 支持 |
|
|
158
|
+
| 平台改写 | 小红书 + 抖音 | + 公众号 + B站 |
|
|
159
|
+
| 封面生成 | 3:4 | + 16:9 + 4:3 |
|
|
160
|
+
| 发布 | 小红书 + 抖音 | 全平台 |
|
|
161
|
+
| 风格校准 | 支持 | 支持 |
|
|
162
|
+
| 学习循环 | 支持 | 支持 |
|
|
163
|
+
| 对标账号监控 | 不支持 | 支持 |
|
|
164
|
+
| 视频 ASR 提取 | 不支持 | 支持 |
|
|
165
|
+
| 数据分析报告 | 不支持 | 支持 |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 开发
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
git clone https://github.com/alextangson/AutoCrew.git
|
|
173
|
+
cd AutoCrew
|
|
174
|
+
npm install
|
|
175
|
+
npm test # 341 个测试
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
启动 Web 控制台开发模式:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
cd web && npm run dev
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
参见 [CONTRIBUTING.md](CONTRIBUTING.md) 了解贡献指南。
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
MIT © [alextangson](https://github.com/alextangson)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutoCrew — thin OpenClaw plugin adapter.
|
|
3
|
+
*
|
|
4
|
+
* Bridges the standalone AutoCrew runtime to OpenClaw's plugin API.
|
|
5
|
+
* All logic lives in src/ — this file only does registration + system prompt injection.
|
|
6
|
+
*/
|
|
7
|
+
import { bootstrap } from "../../src/cli/bootstrap.js";
|
|
8
|
+
import type { PluginConfig } from "../../src/runtime/context.js";
|
|
9
|
+
|
|
10
|
+
const autocrewPlugin = {
|
|
11
|
+
id: "autocrew",
|
|
12
|
+
name: "AutoCrew",
|
|
13
|
+
description:
|
|
14
|
+
"AI content operations crew — automated research, writing, and publishing pipeline for Chinese social media.",
|
|
15
|
+
configSchema: {
|
|
16
|
+
type: "object" as const,
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
properties: {
|
|
19
|
+
data_dir: { type: "string" as const },
|
|
20
|
+
pro_api_key: { type: "string" as const },
|
|
21
|
+
pro_api_url: { type: "string" as const },
|
|
22
|
+
gateway_url: { type: "string" as const },
|
|
23
|
+
gemini_api_key: { type: "string" as const },
|
|
24
|
+
gemini_model: { type: "string" as const },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
register(api: any, config?: PluginConfig) {
|
|
29
|
+
const { runner } = bootstrap(config);
|
|
30
|
+
|
|
31
|
+
// Bridge tools to OpenClaw API
|
|
32
|
+
for (const def of runner.getTools()) {
|
|
33
|
+
api.registerTool(
|
|
34
|
+
() => ({
|
|
35
|
+
name: def.name,
|
|
36
|
+
label: def.label,
|
|
37
|
+
description: def.description,
|
|
38
|
+
parameters: def.parameters,
|
|
39
|
+
async execute(_id: string, params: Record<string, unknown>) {
|
|
40
|
+
return runner.execute(def.name, params);
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
{ names: [def.name] },
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// System prompt injection
|
|
48
|
+
if (typeof api.on === "function") {
|
|
49
|
+
api.on("before_prompt_build", (event: any) => {
|
|
50
|
+
event.appendSystemContext = `
|
|
51
|
+
<autocrew_instructions>
|
|
52
|
+
你现在已加载 AutoCrew 插件。在帮助用户创作内容时,遵循以下规则:
|
|
53
|
+
|
|
54
|
+
1. **先拆解再执行**:收到复杂请求时(如"帮我写一篇小红书"),先调用 autocrew_pipeline templates 展示完整步骤,用户确认后再逐步执行。
|
|
55
|
+
2. **文件优先**:所有内容产出必须通过 autocrew_content save 保存到 ~/.autocrew/,不要只输出到聊天里。用户需要在下次会话中找到之前的产出。
|
|
56
|
+
3. **完成后汇报**:每步完成后说明做了什么、结果是什么、下一步是什么。不要只说"完成了"。
|
|
57
|
+
4. **使用已有工具**:优先使用 autocrew_* 系列工具完成任务,而不是手动操作文件。工具链:研究(autocrew_research) → 创建选题(autocrew_topic) → 写稿(autocrew_content save) → 去AI化(autocrew_humanize) → 审核(autocrew_review) → 封面(autocrew_cover_review) → 预发布检查(autocrew_pre_publish) → 发布(autocrew_publish)。
|
|
58
|
+
5. **风格校准**:写内容前检查 ~/.autocrew/STYLE.md,确保产出符合用户的写作风格。
|
|
59
|
+
6. **标题硬限制**:所有选题标题必须 ≤20 个中文字符(含标点符号和 emoji)。这是小红书等平台的硬性限制。超过 20 字的标题必须重写,不能截断。生成选题时,加载 skills/title-craft 方法论来指导标题创作。
|
|
60
|
+
7. **去AI味+审核自动执行**:写完内容后,自动运行 autocrew_humanize(去AI味)和 autocrew_review(审核),不要问用户"要不要去AI味"或"要不要审核"——直接做。这是质量底线,不是可选功能。
|
|
61
|
+
8. **告知文件位置**:保存内容后,必须告诉用户文件保存在哪里以及如何打开。格式:「📄 内容已保存到:~/.autocrew/contents/{id}/draft.md」+ 打开方式。
|
|
62
|
+
</autocrew_instructions>`;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default autocrewPlugin;
|
package/bin/autocrew.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AutoCrew CLI entry point.
|
|
5
|
+
* Uses tsx to run TypeScript directly — no build step needed.
|
|
6
|
+
*/
|
|
7
|
+
import { execFileSync } from "node:child_process";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
|
|
11
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const entry = path.join(__dirname, "autocrew.ts");
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
execFileSync(
|
|
16
|
+
path.join(__dirname, "..", "node_modules", ".bin", "tsx"),
|
|
17
|
+
[entry, ...process.argv.slice(2)],
|
|
18
|
+
{ stdio: "inherit", cwd: path.join(__dirname, "..") }
|
|
19
|
+
);
|
|
20
|
+
} catch (err) {
|
|
21
|
+
// tsx exits with the child's exit code — just forward it
|
|
22
|
+
process.exitCode = err.status ?? 1;
|
|
23
|
+
}
|
package/bin/autocrew.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { bootstrap } from "../src/cli/bootstrap.js";
|
|
3
|
+
import { run } from "../src/cli/index.js";
|
|
4
|
+
import { showBanner } from "../src/cli/banner.js";
|
|
5
|
+
|
|
6
|
+
const { runner, ctx, eventBus } = bootstrap();
|
|
7
|
+
|
|
8
|
+
// Show banner for interactive use (not for subcommands that pipe output)
|
|
9
|
+
if (process.argv.length <= 2 && process.stdout.isTTY) {
|
|
10
|
+
showBanner("0.1.0");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
await run(process.argv.slice(2), runner, ctx, eventBus);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "autocrew",
|
|
3
|
+
"name": "AutoCrew",
|
|
4
|
+
"description": "AI content operations crew — research, write, and publish on autopilot. Free: full workflow for XHS + Douyin. Pro: deep crawling, competitor monitoring, analytics, TTS, digital human.",
|
|
5
|
+
"skills": ["./skills"],
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"data_dir": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Local data directory (default: ~/.autocrew)"
|
|
13
|
+
},
|
|
14
|
+
"pro_api_key": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Pro API key for advanced features (deep crawling, competitor monitoring, analytics, TTS). Get one at autocrew.dev/activate"
|
|
17
|
+
},
|
|
18
|
+
"pro_api_url": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Pro API base URL (default: https://api.autocrew.dev)"
|
|
21
|
+
},
|
|
22
|
+
"gateway_url": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "OpenClaw Gateway URL for Chrome Relay browser control (default: http://127.0.0.1:18789)"
|
|
25
|
+
},
|
|
26
|
+
"gemini_api_key": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Gemini API key for cover image generation. Free at aistudio.google.com/apikey"
|
|
29
|
+
},
|
|
30
|
+
"gemini_model": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Image generation model: 'auto' (default, tries gemini-native then imagen-4), 'gemini-native', or 'imagen-4'"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "autocrew",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "One-person content studio powered by AI — from trending topics to published posts",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "alextangson",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/alextangson/AutoCrew.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/alextangson/AutoCrew#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/alextangson/AutoCrew/issues"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18.0.0"
|
|
18
|
+
},
|
|
19
|
+
"workspaces": [
|
|
20
|
+
"packages/*"
|
|
21
|
+
],
|
|
22
|
+
"bin": {
|
|
23
|
+
"autocrew": "./bin/autocrew.mjs"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"bin/",
|
|
27
|
+
"src/",
|
|
28
|
+
"adapters/",
|
|
29
|
+
"skills/",
|
|
30
|
+
"templates/",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"README.md",
|
|
33
|
+
"README_CN.md",
|
|
34
|
+
"HAMLETDEER.md",
|
|
35
|
+
"openclaw.plugin.json"
|
|
36
|
+
],
|
|
37
|
+
"keywords": [
|
|
38
|
+
"cli",
|
|
39
|
+
"ai-agent",
|
|
40
|
+
"content-creation",
|
|
41
|
+
"content-ops",
|
|
42
|
+
"automation",
|
|
43
|
+
"social-media",
|
|
44
|
+
"xiaohongshu",
|
|
45
|
+
"douyin",
|
|
46
|
+
"chinese-social-media",
|
|
47
|
+
"ai-writing",
|
|
48
|
+
"claude-code",
|
|
49
|
+
"mcp"
|
|
50
|
+
],
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@hono/node-server": "^1.19.12",
|
|
53
|
+
"@sinclair/typebox": "0.34.48",
|
|
54
|
+
"gray-matter": "^4.0.3",
|
|
55
|
+
"hono": "^4.12.10",
|
|
56
|
+
"js-yaml": "^4.1.1",
|
|
57
|
+
"rss-parser": "^3.13.0",
|
|
58
|
+
"tsx": "^4.19.0"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"test:watch": "vitest",
|
|
63
|
+
"prepublishOnly": "npm test"
|
|
64
|
+
},
|
|
65
|
+
"openclaw": {
|
|
66
|
+
"extensions": [
|
|
67
|
+
"./adapters/openclaw/index.ts"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/js-yaml": "^4.0.9",
|
|
72
|
+
"vitest": "^4.1.2"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: _writing-style
|
|
3
|
+
description: |
|
|
4
|
+
共享写作规范。被写作类 skill 引用,不直接由用户触发。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 写作风格规范
|
|
8
|
+
|
|
9
|
+
被 write-script、spawn-writer、remix-content 等写作 skill 加载为共享规范。
|
|
10
|
+
|
|
11
|
+
## Hook(只写一个 — 选最强的角度)
|
|
12
|
+
|
|
13
|
+
| 类型 | 什么时候用 |
|
|
14
|
+
|------|-----------|
|
|
15
|
+
| 痛点 | 受众有明显未解决的挫败感 |
|
|
16
|
+
| 悬念 | 话题存在反直觉的事实或惊人数据 |
|
|
17
|
+
| 理想态 | 话题卖一个令人向往的结果 |
|
|
18
|
+
| 情感共鸣 | 触及身份认同、归属感或理想自我 |
|
|
19
|
+
| 反差 | 普遍认知与现实之间有明显落差 |
|
|
20
|
+
|
|
21
|
+
选命中最狠的那一个类型。写 1-3 句。
|
|
22
|
+
|
|
23
|
+
**禁止**以下列方式开头:
|
|
24
|
+
- "哈喽大家好"
|
|
25
|
+
- "你有没有想过"
|
|
26
|
+
- 任何泛泛的问候或提问
|
|
27
|
+
|
|
28
|
+
## 正文结构
|
|
29
|
+
|
|
30
|
+
正文由 **信息点链** 组成(5-8 个)。
|
|
31
|
+
|
|
32
|
+
每个信息点遵循:**论点 → 为什么成立 → 具体例子或场景**。
|
|
33
|
+
|
|
34
|
+
规则:
|
|
35
|
+
- 每个信息点:80-150 字。正文总量:800-1500 字。
|
|
36
|
+
- 信息点渐进排列 — 不要把最好的放在最前面。
|
|
37
|
+
- 包含 1-2 个打破预期的转折。
|
|
38
|
+
- 包含 1-2 个互动钩子(提问、"你猜怎么着"、评论区引导)。
|
|
39
|
+
- **不写散文段落**。短句。一句一个意思。
|
|
40
|
+
|
|
41
|
+
## 结尾 CTA
|
|
42
|
+
|
|
43
|
+
- 1-2 句引导具体行动(收藏/评论/关注)。
|
|
44
|
+
- 必须与内容价值挂钩 — "收藏这条,下次用得上" 好过 "觉得有用就点赞"。
|
|
45
|
+
- 使用品牌 STYLE.md 中的语气。
|
|
46
|
+
|
|
47
|
+
## 标题(只写一个 — 最好的那个)
|
|
48
|
+
|
|
49
|
+
写标题前用 `web_search` 查目标平台 2-3 个热搜关键词。
|
|
50
|
+
|
|
51
|
+
标题规则:
|
|
52
|
+
- 自然嵌入 1 个热搜关键词。
|
|
53
|
+
- 制造好奇缺口或承诺一个具体结果。
|
|
54
|
+
- 15-25 字。可以加 emoji(如果确实加分的话)。
|
|
55
|
+
- 不做标题党 — 内容必须兑现承诺。
|
|
56
|
+
|
|
57
|
+
## 语气规则
|
|
58
|
+
|
|
59
|
+
- **去 AI 味**:短句、口语化、像人说话。
|
|
60
|
+
- **温暖非正式**:不端着,但有分寸。
|
|
61
|
+
- **专家但接地气**:有干货,但不掉书袋。
|
|
62
|
+
- **情绪优先于逻辑**:先打动,再说服。
|
|
63
|
+
|
|
64
|
+
## 输出格式
|
|
65
|
+
|
|
66
|
+
保存时:
|
|
67
|
+
- `title`:唯一最优标题(title 字段不带 emoji)。
|
|
68
|
+
- `body`:完整脚本纯文本。段落之间空行分隔。不使用 Markdown 标题。
|