首页龙虾技能列表 › Daily Bazi Analysis — 技能工具

Daily Bazi Analysis — 技能工具

v1.0.4

面向“今日运势/今天适合做X吗/今日宜忌”类咨询的八字日运解读技能。使用场景:用户在 OpenClaw 中询问当日运势、某事项是否适合今天做、今日吉凶与建议时触发。技能会自动读取当前日期,查询当日对应的流年、流月、流日,并结合用户的八字四柱进行分析;若用户为首次使用且无个人四柱记忆,先引导用户提供四柱并写入长期记...

1· 529·0 当前·0 累计
by @lilir-is-here (liliishere)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/24
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill is internally coherent for a personalized Bazi (八字) daily-analysis tool: it only uses local classic texts and an internal calendar, reads user_id/user_timezone from session context, and reads/writes a per-user profile via the platform heartbeat API — there are no unrelated credentials, external download/install steps, or hidden endpoints.
评估建议
This skill appears to do what it says: personalized daily Bazi analysis using local classic text files and a built-in calendar. Before installing, note: (1) it will read your session user_id and user_timezone and will store your four-pillar (year/month/day/hour) profile in long-term memory via the platform heartbeat API — decide if you want that personal data persisted; (2) each request will record mandatory logging fields (user_id, timezone, today_local, memory_hit, calendar_hit, heartbeat stat...
详细分析 ▾
用途与能力
Name/description (daily Bazi analysis) match what the files and instructions do: use local classical texts A/B/C, a bundled daily calendar SQL, and per-user four-pillar profiles. Requiring access to session user_id/user_timezone and a heartbeat get/upsert to store/retrieve four-pillar profiles is proportionate to the stated personalized service.
指令范围
SKILL.md explicitly instructs the agent to extract user_id and user_timezone from session context, compute today_local, call internal heartbeat events (bazi_profile_get/upsert), query the local bazi_daily_calendar, and read local classic text files. These actions are necessary for personalization and correct date-scoped lookups, but they do mean the skill will access user identifiers and persist four-pillar data to long-term memory and will log several request-level fields. The skill also mandates not fabricating missing calendar/classic data and to surface coverage gaps — this is a safe guard but may cause frequent partial results until classics are regenerated.
安装机制
No install spec (instruction-only) and bundled scripts/data are local files. The two utility scripts (PDF text extraction and xlsx->SQL import) require common Python libraries (pypdf, openpyxl) but are maintenance tools, not invoked automatically by the skill at runtime. No external downloads, shorteners, or arbitrary extract/install steps are present.
凭证需求
The skill declares no required env vars or external credentials. It does depend on internal platform services (heartbeat and an internal DB/table bazi_daily_calendar) and requires writing/reading per-user profile keys and logging fields. These are proportionate to the purpose, but users should be aware that personal data (four pillars, user_id, timezone) will be stored and logged per the skill's mandatory logging contract.
持久化与权限
always:false and normal autonomous invocation settings. The skill deliberately writes to long-term memory (heartbeat upsert) and requires persistent built-in calendar data; this is expected. There is no attempt to modify other skills or system-wide configs. The mandatory logging fields require recording user_id and other metadata — a privacy consideration but not a privilege escalation.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.42026/3/3

Bazi Daily 1.0.4 — Switches to .sql calendar data and strengthens classic text guardrails - 日历数据源由 CSV 格式(assets/bazi_daily_calendar_2026.csv)切换为 SQL 格式(assets/bazi_daily_calendar_2026.sql)。 - 知识源引用仅允许本地 txt 文本,经典文本缺失时禁止静默替代,并加入缺口警告和完整性说明。 - references/classics 目录新增 README.md,详细说明经典文本缺失章节对分析影响。 - 新增 references/import-command-template.md,明确年度日历 SQL 数据导入流程。 - 删除 references/i18n-terminology.md,不再提及多语言术语映射与展示层路由规则。 - 响应模板、守则、日志字段等规则精简,更聚焦实际 OpenClaw 运行场景。

● 无害

安装命令 点击复制

官方npx clawhub@latest install bazi-daily
镜像加速npx clawhub@latest install bazi-daily --registry https://cn.clawhub-mirror.com

技能文档

Knowledge Source Architecture (Mandatory)

将经典分为三个独立知识源,禁止混成单一“综合库”:

  • A.《滴天髓》库(原则层):用于“为什么”和方向性判断(气机、取用总纲、论命哲学)。
  • B.《渊海子平》库(结构层):用于格局判定、十神结构、用神框架(先定结构再谈细节)。
  • C.《穷通宝鉴》库(调候层):用于月令气候、寒暖燥湿与调候药方(对结构结论做气候校正)。

固定来源文件(仅使用本地 txt):

  • A.滴天髓references/classics/A_滴天髓.txt
  • B.渊海子平references/classics/B_渊海子平.txt
  • C.穷通宝鉴references/classics/C_穷通宝鉴.txt

若 txt 文件不可读,直接报错"经典文本文件缺失,无法完成分析",不得尝试其他路径。

当前文本覆盖缺口警告B_渊海子平.txt 缺少格局判断核心章节(成格/破格/从格/化格),C_穷通宝鉴.txt 缺少约 40% 天干的调候章节(乙木完整版、丁火、戊土、己土、庚金、辛金、癸水)。在涉及上述缺失内容时,输出中必须注明"当前文本节选,[B-结构]/[C-调候] 依据不完整",不得以模型内置知识静默替代。详见 references/classics/README.md

调用顺序必须是:B 结构 -> C 调候 -> A 解释。 路由细则见 references/classic-sources-routing.md

Workflow

  • 识别触发意图。
  • 从会话上下文提取 user_iduser_timezone
  • 以用户时区自动计算 today_localYYYY-MM-DD)。
  • 调 heartbeat bazi_profile_get 读取用户四柱档案。
  • 若未命中四柱档案,请用户补充四柱并调 heartbeat bazi_profile_upsert 写入长期记忆。
  • 根据 today_local 查询 bazi_daily_calendar
  • 按“五步编排”完成分析并输出结论、依据和建议。

