Tradingagents Cn Skill
CLAWHUB · Unverified
股票多智能体分析报告生成。通过 6 个分析师串行分析 + 多空辩论 + 交易计划 + 风险评估, 生成专业 PDF 报告。触发场景:用户要求分析股票、生成股票报告、提供截图或代码进行分析、 询问买卖建议、要求技术分析或基本面分析或风险评估。 Skill: Tradingagents Cn Skill Owner: tanteng Summary: 股票多智能体分析报告生成。通过 6 个分析师串行分析 + 多空辩论 + 交易计划 + 风险评估, 生成专业 PDF 报告。触发场景:用户要求分析股票、生成股票报告、提供截图或代码进行分析、 询问买卖建议、要求技术分析或基本面分析或风险评估。 Tags: latest:2.0.1, multi-agent:1.0.4, stock-analysis:1.0.4, trading:1.0.4 Version history: v2.0.1 | 2026-05-18T17:01:25.829Z | user 2.0.1: - 修复 trader 步骤验证逻辑:decision=持有/观望 时 buy_price/target_price/stop_loss 允许为 null - generate_report.py: 加了 mo
- 62
- Rank
- 84
- Safety
- 1.4k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 10, 2026
- Adoption signal
- 1.4K downloadsadoption · Oct 10, 2026
- Latest release
- 2.0.1release · May 18, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 2.0.1release
2.0.1: - 修复 trader 步骤验证逻辑:decision=持有/观望 时 buy_price/target_price/stop_loss 允许为 null - generate_report.py: 加了 moderate→neutral 自动兼容 - pdf_generator.py: 修复 position_size=0% 显示为'观望'而非'数据获取失败' - fundamentals_prompt.md: 重写估值分析示例,明确要求中文键名(当前市盈率/P/E、同业比较、PEG指标等) - SKILL.md Step 10: 补充说明持有/观望时价格字段允许 null - 清理所有测试产物(reports/ logs/ __pycache__/)
Observed May 18, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s17arxxkc5tdc79a7pbqxxapad83jnyw:tradingagents-cn-skill- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-tanteng-tradingagents-cn-skill/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
111,064 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: tradingagents-cn-skill
version: 2.0.0
description: >
股票多智能体分析报告生成。通过 6 个分析师串行分析 + 多空辩论 + 交易计划 + 风险评估,
生成专业 PDF 报告。触发场景:用户要求分析股票、生成股票报告、提供截图或代码进行分析、
询问买卖建议、要求技术分析或基本面分析或风险评估。
metadata:
openclaw:
emoji: "📊"
requires:
bins: ["python3"]
---
# TradingAgents-CN Skill
多智能体股票分析框架。Agent 串行完成 12 步分析,每步调用 LLM 并通过脚本验证输出,最终生成 PDF 报告。
## 全局规则
### 重试协议
每次 LLM 调用后,**必须**通过 `validate_step.py` 验证输出:
```bash
echo '<LLM原始输出>' | python3 {baseDir}/scripts/validate_step.py --step <步骤名> --stock-code <股票代码> --attempt <次数>
```
**处理规则:**
- `exit 0` → stdout 是清洗后的 JSON,保存结果,进入下一步
- `exit 1` → stderr 是 JSON 错误信息(含 `hint` 字段),将 hint 追加到 prompt 重新调用 LLM
- 关键步骤(bull、bear、manager、trader、risk_manager)最多重试 **3 次**
- 次要步骤(tech、fundamentals、news、social、debate、risk_debate)最多重试 **2 次**
- 超过重试上限 → 获取默认值继续:
```bash
python3 {baseDir}/scripts/validate_step.py --step <步骤名> --default
```
**重试时的 prompt 追加格式:**
```
注意:上次输出格式有误。{hint}。请严格按纯 JSON 格式返回,不要用 markdown 代码块包裹。
```
### 日志
分析开始前,设置日志环境变量,确保同一次分析的所有步骤写入同一日志文件:
```bash
export TRADINGAGENTS_LOG_FILE="{baseDir}/scripts/logs/{股票代码}_{YYYYMMDD}_{HHMMSS}.log"
mkdir -p {baseDir}/scripts/logs
```
分析结束后,告知用户日志文件路径。
### 语言要求
所有 LLM 调用的 system_prompt 和 user_message 使用**中文**。所有分析内容使用**中文**输出。
---
## 工作流程
```
Step 1A: 获取原始文本(截图 → OCR / 文字 → 直接使用)
Step 1B: 结构化提取 LLM → validate → stock_data JSON
Step 2: web_search 获取新闻 → news_data
Step 3: 多头分析师 LLM → validate → bull_analyst
Step 4: 空头分析师 LLM → validate → bear_analyst
Step 5: 技术分析师 LLM → validate → tech_analyst
Step 6: 基本面分析师 LLM → validate → fundamentals_analyst
Step 7: 新闻分析师 LLM → validate → news_analyst
Step 8: 社交媒体分析师 LLM → validate → social_analyst
Step 9: 多空辩论 + 研究经理决策 LLM → validate → debate + manager_decision
Step 10: 交易员计划 LLM → validate → trading_plan
Step 11: 风险辩论 + 风险经理评估 LLM → validate → risk_debate + final_decision
Step 12: 组装 JSON → 生成 PDF
```
---
## Step 1A: 获取原始文本
根据用户输入类型,获取原始文本:
**情况 1:用户提供截图/图片**
- 调用 OCR MCP tool(如 `image-ocr`)或 Agent 内建的图片识别能力
- 将识别结果作为原始文本
- 截图可能包含:K 线图、技术指标面板、财报数据、交易软件截图等
**情况 2:用户提供文字描述**
- 直接使用用户提供的文字作为原始文本
**情况 3:用户只提供股票代码/名称**
- 将股票代码和名称作为原始文本,后续步骤会通过 web_search 补充数据
---
## Step 1B: 结构化数据提取
**LLM 调用:**
- system_prompt:
```
你是股票数据提取专家。从用户提供的文本(可能来自截图OCR、交易软件、财报等)中,
提取结构化的股票数据。只提取文本中明确存在的信息,缺失的字段设为 null。
不要虚构或推测任何数据。以纯 JSON 格式返回。
```
- user_message:
```
请从以下文本中提取股票数据,以纯 JSON 格式返回:
{原始文本}
要求返回的 JSON 格式:
{
"stock_code": "股票代码(如 PDD、600519、HK.00700)",
"stock_name": "股票名称",
"current_price": 数字或null,
"change_pct": "涨跌幅字符串或null",
"volume": "成交量或null",
"turnover": "成交额或null",
"technical_indicators": {
"MA5": 数字或null,
"MA10": 数字或null,
"MA20": 数字或null,
"MA60": 数字或null,
"RSI": 数字或null,
"MACD": "描述或null",
"KDJ": "描述或null",
"BOLL_upper": 数字或null,
"BOLL_mid": 数字或null,
"BOLL_lower": 数字或null
},
"fundamentals": {
"PE": 数字或null,
"PB": 数字或null,
"ROE": "字符串或null",
"marREADME.md
# tradingagents-cn-skill
基于 OpenClaw Skill 框架的股票分析工具,通过多智能体辩论机制生成专业股票分析 PDF 报告。
## 架构
**Agent 驱动模式**:所有 LLM 调用由 Agent 框架完成,脚本只负责 JSON 验证和 PDF 生成。
```
Agent (串行 12 步 LLM 调用)
│
├── validate_step.py (每步验证 JSON + 日志)
│
└── generate_report.py (最终生成 PDF)
```
## 功能特性
- **6 个专业分析师**:多头 / 空头 / 技术 / 基本面 / 新闻 / 社交媒体
- **辩论决策机制**:研究经理主持多空辩论,给出买入/卖出/持有决策
- **交易计划制定**:包含目标价位和仓位建议
- **三方风险评估**:激进/中性/保守三派辩论
- **专业 PDF 报告**:生成完整分析报告
- **自动重试**:LLM 输出验证失败时自动重试,带错误提示
- **完善日志**:每步输入/输出/验证结果均记录到日志文件
## 文件结构
```
tradingagents-cn-skill/
├── SKILL.md # Skill 定义(Agent 12 步流程)
├── README.md # 本文件
├── _meta.json # 元数据
├── references/ # 各角色 Prompt 文件
│ ├── bull_prompt.md
│ ├── bear_prompt.md
│ ├── tech_prompt.md
│ ├── fundamentals_prompt.md
│ ├── news_prompt.md
│ ├── social_prompt.md
│ ├── manager_prompt.md
│ ├── trader_prompt.md
│ ├── risk_debate_prompt.md
│ ├── risk_manager_prompt.md
│ └── data_schema.md
├── scripts/
│ ├── validate_step.py # JSON 验证 + 日志工具
│ ├── generate_report.py # PDF 生成入口
│ ├── pdf_generator.py # PDF 生成核心
│ └── logs/ # 分析日志目录
└── assets/ # 静态资源
```
## 工作流程
```
Step 1: 解析输入 → text_description
Step 2: web_search 获取新闻 → news_data
Step 3: 多头分析师 → validate → bull_analyst
Step 4: 空头分析师 → validate → bear_analyst
Step 5: 技术分析师 → validate → tech_analyst
Step 6: 基本面分析师 → validate → fundamentals_analyst
Step 7: 新闻分析师 → validate → news_analyst
Step 8: 社交媒体分析师 → validate → social_analyst
Step 9: 多空辩论 + 研究经理决策 → validate
Step 10: 交易员计划 → validate
Step 11: 风险辩论 + 风险经理评估 → validate
Step 12: 组装 JSON → 生成 PDF
```
## 调试
### CLI 触发完整流程
```bash
openclaw agent --message "分析一下 PDD" --verbose on --json
```
### 单步验证测试
```bash
echo '{"bull_detail":{"core_logic":"test","bull_case":["point1"]}}' | python3 scripts/validate_step.py --step bull_analyst
```
### 获取默认值
```bash
python3 scripts/validate_step.py --step bull_analyst --default
```
### 日志查看
```bash
cat scripts/logs/latest.log
```
## 版本历史
- **v2.0.0** — 统一为 Agent 驱动模式,新增 validate_step.py,删除独立 LLM 调用脚本
- **v1.1.0** — 六分析师并行执行优化,JSON 解析重试机制_meta.json
{
"ownerId": "kn79n3vq8h276qmrnphaxxngcn825xnx",
"slug": "tradingagents-cn-skill",
"version": "2.0.1",
"publishedAt": 1779123685829
}references/bear_prompt.md
# 空头分析师 Prompt
## 角色
你是一位资深的空头分析师,专注于发现股票的投资风险。
## 任务
基于输入的股票信息,论证不投资或减仓的理由,强调风险和负面指标。
## 分析框架
1. **估值风险**
- 当前PE/PB是否高于行业平均?
- 相比历史区间是否处于高位?
2. **下行风险**
- 是否有盈利下调风险?
- 是否有估值杀跌的可能?
3. **技术面警示**
- 均线是否空头排列?
- 是否有破位下行风险?
4. **基本面恶化**
- 毛利率是否下降?
- 现金流是否紧张?
- 负债率是否过高?
5. **风险事件**
- 行业政策利空?
- 竞争加剧?
- 管理层变动?
## 输出格式(JSON)
返回以下 JSON 格式,**不要返回 Markdown**:
```json
{
"core_logic": "核心逻辑(1-2句话总结为何看空或不利于投资)",
"bear_case": ["论点1(要有数据支撑)", "论点2(要有数据支撑)", "论点3(要有数据支撑)"],
"valuationrisk": "估值风险描述",
"downside_risk": "下行风险描述",
"technical_alert": "技术面警示描述",
"fundamental_concerns": "基本面恶化描述",
"risk_events": "可能导致下跌的具体事件或因素",
"confidenceindex": 0.65
}
```
**注意**:
- `bear_case` 是数组,包含 3-5 个论点
- `confidenceindex` 是 0-1 之间的浮点数,表示看空信心
- 所有字段都是字符串
- 不要返回 Markdown 格式,直接返回 JSON
## 语言要求
- 使用**中文**输出
- 保持专业、客观
- 论证要有数据支撑references/bull_prompt.md
# 多头分析师 Prompt
## 角色
你是一位资深的多头分析师,专注于发现股票的投资价值。
## 任务
基于输入的股票信息,构建买入论证,强调增长潜力和积极指标。
## 分析框架
1. **估值优势**
- 当前PE/PB是否低于行业平均?
- 相比历史区间是否处于低位?
2. **增长动能**
- 营收/利润增速如何?
- 是否有新增长点(新产品、新市场、新业务)?
3. **技术面支撑**
- 均线是否多头排列?
- 成交量是否配合放大?
4. **基本面改善**
- 毛利率是否提升?
- 现金流是否健康?
- 负债率是否可控?
5. **催化剂**
- 即将发布的财报?
- 行业政策利好?
- 市场份额提升?
## 输出格式(JSON)
返回以下 JSON 格式,**不要返回 Markdown**:
```json
{
"core_logic": "核心逻辑(1-2句话总结为何看多)",
"bull_case": ["论点1(要有数据支撑)", "论点2(要有数据支撑)", "论点3(要有数据支撑)"],
"risk_alert": "多头观点下需要注意的风险",
"confidenceindex": 0.75
}
```
**注意**:
- `bull_case` 是数组,包含 3-5 个论点
- `confidenceindex` 是 0-1 之间的浮点数,表示看多信心
- `core_logic` 和 `risk_alert` 是字符串
- 不要返回 Markdown 格式,直接返回 JSON
## 语言要求
- 使用**中文**输出
- 保持专业、客观
- 论证要有数据支撑AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-tanteng-tradingagents-cn-skill. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about Tradingagents Cn Skill. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-tanteng-tradingagents-cn-skill, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/tanteng/skills/tradingagents-cn-skill",
"sourceUrl": "https://clawhub.ai/tanteng/skills/tradingagents-cn-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T14:07:53.173Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tanteng-tradingagents-cn-skill/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tanteng-tradingagents-cn-skill/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T14:07:53.173Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.4K downloads",
"href": "https://clawhub.ai/tanteng/tradingagents-cn-skill",
"sourceUrl": "https://clawhub.ai/tanteng/tradingagents-cn-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T14:07:53.173Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.0.1",
"href": "https://clawhub.ai/tanteng/tradingagents-cn-skill",
"sourceUrl": "https://clawhub.ai/tanteng/tradingagents-cn-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-18T17:01:25.829Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tanteng-tradingagents-cn-skill/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tanteng-tradingagents-cn-skill/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.0.1",
"description": "2.0.1: - 修复 trader 步骤验证逻辑:decision=持有/观望 时 buy_price/target_price/stop_loss 允许为 null - generate_report.py: 加了 moderate→neutral 自动兼容 - pdf_generator.py: 修复 position_size=0% 显示为'观望'而非'数据获取失败' - fundamentals_prompt.md: 重写估值分析示例,明确要求中文键名(当前市盈率/P/E、同业比较、PEG指标等) - SKILL.md Step 10: 补充说明持有/观望时价格字段允许 null - 清理所有测试产物(reports/ logs/ __pycache__/)",
"href": "https://clawhub.ai/tanteng/tradingagents-cn-skill",
"sourceUrl": "https://clawhub.ai/tanteng/tradingagents-cn-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-18T17:01:25.829Z",
"isPublic": true
}
]
}Record generated Nov 23, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-tanteng-tradingagents-cn-skill/run-check
