chinese-kin-relationship

star 0

Calculates Chinese kinship relationship names (亲戚关系计算器). Use when the user asks how to address a relative, what to call someone given a relation chain (e.g. 爸爸的妈妈的弟弟), or for 亲戚/称呼/称谓. Uses the relationship.js npm package.

fyhao By fyhao schedule Updated 2/15/2026

name: chinese-kin-relationship description: Calculates Chinese kinship relationship names (亲戚关系计算器). Use when the user asks how to address a relative, what to call someone given a relation chain (e.g. 爸爸的妈妈的弟弟), or for 亲戚/称呼/称谓. Uses the relationship.js npm package. metadata: dependency: relationship.js script: scripts/calc.mjs

Chinese Kin Relationship (亲戚关系计算器)

Resolve Chinese kinship relation chains to the correct form of address (称呼). User inputs a chain like 爸爸的妈妈的弟弟 and gets the kin name(s), e.g. 舅外公 / 舅爷爷.

When to use

  • User asks what to call a relative given a description (e.g. "爸爸的妈妈的弟弟叫什么")
  • User asks "亲戚关系" / "称呼计算" / "如何称呼"
  • User provides a 的-chain of relations and wants the 称呼

Dependency

Uses the relationship.js npm package ( mumuy/relationship ). Install in the skill directory:

cd workspace/skills/ChineseKinRelationship
npm install

Quick usage: run the script

Pass the relation chain as a single argument (use quotes if it contains spaces or special chars):

node scripts/calc.mjs "爸爸的妈妈的弟弟"
# => ["舅爷爷"]

node scripts/calc.mjs "妈妈的妈妈的哥哥"
# => ["舅外公"]

node scripts/calc.mjs "外婆的哥哥"
# => ["舅外公"]

Reply to the user with the resulting 称呼 (one or more options). If multiple results, list them (e.g. "舅外公 或 舅爷爷").

Using relationship.js in code

When integrating in Node:

const relationship = require('relationship.js');

// 我称呼对方:关系链 → 称呼
relationship({ text: '爸爸的妈妈的弟弟' });
// => ['舅外公', '舅爷爷']

// 对方称呼我(reverse: true)
relationship({ text: '七舅姥爷', reverse: true, sex: 1 });
// => ['甥外孙']

// 称呼 → 关系链(type: 'chain')
relationship({ text: '舅公', type: 'chain' });
// => ['爸爸的妈妈的兄弟', '妈妈的妈妈的兄弟', ...]

// 两人关系合称(type: 'pair')
relationship({ text: '外婆', target: '奶奶', type: 'pair' });
// => ['儿女亲家']

Options:

Option Meaning
text Relation chain (的 separated) or a single 称呼 when type is 'chain'
target For type 'pair': second person's 称呼
sex 0 = 女性, 1 = 男性 (affects 称呼 when ambiguous)
reverse true = 对方称呼我, false = 我称呼对方
type 'default' = 称呼, 'chain' = 关系链, 'pair' = 两人合称

Examples

User query / input Output (examples)
爸爸的妈妈的弟弟 舅爷爷
妈妈的妈妈的哥哥 舅外公
外婆的哥哥 舅外公
七舅姥爷应该叫我什么? 甥外孙 (use reverse:true, sex:1)
舅公是什么亲戚? 爸爸的妈妈的兄弟 等 (use type:'chain')

Notes

  • Some 称呼 have regional variants (南北方差异); the library returns common options.
  • Relation chain syntax: 爸爸、妈妈、哥哥、弟弟、姐姐、妹妹、老公、老婆 等,用「的」连接。
Install via CLI
npx skills add https://github.com/fyhao/chinese-kin-relationship-skills --skill chinese-kin-relationship
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator