tarot-astrology (dsh-plugin)
lzzut/tarot-astrology/dsh-plugin
Adds tarot spreads and natal-chart readings to the agent — 78 cards drawn by a local script, 14 spreads, astrology computed on your machine with no third-party API and no account.
Install
dsh plugin --profile web add github:lzzut/tarot-astrologyThis plugin lives in the dsh-plugin subdirectory of the repository.
README
塔罗与本命盘 / tarot-astrology
一套能装进 AI 助手里用的塔罗与星盘工具。牌由脚本真洗,每局生成会话号和摘要,事后能复算出同一副;星盘纯手算,在本机算完就结束,不调第三方接口,出生时间不出这台机器。
两种形态,二选一:
| 装到哪 | 用哪个目录 | 怎么装 |
|---|---|---|
| 任何支持 Agent Skill 的助手(Claude Code、Codex、DSH 等) | tarot-astrology/ | 把整个文件夹放进技能目录 |
| DeepSeek Harness | dsh-plugin/ | 插件市场装 dsh-tarot-astrology,或本地用 plugin_manager 装 bundle |
需要 Python 3.8 以上。不装任何第三方包也能跑;想更准可以再装 pymeeus,tarot-astrology/install-deps.* 会把它装到本地 .deps/ 里(Windows 直接双击 install-deps.cmd)。
插件市场索引
根目录的 index.json 是 DSH 插件市场读的那份索引。在 DSH 设置里把它加进市场的索引列表:
https://raw.githubusercontent.com/lzzut/tarot-astrology/main/index.json
索引指向 npm 上的 dsh-tarot-astrology@0.1.0,装的时候直接从 registry 下载,跟仓库的 commit 没关系。
发新版的顺序:改完 dsh-plugin/ → 提交推送 → 在 dsh-plugin/ 里 npm publish → 双击 make-index.cmd 把新版本号和时间戳写进 index.json → 再提交一次、推一次。
里面有什么
tarot-astrology/— 技能本体。SKILL.md是给助手看的说明,README.md是给人看的;references/里是 78 张牌意和 14 种牌阵,scripts/是抽牌、星盘、出图三个脚本,tests/是一套端到端自测(98 项)。dsh-plugin/— DeepSeek Harness 插件包,把上面这套技能注册进 DSH。改完技能跑一次dsh-plugin/sync-skill.ps1同步进去。
跑一下
python tarot-astrology/scripts/tarot.py new
python tarot-astrology/scripts/tarot.py draw 7 11 17 # 报数字,不重复,取走不放回
python tarot-astrology/scripts/chart.py --date 2000-06-15 --time 09:15 \
--utc-offset 0 --lat 51.51 --lon -0.13
python tarot-astrology/scripts/wheel.py chart.json chart.png
自测:
python tarot-astrology/scripts/chart.py --selftest
python tarot-astrology/scripts/tarot.py selftest
python tarot-astrology/tests/test_skill.py
精度与边界
内置星历是 Meeus 截断级数加近似轨道根数,太阳误差约 0.005°、月亮约 0.03°、行星 0.02–0.16°,冥王星最差,1950 年和 2050 年两端各偏 0.4 左右。装了 pymeeus 会降到角秒级;再往上要用 pyswisseph,那需要 Python 3.13 及以下或本机有编译器。
上升点完全取决于出生时间,差 4 分钟就差 1°;宫位用的是 Porphyry 制,不是 Placidus。这些不是 bug,是不同的算法,写在这里是为了不让人拿它当专业占星软件用。
免责
仅供娱乐。 塔罗和星盘都是解释工具,不是预测工具。别拿它做医疗、法律、投资决定,也别因为一张牌就替自己或别人下定论。
脚本会读取你输入的出生时间和城市。这些数据只在你自己机器上跑,不会上传,也不会写进日志——介意的话用完把 chart.json 删掉,它本来就在 .gitignore 里。