jamesxxx-ai/ashare-agent
基于 DeepSeek Harness + AKShare 的本地 A 股 AI Agent 工作台:数据获取 / 每日晨报 / 交易复盘三大技能,只做分析、不做交易。
Project Overview项目介绍
ashare-agent is a local AI Agent workbench for A-share research, purpose-built around DeepSeek Harness (dsh) and tightly coupled with the akshare Python data stack plus pandas, backtrader, matplotlib, and tabulate. It exposes three SKILL.md skills that dsh discovers natively: ashare-data pulls quotes, fundamentals, northbound flow, and news; ashare-report produces the daily morning briefing; ashare-review runs after-action reviews on past trade settlements.
Typical workflow begins with git clone followed by ./setup.sh, which creates a venv, installs pinned dependencies from requirements.txt, seeds example watchlist/positions templates, and links skills/ into .dsh/skills so dsh's fixed scanner picks them up; a global symlink under ~/.dsh/skills extends availability to every workspace. From inside dsh, users fire one-line intents like 执行 ashare-report, drop annual-report PDFs into data/reports/ for cross-validated financial flagging, describe a screening rule in natural language to emit scripts/screener.py, or feed backtrader a habit to backtest. The project is aimed at individual investors who want disciplined, read-only analysis: AGENTS.md hard-codes the rule that the agent never trades and must surface every number from real API output or openly admit failure.
Dependencies are Python 3.11 (chosen for backtrader compatibility over 3.13/3.14), the dsh CLI, and git, with all Python packages version-locked in requirements.txt. Known limits include eastmoney K-line hosts being unreachable on some networks (the script hard-codes sina instead) and northbound real-time net buy data being discontinued since August 2024, so the interface returns 0. Setup defaults to workspace-write permission rather than danger-full-access, easytrader is deliberately excluded to physically isolate order routing, and watchlist/positions/trade CSVs are gitignored. License is MIT; first-run users should copy the *.example templates in data/, then trigger a dry run via .venv/bin/python scripts/morning_report.py --save.
ashare-agent 是一个面向 A 股研究的本地 AI Agent 工作台,专门为 DeepSeek Harness(dsh)打造,深度集成 akshare、pandas、backtrader、matplotlib 等 Python 3.11 数据栈。它通过三个 SKILL.md 技能被 dsh 原生识别:ashare-data 负责行情与新闻抓取,ashare-report 生成每日晨报,ashare-review 完成交易复盘。
典型流程为:用户克隆仓库后运行 setup.sh 自动建 venv、装依赖、建立 .dsh/skills 软链;随后在 dsh 中通过"执行 ashare-report"等一句话触发晨报生成,或把年报 PDF 放入 data/reports/ 让 Agent 做财务排雷,亦可让 Agent 据自然语言条件生成选股脚本。该工具适合追求严谨纪律的个人投资者,但明确不做实盘交易,所有操作清单由人手动执行。
依赖包括 Python 3.11、dsh CLI、git,锁定的 akshare/backtrader 等版本写在 requirements.txt;已知限制为 eastmoney K 线在部分网络下不可用、北向实时净买额自 2024 年 8 月起停披露。许可证为 MIT,watchlist/持仓/交割单等敏感数据已被 .gitignore 脱敏。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:ashare-agent(jamesxxx-ai/ashare-agent)
仓库:https://github.com/jamesxxx-ai/ashare-agent
本站详情页:https://www.yhbd.top/plugins/jamesxxx-ai-ashare-agent/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 5 · 最近提交 2026-08-17 · 主语言 Python · 未检测到 DSH 插件清单
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
- No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:jamesxxx-ai/ashare-agent
把 jamesxxx-ai/ashare-agent 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
A 股研究与复盘工作台:数据获取 / 每日晨报 / 交易复盘三大技能,外加回测、选股、监控的脚本骨架。Agent 只做分析、不做交易;所有数字来自数据接口实际输出,拿不到就明说,绝不估算编造。
⚠️ 免责声明:本项目不含任何实盘下单能力,不构成投资建议。数据来自公开接口,可能存在延迟、缺失或错误,请自行核对。
目录
特性
- 🧭 3 个 dsh 技能:
ashare-data(数据获取)、ashare-report(每日晨报)、ashare-review(交易复盘),SKILL.md 格式,dsh 原生识别 - 📜
AGENTS.md投资准则:铁律约束——不做买卖决策、禁用「目标价/必涨」措辞、数字必须来自脚本、数据拿不到就明说 - 🐍 Python 3.11 数据环境:akshare + pandas + backtrader + matplotlib + tabulate,版本锁定在
requirements.txt - 📈 可复用脚本
scripts/morning_report.py:一条命令生成晨报,已处理数据源切换与代理绕过 - 🔒 默认脱敏:自选股 / 持仓 / 交割单等个人金融数据被
.gitignore,只提交*.example模板
快速开始
前置要求
- Python 3.11+(推荐 3.11,兼容老牌 backtrader)
- dsh(DeepSeek Harness CLI)
- git
安装
git clone https://github.com/sfeng49/ashare-agent.git
cd ashare-agent
# 一键初始化:建 venv、装依赖、生成数据文件、接好技能发现链接
./setup.sh
等价手动步骤:
python3.11 -m venv .venv
.venv/bin/pip install -r requirements.txt
cp data/watchlist.example.txt data/watchlist.txt # 换成你的自选股
cp data/positions.example.csv data/positions.csv
mkdir -p .dsh && ln -sfn ../skills .dsh/skills
让 dsh 识别技能
dsh 只扫描固定技能根目录(.dsh/skills、.agents/skills、~/.dsh/skills、~/.agents/skills),并不默认识别工作区顶层的 skills/。setup.sh 已创建项目级链接 .dsh/skills -> ../skills。
如需让技能在任意工作区可用,再执行:
ln -sfn "$(pwd)/skills" ~/.dsh/skills
跑第一个晨报
# 直接用脚本(不依赖 dsh)
.venv/bin/python scripts/morning_report.py --save
# 或在 dsh 中把工作区指向本目录后
执行 ashare-report
六个任务
这是工作台的完整玩法,每个任务都可用一句话在 dsh 里发起。
| # | 任务 | 一句话触发 | 产出 |
|---|---|---|---|
| 1 | 每日晨报 | 执行 ashare-report |
output/daily/YYYY-MM-DD-morning.md |
| 2 | 年报速读 + 财务排雷 | 把 PDF 放进 data/reports/ 后让 Agent 分析 |
提取 + 横向对比 + 矛盾清单 + 风险清单 |
| 3 | 自然语言选股 | 描述条件让 Agent 生成脚本 | 参数化的 scripts/screener.py |
| 4 | 回测「盘感」 | 用 backtrader 回测你的交易习惯 | 年化/回撤/夏普 + 参数敏感性测试 |
| 5 | 盯盘监控 | 写 scripts/monitor.py |
webhook 推送异动(去重) |
| 6 | 交易复盘 | 交割单放 data/trades/ 后 执行 ashare-review |
胜率/盈亏比/行为模式/相对沪深300 的 alpha |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
chuspeeism/dashi-taskboard
zhoushoujianwork/easyeda-agent
morluto/rea
gitroomhq/postiz-agent
linhay/harmony-next.skills
theBigGavin/marketingdashboard
yzlnew/infra-skills
liceses/dsh-gitbash-preset