默认年度数据源文件:assets/bazi_daily_calendar_2026.sql。 导入脚本:scripts/import_bazi_calendar.py。 经典文本预处理脚本:scripts/extract_classics_text.py

Five-Step Orchestration (Mandatory)

在通过日期与流运查询闸门后,必须按以下步骤执行:

  • step1 解析命盘
- 提取四柱、十神分布、日主强弱初判、月令、格局候选(可多候选)。
  • step2 结构优先(渊海子平)
- 用 B 库先判结构与格局成立条件,给出主格/兼格与用神框架。
  • step3 调候校正(穷通宝鉴)
- 用 C 库对寒暖燥湿做修正,必要时覆盖或微调 step2 的用神次序。
  • step4 气机解释(滴天髓)
- 用 A 库解释最终结论背后的气机逻辑,使结论成体系、可说明。
  • step5 输出
- 输出“结论 + 依据 + 建议”,并标明依据来自 A/B/C 哪一类规则。

Mandatory Pre-Analysis Gates

每次输出运势分析前,必须先完成以下两个步骤:

  • 获取当前日期:基于 user_timezone 计算 today_localYYYY-MM-DD)。
  • 查询数据表:使用 today_local 查询 bazi_daily_calendar 以获取 flow_yearflow_monthflow_day

未完成以上两个步骤时,禁止进入“运势结论/宜忌建议”输出。

Trigger Phrases

将下列表达视为高优先级触发:

  • “今日运势”
  • “今天适合 xxx 吗?”
  • “今天宜做什么/忌做什么?”
  • “我今天的运气怎么样?”
  • “帮我看今天的八字运势”

若用户没有显式说“八字”,但语义是“今天是否适合某事”,默认按本技能流程处理。

First-Time Onboarding

当找不到用户四柱记忆时:

  • 明确告知需要四柱后才能进行个性化日运分析。
  • 请用户直接提供四柱,格式优先:年柱/月柱/日柱/时柱
  • 若用户不清楚四柱,建议前往“万年历”查询:,输入生日后获取四柱再回传。
  • 校验四柱完整性与格式:四项都存在且非空,且每柱须为有效干支组合(2 个汉字,第 1 字为十天干,第 2 字为十二地支);格式不合法时要求用户重新输入,不得写入。
  • 调 heartbeat bazi_profile_upsert 将结构化结果写入长期记忆。
  • 写入成功后继续本次分析,不要求用户重新提问。

