Three-layer pipeline: pure script collection → multi-Agent parallel analysis → editor-in-chief synthesis → unified notification.
Trigger Words
- "/collect"
- "每日采集"
- "早报"
Execution Flow
Step 1: Run collection script
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
TODAY=$(date +%Y-%m-%d)
SAVE_DIR="$PROJECT_ROOT/1-Inbox/_collect/$TODAY"
node "$PROJECT_ROOT/.claude/skills/collect/scripts/collect.mjs" --save "$SAVE_DIR"
The script will run all collectors in parallel, output merged JSON to stdout, and at the same time save each source's raw JSON to $SAVE_DIR。
Step 2: Check collection status
Check one by one sources for each source in the array metadata.error:
token_expired(fxb) → Send Feishu red card notification:node "$PROJECT_ROOT/.claude/skills/tell-me/send.js" "风向标 Token 过期" "API 返回 success: false,请刷新 token。\n操作:跟 cc 说「刷新生财 token」即可自动完成" "red"token_expiring_soon(fxb, warning field) → Send Feishu yellow card alert:
Note: warning does not block the collection process; data is returned normally, it just sends an additional alert.node "$PROJECT_ROOT/.claude/skills/tell-me/send.js" "风向标 Token 即将过期" "剩余 {daysLeft} 天,{expireDate} 到期。\n操作:跟 cc 说「刷新生财 token」即可自动完成" "yellow"- Other errors → Record in the briefing, do not block the process
- All failed → Send error notification, terminate
Step 3: Parallel analysis (8 Agents each run independently)
Use Task toolto dispatch 8 subagents at the same time,send 8 Task calls in the same messageto achieve parallelism. Each agent independently analyzes one source and writes its own report.
Agent Configuration
| Agent | model | Read data | Analysis standards | Output report |
|---|---|---|---|---|
| fxb-analyst | sonnet | $SAVE_DIR/fxb.json |
analysis/fxb-analyst.md |
$SAVE_DIR/fxb-analysis.md |
| github-analyst | sonnet | $SAVE_DIR/gh-trending.json |
analysis/github-analyst.md |
$SAVE_DIR/github-analysis.md |
| tech-analyst | sonnet | $SAVE_DIR/tech-news.json |
analysis/tech-analyst.md |
$SAVE_DIR/tech-analysis.md |
| trends-analyst | sonnet | $SAVE_DIR/trends.json |
analysis/trends-analyst.md |
$SAVE_DIR/trends-analysis.md |
| xhs-analyst | sonnet | $SAVE_DIR/xhs.json |
analysis/xhs-analyst.md |
$SAVE_DIR/xhs-analysis.md |
| rss-ai-analyst | sonnet | $SAVE_DIR/rss-ai.json |
analysis/rss-ai-analyst.md |
$SAVE_DIR/rss-ai-analysis.md |
| rss-dev-analyst | sonnet | $SAVE_DIR/rss-dev.json |
analysis/rss-dev-analyst.md |
$SAVE_DIR/rss-dev-analysis.md |
| rss-startup-analyst | sonnet | $SAVE_DIR/rss-startup.json |
analysis/rss-startup-analyst.md |
$SAVE_DIR/rss-startup-analysis.md |
Prompt template for each Agent
你是 {源名} 分析师。请完成以下任务:
1. 读取分析标准:$PROJECT_ROOT/.claude/skills/collect/analysis/{source}-analyst.md
2. 读取原始数据:{$SAVE_DIR}/{source}.json
3. 按分析标准筛选和分析数据
4. 将分析报告写入:{$SAVE_DIR}/{source}-analysis.md
注意:
- 严格按 analyst.md 中的"报告输出格式"段写报告
- 报告要能独立阅读(包含日期、数据量等上下文)
- 如果数据为空或采集失败,写一份简短说明即可
For fxb agent, additional note: data has been filtered to yesterday's posts (~10-20 items), analyze all directly, no need to select.
Error Handling
- If an agent fails → the main window records the error, skips that source, and other sources proceed normally
- fxb's
metadata.erroristoken_expired→ that agent is not dispatched (Step 2 has already sent an alert)
Step 4: Editor-in-Chief Synthesis
After all agents are complete, the main window performs comprehensive analysis:
- Read
analysis/cross-source-rules.md(cross-source analysis methodology) - Read
analysis/synthesizer.md(editor-in-chief responsibilities and output format) - Read the previous day's briefing (for signal continuity judgment):
- Calculate yesterday's date, read
1-Inbox/_collect/{昨天}/briefing.md - if it does not exist, skip, and mark all signals as new signals
- Calculate yesterday's date, read
- Read the 8 independent reports in sequence:
$SAVE_DIR/fxb-analysis.md$SAVE_DIR/github-analysis.md$SAVE_DIR/tech-analysis.md$SAVE_DIR/trends-analysis.md$SAVE_DIR/xhs-analysis.md$SAVE_DIR/rss-ai-analysis.md$SAVE_DIR/rss-dev-analysis.md$SAVE_DIR/rss-startup-analysis.md
- Analyze according to the five-step method in cross-source-rules.md: entity extraction → correlation matrix → signal continuity → action grading → topic extraction
- Output the final briefing according to the synthesizer.md format (the beginning must have a "30-second quick read")
The analysis standards for each source are independently maintained in analysis/*.md:
| Analyst | file | Corresponding source |
|---|---|---|
| Trend Analyst | analysis/fxb-analyst.md |
fxb |
| GitHub Analyst | analysis/github-analyst.md |
gh-trending |
| Tech Community Analyst | analysis/tech-analyst.md |
tech-news |
| Domestic Hot Topics Analyst | analysis/trends-analyst.md |
trends |
| Xiaohongshu Analyst | analysis/xhs-analyst.md |
xhs |
| AI Frontier RSS Analyst | analysis/rss-ai-analyst.md |
rss-ai |
| Developer Tools RSS Analyst | analysis/rss-dev-analyst.md |
rss-dev |
| Startup Business RSS Analyst | analysis/rss-startup-analyst.md |
rss-startup |
| Comprehensive Analyst (Editor-in-Chief) | analysis/synthesizer.md |
Cross-source summary |
aster can adjust the analysis criteria for a single source independently, without affecting other sources.
Step 5: Save the briefing
Write the analysis result to 1-Inbox/_collect/{YYYY-MM-DD}/briefing.md:
# 每日简报 | {YYYY-MM-DD}
## 概览
- 风向标:{X} 条(筛选后 {Y} 条命中,精选 {Z} 条)
- GitHub Trending:{X} 个项目(AI 相关 {Y} 个)
- 多平台热点:{X} 条
## 风向标 Top N
### 1. {一句话总结}
- **作者**:xxx | **互动**:👍{likes} 💬{comments}
- **核心观点**:...
- **启发**:...
### 2. ...
## GitHub Trending 精选
### {author/name} — {一句话定位}
- **语言**:{lang} | **今日**:+{todayStars}
- **核心价值**:...
- **启发**:...
## 热点速览
| 平台 | 热点 |
|------|------|
| 微博 | {top1} |
| 知乎 | {top1} |
| ... | ... |
## 趋势洞察
1. ...
2. ...
Step 6: Feishu notification
Push the complete contents of briefing.md to Feishu (--file mode to read the file):
node "$PROJECT_ROOT/.claude/skills/tell-me/send.js" \
"每日简报 | {YYYY-MM-DD}" \
--file "$SAVE_DIR/briefing.md" \
blue
After a successful push, leave a marker so it is easy to trace "this day was already pushed to Feishu":
touch "$SAVE_DIR/feishu-sent.flag"
Optional parameters
Run only some collectors:
node "$PROJECT_ROOT/.claude/skills/collect/scripts/collect.mjs" --sources fxb,gh-trending
Add a new source
- Copy
collectors/_template.mjs, rename it to{source}.mjs - Implement the collection logic +
formatExtractfunction (--extractmode) - If the data volume is large (>20 items or contains long articles), add
--indexmode - Done. The coordinator discovers it automatically; small sources do not require changing SKILL.md
Collector autonomy standard
Each collector is an autonomous unit and contains three modes:
| Mode | Required? | Description |
|---|---|---|
| Collect (default) | Required | Fetch data, output JSON |
--extract <json> <idx,...|all> |
Required | Extract by index (or all all), output markdown |
--index <json> |
Optional | Generate a compact index when the data volume is large |
The common function is in lib/fetcher.mjs:extractItems(jsonPath, indices, formatFn, name) handles reading JSON + iterating over indices + bounds checking. Each collector only needs to provide its own formatExtract function.
File structure
.claude/skills/collect/
├── SKILL.md
├── analysis/ # 各源分析师 prompt(独立可调)
│ ├── fxb-analyst.md
│ ├── github-analyst.md
│ ├── tech-analyst.md
│ ├── trends-analyst.md
│ ├── xhs-analyst.md
│ ├── rss-ai-analyst.md # AI 前沿 RSS 分析师
│ ├── rss-dev-analyst.md # 开发者工具 RSS 分析师
│ ├── rss-startup-analyst.md # 创业商业 RSS 分析师
│ └── synthesizer.md # 综合分析师(跨源汇总)
└── scripts/
├── collect.mjs # 协调器
├── collectors/
│ ├── fxb.mjs # 风向标(只采昨天)+ --index + --extract
│ ├── gh-trending.mjs # GitHub Trending + --extract
│ ├── tech-news.mjs # 海外技术社区(HN/PH/V2EX)+ --extract
│ ├── trends.mjs # 国内热点(微博/知乎/抖音)+ --extract
│ ├── xhs.mjs # 小红书热点 + --extract
│ ├── rss-ai.mjs # AI 前沿 RSS + --extract + --index
│ ├── rss-dev.mjs # 开发者工具 RSS + --extract
│ ├── rss-startup.mjs # 创业商业 RSS + --extract + --index
│ └── _template.mjs # 新源模板
└── lib/
├── fetcher.mjs # 共享工具(HTTP + extractItems)
└── rss-parser.mjs # RSS/Atom 解析(fetchFeed + fetchFeeds)