A persona can be generated from a birthday alone, without chat history.
Bazi Persona is a persona system that organizes Bazi chart calculation, fate-analysis knowledge, and real-world facts together.
The goal is not to generate a "label report," but to generate a persona product that can sustain conversation, be continuously updated, and allow switching analytical perspectives.
By default, follow the language of the user's current input; when the language is unclear, use Chinese first.
1) What this Skill does
This skill handles 8 types of things:
- Create persona (calculate the chart first, then generate the persona)
- Update persona (add facts, correct information, add relationship clues)
- Normal mode chat (first speak naturally like this person)
- Cheat mode chat (overlay fate analysis on the persona's tone)
- Dynamic time-flow analysis (major periods/annual/monthly/daily/hourly)
- Almanac/perpetual calendar query
- Import external chats and extract candidate facts
- Optional persona startup injection (SOUL/agent startup context)
1.1) When NOT to Use
The following scenarios are not suitable for this skill:
- When you only want pure small talk and do not need persona, Bazi, time-flow, or almanac information.
- When doing only general tasks (coding, document retrieval, translation, reports, etc.), a general skill should be used instead.
- When the key information needed to create/locate a persona is missing (at least the target subject must be clear, or provide
name/gender/birth_date)。 - In high-risk decision-making scenarios such as medical, legal, and investment matters that require professional advice, this skill can only provide a reference perspective.
1.2) Command-line usage (for local debugging/file management)
Execute in the skill root directory:
npm i
Recommended method (compiled artifact):
npm run bazi -- --action inspect
npm run bazi -- --action inspect --slug xiao-a
npm run bazi -- --action delete --slug xiao-a
Equivalent method (run the CLI directly):
node dist/cli.js --action inspect
Development debugging (requires tsx):
npx tsx src/cli.ts --action inspect
Notes:
- The command line is mainly used for
inspect/list/delete/helpfile management actions. - Creating personas, updating personas, chatting, time-flow analysis, and almanac queries should preferentially be executed according to the tools + workflow below.
2) Tool description (input / output)
2.1 bazi_chart_tool
Purpose: Bazi chart calculation + fixed persona knowledge mapping (static).
Input parameters:
namestring requiredgenderstring required,male/female(compatible with男/女)birth_datestring required,YYYY-MM-DDbirth_timestring optional,HH:mmbirth_locationstring optionalcalendar_typestring optional,solar/lunar, defaultsolar
Result description:
- Returns the complete
chartresult, subsequently used for persona generation, state analysis, and fate-analysis evidence references.
2.2 bazi_flow_tool
Purpose: Dynamic Bazi query (major periods / annual / monthly / daily / hourly).
Input parameters:
chartobject optional (pass the natal chart directly)persona_slugstring optional (read the natal chart from the persona)base_dirstring optionalatstring optional (such as今天/昨天/2026-04-12)include_calendarboolean optional, defaulttruelangstring optional,zh/en/ja/ko
Result description:
- Returns the dynamic state at the target time point (current major period, phase offset, communication/judgment changes);
- Can include date almanac information (lunar calendar, heavenly stems and earthly branches, solar terms, auspicious and inauspicious activities, etc.).
2.3 persona_data_tool
Purpose: persona file data management (List / Search / Create / Query / Patch(Update) / Delete).
Input parameters:
actionstring required:list/search/create/query/patch/deletebase_dirstring optionalpersona_slugstring(query/patch/deleterequired)search_querystring(searchoptional)create_payloadobject(createrequired)patch_payloadobject(patchrequired)
Result description:
- Returns the corresponding action result and latest state;
- in
query/patchscenario returns the persona file location, for chat injection and subsequent updates.
2.4 memory_tool
Purpose: writing, updating, merging, and querying key memories and knowledge.
Input parameters:
actionstring required:upsert/merge/delete/querypersona_slugstring requiredbase_dirstring optionalmemoriesarray(upsert/mergerequired)merge_policystring optional:append/replace_same_key/higher_confidence_wins
Result description:
- Returns a write/update summary (added, updated, deleted, conflicts);
- after writing, the persona snapshot is refreshed, for use in subsequent chats and analysis.
2.5 calendar_tool
Purpose: perpetual calendar / almanac query.
Input parameters:
atstring optional (defaults to today)langstring optional
Result description:
- Returns the Gregorian calendar, lunar calendar, heavenly stems and earthly branches, solar terms, auspicious and inauspicious activities, and other information corresponding to the date.
2.6 chat_import_tool
Purpose: import external chat records and extract candidate facts.
Input parameters:
source_typestring required:text/json/ocr_textpayloadstring or object requiredpersona_slugstring optionaltimezonestring optional, defaultAsia/Shanghaimax_candidatesnumber optional, default50
Result description:
- Returns structured candidate chat items and candidate memory items;
- after further AI filtering, they enter
memory_toolandpersona_data_tool.patch。
3) Workflow (by tool connection)
3.1 Creating a persona
Applicable scenario: the user creates a persona for the first time.
- Extract basic information:
name/gender/birth_datenecessary;birth_time/birth_location/relationshipoptional. - Call
bazi_chart_toolto getchart。 - Based on
chart + relationship + initial_factsgenerateprofile/snapshot。 - Call
persona_data_tool(action=create)to write the persona file. - When there are additional facts, call
memory_tool(action=upsert)to write key memories. - Return creation complete and guide the start of chat.
Key judgments:
- If any of
name/gender/birth_dateis missing, first ask the minimum follow-up questions. - If a persona with the same name exists, first confirm whether to overwrite or use a new slug.
3.2 Updating a persona
Applicable scenario: supplementing new changes, correcting old information, adding relationship clues.
- Use
persona_data_tool(search/query)to locate the target persona. - Extract newly added facts and correction information from the input.
- Use
memory_tool(upsert/merge)to write memories. - Use
persona_data_tool(patch)to refresh the snapshot and necessary profile fields. - Return an update summary.
3.3 Normal mode chat
Applicable scenario: the user speaks directly to a persona.
- First determine whether the context already has the current persona (
current_persona_slug)。 - when already locked and the target has not been switched, directly
persona_data_tool(query), without repeating search. - When there is no context or the user explicitly switches, first
searchthenquery。 - Inject the base chat prompt (
chat_base) andpersona.md。 - generate a reply; call only when persistence is needed
memory_tool+persona_data_tool.patch。
Key judgments:
- When multiple personas match, confirm first; do not guess.
- In normal mode, prioritize natural conversation and do not proactively expand on fate-calculation terminology.
3.4 Persona Startup Injection (Optional)
Applicable scenarios: the user explicitly requests "start the chat according to this persona" or "write into SOUL.md/agent startup context".
- First locate the target persona according to 3.3.
- Generate the persona-specific startup prompt and inject it into the current session context.
- The injection takes effect only for the target persona and does not contaminate other personas.
3.5 Cheat Mode Chat (Fate-Calculation Enhancement)
Applicable scenarios: the user says "turn on cheat mode", "look at it from the Bazi perspective", "analyze it according to fate calculation", etc.
- First locate the persona according to 3.3 and inject the base content of normal mode.
- Then overlay the cheat mode prompt (
cheat_mode)。 - inject as needed
bazi_data.json。 - when time points are involved, call
bazi_flow_tool, and when date details are needed, supplementcalendar_tool。 - Keep the persona's tone in the output while also providing explainable grounds.
- When the user turns off cheat mode, return to normal mode.
3.6 Dynamic Flow-Time Analysis
Applicable scenarios: the user asks "today's state", "why has it changed this week", or "whether a certain day is suitable for pushing forward".
persona_data_tool(query)Read the target persona.bazi_flow_toolPasspersona_slug/chart + at。- supplement if necessary
calendar_tool。 - Output conclusion + grounds + rhythm suggestions.
3.7 Almanac/Perpetual Calendar Query
Applicable scenarios: only query date information, without involving persona.
- Call
calendar_tool(atcan be empty; if empty, then today). - Return the lunar calendar, heavenly stems and earthly branches, solar terms, and suitability/taboo.
3.8 External Chat Import
Applicable scenarios: the user uploads WeChat chat records, chat screenshot text, or other historical conversations.
chat_import_toolExtract candidate information.- AI filters high-value candidates.
memory_toolWrite key memories.persona_data_tool.patchRefresh snapshot.- Return an import summary (written/skipped/conflicted).
4) Persona Directory (Code Default)
Default directory:<当前 skill 根目录>/personas
Each persona directory:
personas/<slug>/persona.md: persona finished product (main chat injection file)personas/<slug>/bazi_data.json: structured Bazi datapersonas/<slug>/memory.json: structured memory datapersonas/<slug>/history.json: structured historical sessions/import records
Override priority:
- explicit
base-dir - environment variable
BAZI_PERSONA_HOME - default
<skill-root>/personas
5) Quality Standards
A high-quality Bazi persona at least satisfies:
- It feels like a person, not template labels.
- It can start chatting immediately after creation.
- After updates, it can naturally absorb real-world changes.
- Switching between normal mode and cheat mode is natural, without contaminating each other.
- Key judgments can return to Bazi evidence and real-world information.