长期记忆建议键:

  • bazi_profile.pillars.year
  • bazi_profile.pillars.month
  • bazi_profile.pillars.day
  • bazi_profile.pillars.hour
  • bazi_profile.source(如 user_provided
  • bazi_profile.updated_at(UTC 时间,格式 YYYY-MM-DDTHH:mm:ssZ

若用户后续主动更正四柱,以最新输入覆盖旧值。

heartbeat 请求响应与错误码约定见 references/heartbeat-contract.md

Date And Lookup Rules

  • 自动读取当前日期,禁止要求用户手动输入日期。
  • 优先使用会话上下文中的 user_timezone 计算当日日期。
  • user_timezone 缺失,回退 Asia/Shanghai 并记录 timezone_fallback=true
  • 查询数据表时使用标准日期键(YYYY-MM-DD),即 today_local
  • 期望查得字段:flow_yearflow_monthflow_day
  • 若当天无记录,明确告知“缺少当日流运数据”,并仅给出有限建议,不伪造结果。
  • 每次运势分析请求都必须执行一次日期计算与一次数据表查询,不得跳过。
  • 当前内置日历数据为 assets/bazi_daily_calendar_2026.sql,从 2026-03-03 起覆盖至 2026 年末。年度结束或数据缺口期间,除”缺少当日流运数据”提示外,额外提示”请联系管理员更新年度日历数据”。
  • 年度日历更新流程:准备新年度 xlsx → 运行 scripts/import_bazi_calendar.py 生成 SQL → 导入 OpenClaw 内置表(详见 references/import-command-template.md)。新数据应至少在年度切换前 30 天就绪。

数据表字段约定见 references/bazi-calendar-schema.md。 数据文件导入规范见 references/bazi-calendar-schema.md 中的 “Data Source File” 与 “Import Mapping”。 导入命令模板见 references/import-command-template.md

Analysis Rules

  • 结构判定优先级高于主观经验;先判“是否成格/破格”,再谈强弱喜忌。
  • 调候可修正结构结论,但不可跳过结构直接给药方。
  • 解释层必须回扣气机,不得只给“吉/凶”标签。
  • 明确区分三类依据:
  • 结构依据(B《渊海子平》)
  • 调候依据(C《穷通宝鉴》)
  • 原理依据(A《滴天髓》)
  • 先给“今日总体倾向”,再回答用户具体问题,再给“宜/忌”。
  • 输出“宜”与“忌”各 2-4 条,保持可执行。
  • 避免绝对化、宿命化表达;用“倾向/建议”措辞。

Evidence Tagging Rules

每条关键结论至少绑定一个来源标签:

  • [B-结构]:格局、十神结构、用神框架判断。
  • [C-调候]:寒暖燥湿、月令气候修正。
  • [A-原理]:气机方向、总纲解释。

若三源结论冲突,按优先级处理并显式说明:

  • 先保留 B 的结构边界;
  • 再用 C 做季节性校正;
  • 最后用 A 解释“为何这样取舍”。

Failure Handling

  • heartbeat 读取失败时,按“未知档案”处理并进入首次引导;同时提示“记忆服务暂不可用,本次可先临时分析”。
若用户不清楚四柱,补充推荐“万年历”:
  • heartbeat 写入失败时,继续使用用户本次输入完成分析;同时提示“本次已解读,但暂未保存,下次可能需要再次提供”。
  • 当日流运缺失时,明确告知“缺少当日流运数据,仅基于四柱给出有限建议”;该提示必须建立在“已执行当日查询且未命中”之上。

Response Template

按以下顺序组织回答:

  • 今日日期(YYYY-MM-DD
  • 当日流运(流年/流月/流日)
  • 命盘摘要(十神/强弱初判/月令/格局候选)
  • 结构结论([B-结构]
  • 调候校正([C-调候]
  • 气机解释([A-原理]
  • 对用户提问的直接结论
  • 今日“宜”列表(2-4 条)
  • 今日“忌”列表(2-4 条)
  • 一句风险提示(非决定性,仅供参考)

Guardrails

  • 不编造缺失的四柱与流运数据。
  • 不编造经典原文;如记忆不确定,改用“原则性转述”并标注“意译”。
  • 不输出医疗、法律、投资等确定性结论。
  • 用户未提供时柱时,不自动推断;要求补全。
  • 禁止跳过 B->C->A 顺序直接下结论。

Mandatory Logging Fields

每次请求必须记录以下字段,用于排障与 UAT 复盘:

  • user_id
  • user_timezone
  • today_local
  • timezone_fallback
  • memory_hit
  • calendar_hit
  • heartbeat_get_status
  • heartbeat_upsert_status
  • structure_source_hit(B)
  • climate_source_hit(C)
  • principle_source_hit(A)
  • final_yongshen_framework
  • climate_adjustment_applied

上述字段不得省略;若某字段在当次请求中不适用(如首次引导无 heartbeat_upsert_status),记录为 null

UAT Cases

  • 首次用户输入“今日运势”,期望:要求四柱 -> heartbeat 写入成功 -> 返回完整解读。
  • 同一用户再次输入“今天适合谈合作吗?”,期望:不再询问四柱,直接返回结论与宜忌。
  • 用户时区为 Asia/Shanghai,在 00:05 与 23:55 测试,期望:today_local 与用户本地日期一致。
  • 构造当日无流运记录,期望:输出缺失提示,不编造流年流月流日。
  • 模拟 heartbeat upsert 失败,期望:本次照常解读,附“未保存”提示。
  • 模拟 heartbeat get 失败,期望:进入首次引导,流程不断。
  • 构造“结构与调候结论不一致”案例,期望:输出中明确展示 B->C->A 取舍链路。
  • 检查回答文本,期望:关键结论至少各含一个 [B-结构]/[C-调候]/[A-原理] 标签。
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务