cnwu16/vedic-astro-skills/vedic-calculator
Claude Code and agent skill by cnwu16/vedic-astro-skills
- community
Checking that the SKILL.md file is still in the repository.
Calculate a complete Vedic/Jyotish natal chart directly from birth date, exact time, and place, producing the canonical structured_data.md for downstream analysis. Use for requests such as 'calculate my Vedic chart', 'cast my birth chart', 'generate a chart from my birth details'; Chinese triggers including '直接排盘', '计算星盘', '快速排盘', and '算一下'; or Japanese triggers including '出生図を作って', 'ホロスコープを計算して', and 'ヴェーダ占星術で出生図を出して'. Also use when vedic-reader has birth details but no chart file. / 吠陀占星排盘计算引擎。
Install
npx vskill@latest install cnwu16/vedic-astro-skills/vedic-calculatorSKILL.md
vedic-calculator: 吠陀占星排盘引擎
Language contract / 语言契约
- Set
client_languagefrom the user's explicit language request; otherwise match the language of the latest substantive user message. - Use
client_languagefor all chat replies, intake questions, confirmations, progress updates, user-visible warnings, reports, and Q&A. Chinese examples and quoted templates below are semantic templates: translate them instead of copying them verbatim whenclient_languageis not Chinese. - Keep canonical filenames, CLI flags, JSON keys,
structured_data.mdschema headings, technical codes, and Sanskrit/English identifiers unchanged. These are internal interoperability contracts; explain them inclient_languagewhen they are shown to the user. - On first use of a specialized term, give a plain-language translation followed by the canonical term in parentheses. Never translate canonical identifiers inside calculations or evidence citations.
- If the user changes language mid-run, preserve the existing data and artifact lineage; switch client-facing language from that point onward unless the user explicitly asks to regenerate earlier artifacts.
- When
client_languageis Japanese, readresources/ja-calculator.mdcompletely before the first Japanese client-facing message. Apply it only as a terminology, register, intake, and rendering layer; it never changes calculations, schemas, evidence, phases, or output requirements.
基于pysweph天文引擎 + PyJHora精确算法,直接从出生时间计算完整星盘数据。输出格式完全兼容vedic-reader的structured_data.md,可直接交给vedic-core分析。
前置条件
- Python 3.8 ~ 3.13(pysweph 为 C 扩展,3.14 暂不支持)
- 依赖: pysweph, PyJHora==4.8.6, pytz, tzdata(时区规则库;Windows 跑 vedic-prashna 必需)
⚠️ 不要直接 `pip install -r requirements.txt`! PyJHora 未声明其运行时依赖,且 pip 包缺少 .se1 星历文件。请使用setup_env.py自动安装(见下方)。
环境自动检测
⚠️<skill目录>= vedic-calculator skill 的安装路径,AI 根据实际环境自动填写。⚠️ 如果系统默认 Python 是 3.14,setup_env.py 会自动查找 3.12/3.13 来创建 venv。
⚠️ 首次使用必须先跑环境诊断
使用流程
Step 1: 收集出生信息
向用户收集:
⚠️ 夏令时确认(出生日期落在当地夏令时期间时必做,如中国大陆 1986-1991 每年4月中~9月中):
Step 2: AI转换地理坐标
根据用户提供的城市名,AI直接填写:
- 纬度 (lat)
- 经度 (lon)
- 时区字符串 (tz_str)
常用参考:
⚠️ 中国全境使用 "Asia/Shanghai" (UTC+8)⚠️ 印度全境使用 "Asia/Kolkata" (UTC+5:30)
Step 3: 运行引擎
在工作目录下创建计算脚本并执行:
执行命令(AI 根据环境自动选择 Python):
⚠️ 禁止自己手写 print 来读取 chart 数据! 必须用formatter.py输出 structured_data.md。chart 的数据结构见下方「engine 返回数据结构」。
Step 4: 校验输出
检查生成的structured_data.md:
- SAV总计 = 337 ✅
- 行星完整性 = 10颗 ✅
- Ra-Ke差180° ✅
- Lagna星座是否合理
- Vimsottari = 9段MD、81段AD、729段PD,且每层
[start,end)无缝连续 ✅ - 分盘边界审计:读取
分盘可信度声明,确认D1/D9/D10/D4/D5在有效精度
区间内是“稳定”还是“边界敏感”。禁止因“出生证”或“直接计算”自动把全部 分盘写成可信;二者分别表示记录来源和数学可复现性,不表示输入扰动下稳定。
分盘消费硬约束:
✅ 审计区间内稳定:对应分盘可按当前Lagna正常使用;⚠️ 边界敏感:保留给定时刻的计算表,但分盘宫位、内部宫主和所有下游形态
结论必须条件化或降级;
- 旧structured_data缺少边界审计:标“未验证”,不得补写成高可信;
- 出生证未写明记录的是啼哭、分娩、断脐还是事后录入时,时刻语义仍未知。
时间分辨率硬约束:
- 只读MD时,只输出背景趋势;
- 读到MD×AD时,最多输出阶段窗口;
- 用户要求月份或窄于AD的窗口时,必须读取MD×AD×PD;
- PD缺失或校验失败时停止月级判定,禁止用AD或365.25天近似制造月级精度。
Step 4.5: 三级运渐进读取(不改canonical数据)
Calculator正常排盘仍必须一次性计算、校验并写入完整9 MD + 81 AD + 729 PD。 渐进读取优化的是下游模型上下文,不是删数据、少计算或改时间线。
下游reader/rectifier/core/core-pro/QA一律按三层消费:
- MD背景层:先定人生大阶段;
- AD阶段层:再定领域候选与事件阶段;
- PD微触发层:只在用户要求月/日、实际输出窄于完整AD、
或相邻AD/PD接力会改变结论时读取。
禁止默认把structured_data.md中729行PD整表送入模型上下文。使用确定性工具:
候选比较时,先用同一方法完成所有候选的MD/AD矩阵,锁定全部仍需PD分辨的候选后再统一下钻。 禁止只给当前最喜欢的候选读PD,也禁止通读729行后反向挑一个最像答案的窗口。
Step 5: 模式选择
structured_data.md 生成后,向用户输出:
排盘完成后不要把小火人资料导出插入上述正常 a/b 流程。先让用户按上面的流程继续, 只在消息最后补一句可选提示:“如果想把这张盘带到小火人里使用,可以再说‘整理一段可复制给小火人的资料’。” 用户明确提出“小火人资料”“可复制资料”“关系资料”或类似请求时,才进入导出分支;普通排盘用户不自动接收额外长资料。
- 用户选 a) 或说"直接分析"/"开始" → 触发 vedic-reader(精简模式:跳过提取,直接读 structured_data → 验前事)
- 用户发送 PDF → 核对出生信息一致性 → 从PDF文本层提取有效Shadbala
→ 与calc Shadbala逐行对照 → PDF存在的行展示PDF值,差异行标注并提示用户 → PDF缺失行保留calc → 其余PDF数据仅交叉验证 → 再触发reader验前事
- 用户明确请求小火人资料 → 保留已生成的 canonical
structured_data.md不变,运行
scripts/make_xiaohuo_person_card.py structured_data.md,把 stdout 返回的一段 xiaohuo-person-v1 纯文字直接发给用户;不要生成图片,不要求用户打开或理解文件, 也不要把资料卡当作新的排盘结果。双人使用时,两个人分别排盘、分别生成一段个人资料, 再在双人对话中标为 A/B 粘贴。导出包含明确的 Lagna、当前 MD/AD/PD 和带日期的 慢行星过运快照;导出器不调用星历,也不把旧快照改成今天。若用户要求真实当日过运且 源文件日期已过期,必须重新运行完整 Calc 后再导出,不得只重跑导出器或手改日期。
engine 返回数据结构
⚠️ 必读! 不要猜 key 名。以下是calculate_full_chart()返回的 dict 结构。
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/vedic-calculator/SKILL.md
Popularity
- Repository stars
- 860
- Repository forks
- 96
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cnwu16/vedic-astro-skills/vedic-calculator)