Skip to content

Commit c38b3d4

Browse files
author
JinQian
committed
Sharpen CyberHuaTuo public error-doctor entry
1 parent 593786c commit c38b3d4

15 files changed

Lines changed: 518 additions & 28 deletions

.agents/plugins/marketplace.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cyberhuatuo",
3-
"description": "CyberHuaTuo Codex plugin marketplace for AI-agent debugging workflows, MCP tools, and soul-ring contribution loops.",
3+
"description": "CyberHuaTuo Codex plugin marketplace for paste-a-traceback AI-agent diagnosis, MCP tools, and reusable prescriptions.",
44
"interface": {
55
"displayName": "CyberHuaTuo Plugins"
66
},
@@ -18,8 +18,8 @@
1818
"category": "Developer Tools",
1919
"interface": {
2020
"displayName": "CyberHuaTuo Plugin",
21-
"shortDescription": "Diagnose AI-agent errors and route real fixes into the First Soul Ring loop.",
22-
"longDescription": "CyberHuaTuo bundles a Codex skill and an MCP server for diagnosing AI-agent, MCP, LangChain, CrewAI, LlamaIndex, OpenAI SDK, and frontend framework failures using a curated public prescription knowledge base.",
21+
"shortDescription": "Paste AI-agent tracebacks and get root cause, exact fixes, and verification steps.",
22+
"longDescription": "CyberHuaTuo bundles a Codex skill and an MCP server for diagnosing AI-agent, MCP, LangChain, CrewAI, LlamaIndex, OpenAI SDK, and frontend framework failures using a curated public prescription knowledge base. Real fixes can still flow into the First Soul Ring contribution loop after the error is cured.",
2323
"developerName": "CyberHuaTuo Contributors",
2424
"capabilities": [
2525
"MCP",

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cyberhuatuo",
3-
"description": "CyberHuaTuo Claude Code plugin marketplace for AI-agent debugging workflows, MCP tools, and soul-ring contribution loops.",
3+
"description": "CyberHuaTuo Claude Code plugin marketplace for paste-a-traceback AI-agent diagnosis, MCP tools, and reusable prescriptions.",
44
"owner": {
55
"name": "CyberHuaTuo Contributors",
66
"url": "https://github.com/JinNing6/CyberHuaTuo-Plugin"
@@ -10,7 +10,7 @@
1010
"name": "cyberhuatuo-plugin",
1111
"source": "./",
1212
"version": "0.2.1",
13-
"description": "Diagnose AI-agent and coding framework failures, search reusable prescriptions, and join the First Soul Ring contribution ladder.",
13+
"description": "Paste AI-agent tracebacks to get root cause, exact fixes, verification steps, reusable prescriptions, and an optional First Soul Ring contribution path after the cure.",
1414
"category": "Developer Tools",
1515
"keywords": [
1616
"mcp",

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cyberhuatuo-plugin",
33
"version": "0.2.1",
4-
"description": "CyberHuaTuo diagnostic workflows, MCP tools, and agent skills for AI agent and coding framework failures.",
4+
"description": "Paste AI-agent tracebacks and get root cause, exact fixes, verification steps, and reusable prescriptions through CyberHuaTuo MCP tools and agent skills.",
55
"author": {
66
"name": "CyberHuaTuo"
77
},

.codex-plugin/plugin.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cyberhuatuo-plugin",
33
"version": "0.2.1",
4-
"description": "CyberHuaTuo diagnostic workflows for AI agent and coding framework failures.",
4+
"description": "Paste AI-agent tracebacks and get root cause, exact fixes, verification steps, and reusable prescriptions.",
55
"author": {
66
"name": "CyberHuaTuo"
77
},
@@ -19,8 +19,8 @@
1919
"mcpServers": "./.mcp.json",
2020
"interface": {
2121
"displayName": "CyberHuaTuo Plugin",
22-
"shortDescription": "Diagnose AI agent and coding framework failures.",
23-
"longDescription": "CyberHuaTuo bundles a Codex skill and an MCP server for diagnosing AI agent, MCP, LangChain, CrewAI, LlamaIndex, OpenAI SDK, and frontend framework failures using a curated public prescription knowledge base.",
22+
"shortDescription": "Paste tracebacks and get exact AI-agent fixes.",
23+
"longDescription": "CyberHuaTuo bundles a Codex skill and an MCP server for paste-a-traceback diagnosis across AI agent, MCP, LangChain, CrewAI, LlamaIndex, OpenAI SDK, and frontend framework failures using a curated public prescription knowledge base.",
2424
"developerName": "CyberHuaTuo",
2525
"category": "Developer Tools",
2626
"capabilities": [
@@ -30,7 +30,7 @@
3030
],
3131
"brandColor": "#00D09C",
3232
"defaultPrompt": [
33-
"Diagnose this traceback with CyberHuaTuo.",
33+
"Paste this traceback into CyberHuaTuo and return the root cause, exact fix, and verification command.",
3434
"Search CyberHuaTuo for this framework error.",
3535
"Run a security checkup on this agent code."
3636
]

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,36 @@
1616
<em>你的 AI 生病了?推门而入。别人诊断不了的,我们药到病除。</em>
1717
</p>
1818

19+
---
20+
21+
## 🚨 Emergency Room: Paste The Traceback First
22+
23+
**AI Agent Error Doctor** — paste any MCP / LangChain / CrewAI / OpenAI SDK traceback and get the root cause, exact fix, and verification steps from the CyberHuaTuo prescription library.
24+
25+
```bash
26+
python -m cyberhuatuo diagnose "Traceback ... from langchain import ChatOpenAI ..." --framework langchain --top-k 1
27+
```
28+
29+
**Real CLI recording from this repository:**
30+
31+
<p align="center">
32+
<img src="assets/cli_emergency_diagnosis_demo.gif" alt="CyberHuaTuo emergency diagnosis CLI demo: traceback to exact LangChain fix" width="100%"/>
33+
</p>
34+
35+
**The cure returned by the recorded run:**
36+
37+
```bash
38+
pip install langchain-openai
39+
```
40+
41+
```python
42+
from langchain_openai import ChatOpenAI
43+
```
44+
45+
This first rescue path works from the local prescription library even before you add an LLM API key. Add a model key later for deeper AI diagnosis.
46+
47+
---
48+
1949
<p align="center">
2050
<a href="#-quick-start">
2151
<img src="assets/prescription_universe.svg" alt="CyberHuaTuo Holographic Bagua Engine" width="100%"/>

README_CN.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,36 @@
1616
<em>不只是修 Bug —— 我们让你的 AI 百毒不侵。</em>
1717
</p>
1818

19+
---
20+
21+
## 🚨 急诊入口:先粘贴报错
22+
23+
**AI Agent 报错急诊室** — 粘贴 MCP / LangChain / CrewAI / OpenAI SDK 的 traceback,赛博华佗直接给病灶、根因、可执行修复和验证步骤。
24+
25+
```bash
26+
python -m cyberhuatuo diagnose "Traceback ... from langchain import ChatOpenAI ..." --framework langchain --top-k 1
27+
```
28+
29+
**来自当前仓库 CLI 的真实录制:**
30+
31+
<p align="center">
32+
<img src="assets/cli_emergency_diagnosis_demo.gif" alt="赛博华佗急诊 CLI Demo:从 traceback 到 LangChain 精确修复" width="100%"/>
33+
</p>
34+
35+
**这次急诊返回的药方:**
36+
37+
```bash
38+
pip install langchain-openai
39+
```
40+
41+
```python
42+
from langchain_openai import ChatOpenAI
43+
```
44+
45+
这条急诊路径直接使用本地药方库;即使还没有配置 LLM API Key,也能先给出可复制的命中药方。配置模型 Key 后,可以继续使用更深度的 AI 望闻问切。
46+
47+
---
48+
1949
<p align="center">
2050
<a href="#-快速开始">
2151
<img src="assets/prescription_universe.svg" alt="赛博华佗全息八卦引擎" width="100%"/>

README_MCP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 🩺 CyberHuaTuo MCP Server
22

3-
> 让所有 AI Coding 工具都能调用赛博华佗的「望闻问切」诊断能力
4-
> Make CyberHuaTuo available in every AI coding tool
3+
> Paste an Agent / MCP / LangChain / CrewAI traceback and get the root cause, exact fix, and verification steps inside any AI coding tool.
4+
> 粘贴 Agent / MCP / LangChain / CrewAI traceback,在任意 AI Coding 工具里得到病灶、药方和验证步骤。
55
66
## 什么是 MCP?
77

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
{"version": 2, "width": 120, "height": 36, "timestamp": 1782973436, "env": {"SHELL": "powershell", "TERM": "xterm-256color"}}
2+
[0.0, "o", "PS E:\\ideaProjects\\agent\\CyberHuaTuo-Plugin> "]
3+
[0.025, "o", "pyt"]
4+
[0.05, "o", "hon"]
5+
[0.075, "o", " -m"]
6+
[0.1, "o", " cy"]
7+
[0.125, "o", "ber"]
8+
[0.15, "o", "hua"]
9+
[0.175, "o", "tuo"]
10+
[0.2, "o", " di"]
11+
[0.225, "o", "agn"]
12+
[0.25, "o", "ose"]
13+
[0.275, "o", " \"T"]
14+
[0.3, "o", "rac"]
15+
[0.325, "o", "eba"]
16+
[0.35, "o", "ck "]
17+
[0.375, "o", "..."]
18+
[0.4, "o", " fr"]
19+
[0.425, "o", "om "]
20+
[0.45, "o", "lan"]
21+
[0.475, "o", "gch"]
22+
[0.5, "o", "ain"]
23+
[0.525, "o", " im"]
24+
[0.55, "o", "por"]
25+
[0.575, "o", "t C"]
26+
[0.6, "o", "hat"]
27+
[0.625, "o", "Ope"]
28+
[0.65, "o", "nAI"]
29+
[0.675, "o", " .."]
30+
[0.7, "o", ".\" "]
31+
[0.725, "o", "--f"]
32+
[0.75, "o", "ram"]
33+
[0.775, "o", "ewo"]
34+
[0.8, "o", "rk "]
35+
[0.825, "o", "lan"]
36+
[0.85, "o", "gch"]
37+
[0.875, "o", "ain"]
38+
[0.9, "o", " --"]
39+
[0.925, "o", "top"]
40+
[0.95, "o", "-k "]
41+
[0.975, "o", "1"]
42+
[1.125, "o", "\r\n"]
43+
[1.185, "o", "\r\n"]
44+
[1.245, "o", "🩺 CyberHuaTuo 赛博华佗 · CLI\r\n"]
45+
[1.305, "o", "==================================================\r\n"]
46+
[1.365, "o", " 望闻问切 · AI 诊断\r\n"]
47+
[1.425, "o", "==================================================\r\n"]
48+
[1.485, "o", "\r\n"]
49+
[1.545, "o", "🩺 CyberHuaTuo 索引构建器\r\n"]
50+
[1.605, "o", "========================================\r\n"]
51+
[1.665, "o", "✅ 已有索引(36 个病例),跳过构建\r\n"]
52+
[1.725, "o", "✅ 知识库索引就绪,共 36 个病例\r\n"]
53+
[1.785, "o", "# CyberHuaTuo Diagnosis Report\r\n"]
54+
[1.845, "o", "**Report ID**: `CHT-DR-20260702-ae37`\r\n"]
55+
[1.905, "o", "\r\n"]
56+
[1.965, "o", "**Framework**: Langchain\r\n"]
57+
[2.025, "o", "**Complaint**: Traceback (most recent call last): File 'app.py', line 3, in <module> from langchain import ChatOpenAI ImportError: cannot import name 'ChatOpenAI' from 'langchain'\r\n"]
58+
[2.085, "o", "\r\n"]
59+
[2.145, "o", "---\r\n"]
60+
[2.205, "o", "\r\n"]
61+
[2.265, "o", "## [LOOK] Identification\r\n"]
62+
[2.325, "o", "\r\n"]
63+
[2.385, "o", "- **Framework**: Langchain\r\n"]
64+
[2.445, "o", "- **Error Type**: ImportError\r\n"]
65+
[2.505, "o", "- **CHT Code**: `CHT-UNK-000` 未分类问题 / Unclassified Issue\r\n"]
66+
[2.565, "o", "- **Category**: UNK (未分类问题)\r\n"]
67+
[2.625, "o", "\r\n"]
68+
[2.685, "o", "## [LISTEN] Category Assessment\r\n"]
69+
[2.745, "o", "\r\n"]
70+
[2.805, "o", "- **Root Cause Category**: 未分类问题 / Unclassified Issue\r\n"]
71+
[2.865, "o", "- **Severity**: MEDIUM\r\n"]
72+
[2.925, "o", "- **Matched Cases**: 1\r\n"]
73+
[2.985, "o", "\r\n"]
74+
[3.045, "o", "## [DIAGNOSE] Root Cause Analysis\r\n"]
75+
[3.105, "o", "\r\n"]
76+
[3.165, "o", "⚠️ 未配置 LLM API Key,无法使用 AI 诊断功能。\r\n"]
77+
[3.225, "o", "\r\n"]
78+
[3.285, "o", "你可以:\r\n"]
79+
[3.345, "o", "1. 在搜索框下方的「开发者设置」中填入你的 API Key\r\n"]
80+
[3.405, "o", "2. 或在 `.env` 文件中配置相应的 Key(如 OPENAI_API_KEY, DEEPSEEK_API_KEY 等)\r\n"]
81+
[3.465, "o", " - 支持本地模型,通过 OLLAMA_BASE_URL 接入无需 Key\r\n"]
82+
[3.525, "o", "\r\n"]
83+
[3.585, "o", "配置后即可使用 AI 望闻问切诊断。\r\n"]
84+
[3.645, "o", "\r\n"]
85+
[3.705, "o", "当前可以使用「向量搜索」模式直接搜索知识库中的病例。\r\n"]
86+
[3.765, "o", "\r\n"]
87+
[3.825, "o", "## [PRESCRIBE] Knowledge-Base Cure\r\n"]
88+
[3.885, "o", "\r\n"]
89+
[3.945, "o", "LLM diagnosis is unavailable, but the local prescription library already matched a concrete cure:\r\n"]
90+
[4.005, "o", "\r\n"]
91+
[4.065, "o", "**Source Case**: LangChain 0.3 升级后 ChatOpenAI 导入失败 (82% relevance, Permanent)\r\n"]
92+
[4.125, "o", "**Case File**: `cases\\langchain\\import-error\\chatmodel-import-001.md`\r\n"]
93+
[4.185, "o", "\r\n"]
94+
[4.245, "o", "## 💊 药方\r\n"]
95+
[4.305, "o", "Prescriptions\r\n"]
96+
[4.365, "o", "\r\n"]
97+
[4.425, "o", "### 药方 1:更新导入路径 ✅ 推荐\r\n"]
98+
[4.485, "o", "\r\n"]
99+
[4.545, "o", "**适用版本**: `langchain >= 0.3.0`\r\n"]
100+
[4.605, "o", "\r\n"]
101+
[4.665, "o", "1. 安装独立的 OpenAI 集成包:\r\n"]
102+
[4.725, "o", "\r\n"]
103+
[4.785, "o", "```bash\r\n"]
104+
[4.845, "o", "pip install langchain-openai\r\n"]
105+
[4.905, "o", "```\r\n"]
106+
[4.965, "o", "\r\n"]
107+
[5.025, "o", "2. 更新导入语句:\r\n"]
108+
[5.085, "o", "\r\n"]
109+
[5.145, "o", "```python\r\n"]
110+
[5.205, "o", "# ❌ 旧写法(0.2.x 及更早)\r\n"]
111+
[5.265, "o", "from langchain import ChatOpenAI\r\n"]
112+
[5.325, "o", "\r\n"]
113+
[5.385, "o", "# ✅ 新写法(0.3.x)\r\n"]
114+
[5.445, "o", "from langchain_openai import ChatOpenAI\r\n"]
115+
[5.505, "o", "```\r\n"]
116+
[5.565, "o", "\r\n"]
117+
[5.625, "o", "3. 其他常用类的迁移:\r\n"]
118+
[5.685, "o", "\r\n"]
119+
[5.745, "o", "```python\r\n"]
120+
[5.805, "o", "# Embeddings\r\n"]
121+
[5.865, "o", "from langchain_openai import OpenAIEmbeddings\r\n"]
122+
[5.925, "o", "\r\n"]
123+
[5.985, "o", "# LLM\r\n"]
124+
[6.045, "o", "from langchain_openai import OpenAI\r\n"]
125+
[6.105, "o", "```\r\n"]
126+
[6.165, "o", "\r\n"]
127+
[6.225, "o", "---\r\n"]
128+
[6.285, "o", "\r\n"]
129+
[6.345, "o", "## Confidence Assessment\r\n"]
130+
[6.405, "o", "\r\n"]
131+
[6.465, "o", "- **Confidence**: **MEDIUM** (48/100)\r\n"]
132+
[6.525, "o", "- **Basis**: 1 related case(s), top relevance 82%\r\n"]
133+
[6.585, "o", "- **Mode**: pattern match / related cases available\r\n"]
134+
[6.645, "o", "\r\n"]
135+
[6.705, "o", "## Matched Cases\r\n"]
136+
[6.765, "o", "\r\n"]
137+
[6.825, "o", "| # | Case | Framework | Relevance | Severity | Source |\r\n"]
138+
[6.885, "o", "|:-:|:-----|:---------:|:---------:|:--------:|:------:|\r\n"]
139+
[6.945, "o", "| 1 | LangChain 0.3 升级后 ChatOpenAI 导入失败 | langchain | 82% | medium | Permanent |\r\n"]
140+
[7.005, "o", "\r\n"]
3.37 MB
Loading

cyberhuatuo/marketplace.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,13 +2412,14 @@ def build_marketplace_submission_copy_pack(
24122412
"contributor_counting_rule": contributor_rule,
24132413
"pypi": {
24142414
"short": (
2415-
"CyberHuaTuo turns AI-agent failures into reusable prescriptions, MCP tools, "
2416-
"and a First Soul Ring contribution loop."
2415+
"CyberHuaTuo lets developers paste AI-agent tracebacks and get root cause, "
2416+
"exact fixes, verification steps, and reusable prescriptions."
24172417
),
24182418
"long": (
24192419
f"CyberHuaTuo {release} ships a Python CLI, shared MCP server, Codex plugin, "
2420-
"Claude Desktop MCPB package, and real-data soul-ring growth surfaces for "
2421-
f"{clean_framework} debugging workflows."
2420+
"and Claude Desktop MCPB package for paste-a-traceback diagnosis across "
2421+
f"{clean_framework} and other AI-agent debugging workflows. After a real cure, "
2422+
"fixes can still flow into real-data soul-ring growth surfaces."
24222423
),
24232424
"project_urls": [
24242425
("Homepage", repo_url),
@@ -2430,7 +2431,7 @@ def build_marketplace_submission_copy_pack(
24302431
"commands": [install_command, mcp_command],
24312432
},
24322433
"claude": {
2433-
"short": "One-click Claude Desktop extension for CyberHuaTuo AI-agent diagnosis and soul-ring contribution routing.",
2434+
"short": "One-click Claude Desktop extension for paste-a-traceback CyberHuaTuo AI-agent diagnosis.",
24342435
"install_note": (
24352436
"Install `dist/cyberhuatuo-claude-desktop.mcpb` in Claude Desktop after validating the bundle."
24362437
),
@@ -2442,29 +2443,31 @@ def build_marketplace_submission_copy_pack(
24422443
"review_notes": [
24432444
"Tool annotations distinguish read-only reports from ledger-writing tools.",
24442445
"Privacy policy is linked from `claude-desktop/manifest.json`.",
2445-
"Working examples route diagnose, market-ready, proof-pack, and first-ring contribution flows.",
2446+
"Working examples lead with diagnose, then route market-ready, proof-pack, and first-ring contribution flows.",
24462447
],
24472448
},
24482449
"codex": {
24492450
"short": (
2450-
"Codex plugin bundle for diagnosing AI-agent failures, using CyberHuaTuo MCP tools, "
2451-
"and following a team soul-ring contribution process."
2451+
"Codex plugin bundle for pasting AI-agent tracebacks, getting exact CyberHuaTuo fixes, "
2452+
"and optionally following a team soul-ring contribution process."
24522453
),
24532454
"files": [".codex-plugin/plugin.json", ".agents/plugins/marketplace.json", ".mcp.json"],
24542455
"install_commands": [
24552456
f"codex plugin marketplace add {slug}",
24562457
"codex mcp list",
24572458
],
24582459
"usage_prompt": (
2459-
f"Use CyberHuaTuo to diagnose this {clean_framework} failure, then generate my First Soul Ring path."
2460+
f"Paste this {clean_framework} traceback into CyberHuaTuo, return the exact fix, "
2461+
"then generate my optional First Soul Ring path."
24602462
),
24612463
},
24622464
"github_release": {
24632465
"command": release_command,
24642466
"web_links": release_web_links,
24652467
"post": (
2466-
f"CyberHuaTuo {release} is the public growth-loop release: PyPI install, Claude MCPB, "
2467-
"Codex plugin metadata, IssueOps proof routes, and First Soul Ring contributor activation."
2468+
f"CyberHuaTuo {release} is the public AI-agent error doctor release: PyPI install, "
2469+
"Claude MCPB, Codex plugin metadata, a paste-a-traceback diagnosis path, IssueOps proof routes, "
2470+
"and First Soul Ring contributor activation after real cures."
24682471
),
24692472
},
24702473
"submission_portals": submission_portals,
@@ -2479,7 +2482,8 @@ def build_marketplace_submission_copy_pack(
24792482
"bounty_command": bounty_command,
24802483
"traction_command": traction_command,
24812484
"copy": (
2482-
f"CyberHuaTuo {release} public proof sprint: target {target} real first-ring contributors. "
2485+
f"CyberHuaTuo {release} public proof sprint: first show paste-a-traceback diagnosis, "
2486+
f"then target {target} real first-ring contributors. "
24832487
f"Start with `{install_decision_command}` or MCP `{install_decision['mcp_tool']}`, "
24842488
f"paste its Recommended Install, run `{mcp_command}` for agent clients, submit a real "
24852489
"First Soul Ring prescription or request the Bounty Board for claimable framework gaps, "
@@ -2501,6 +2505,8 @@ def build_marketplace_submission_copy_pack(
25012505
},
25022506
"maintainer_announcement": (
25032507
f"CyberHuaTuo {release} is ready for PyPI, Claude Desktop MCPB, and Codex plugin submission copy. "
2508+
"Lead every channel with the error doctor promise: paste an AI-agent traceback, get root cause, "
2509+
"exact fix, and verification steps. "
25042510
f"The first public loop is simple: `{install_decision_command}`, paste its Recommended Install, "
25052511
"run the First Soul Ring challenge, publish a "
25062512
f"real {clean_framework} prescription, request claimable gaps with `{bounty_command}`, "

0 commit comments

Comments
 (0)