家庭档案管理 — 当用户提到自己或家人的喜好、兴趣、习惯、身体状况、作息规律、家庭规则时激活,无论用户是否明确要求"记录"。也在用户修正已有记录、要求删除、或查询家庭档案时激活。
67
84%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
记录家庭档案的目的不是"存档",而是让 miloco 越来越懂这家人——后续控制设备、给建议、写通知都会参考档案,贴合成员的偏好与习惯。所以记得准、记得全,比记得多更重要:脏数据(重复、过期、张冠李戴)会让后续操作变笨。
主动场景:
被动场景(对话中自然提及,无需用户说"记录"):
被动场景下,先完成用户当前请求的主要回答,然后静默写入档案(无需向用户确认)。
操作家庭档案使用 miloco-cli home-profile 命令,不要直接编辑 profile.md 文件:
miloco-cli home-profile list --target profile — 查看当前档案miloco-cli home-profile profile-write --ops '...' --user-edit — 写入/更新/删除条目miloco-cli home-profile commit — 提交保存miloco-cli home-profile list --target profile。
家庭档案不再随系统提示词注入,必须每次现拉:写入要条目 id(merge / replace / delete 都要 id),不拉全量会写重复 / 改错条目,查询只凭记忆会漏答。每次都重新拉、不要复用上一轮输出(档案随时可能被其它 session 更新)。
miloco-cli home-profile profile-write 并带 --user-edit):
add,传入 entrymerge,传入 idreplace,传入 id + entrydelete,传入 idmiloco-cli home-profile commit 保存miloco-cli home-profile profile-write --user-edit --ops '[
{"op": "add", "entry": {"type": "member_preference", "subject_id": "<person_id 或留空>", "subject_name": "爸爸", "content": "喜欢 24°C 制冷", "evidence_log": ["2026-05-29 20:10: 用户告知爸爸偏好24度"]}}
]'entry 字段:
miloco-cli identity member list 查得);其它类型留空--user-edit 时自动设定)--user-edit 时自动设定)| type | 含义 | 示例 |
|---|---|---|
| member_persona | 成员画像(家庭角色、身份、外貌) | "爸爸是家里的主厨" |
| member_health | 体质健康(过敏、禁忌、慢性病) | "妈妈对花粉过敏" |
| member_routine | 日常习惯(作息、出行规律) | "爸爸通常 7:30 出门上班" |
| member_entertain | 娱乐习惯(观影、游戏、音乐) | "妈妈睡前听白噪音" |
| member_preference | 个人偏好(温度、光线、饮食) | "爸爸喜欢 24°C 制冷" |
| family | 全家共同遵守的规则/约定(仅规则,非家庭构成信息) | "22:00 后全屋静音"、"访客来访自动开走廊灯" |
| space | 空间环境(户型、朝向、动线) | "主卧空调出风口对床头" |
| device | 设备信息(常用功能、操作习惯) | "客厅空调制冷需 5 分钟达温" |
subject_id = 身份库 person_id(优先);subject_name = 成员名(如"爸爸"),多成员共同适用时 subject_name = "shared" 且 subject_id 留空subject_name 固定为 "shared"(家庭规则天然多主体)subject_name = 空间名或设备名(如"主卧"、"小米空调"),通用信息 subject_name = "general"family 只指"全家共同遵守的规则/约定",不是家庭相关信息的兜底类。以下两类常被误塞进 family,各有归处:
宠物 — 视为非人成员主体(不进人身份库、不走人脸识别)。先查开关 miloco-cli config get features.pet_recognition --value-only(输出 True / False),按开 / 关分流:
miloco-cli pet add --name <宠物名> --species <猫/狗/其他> 拿 pet_id;各维度按 member_* 写入,subject_id = 该 pet_id、subject_name = 宠物名。member_*、subject_id 留空、subject_name = 宠物名(纯家庭事实、一直可见;日后开启并注册后 commit 会按名收敛回 pet_id)。
member_persona(开:subject_id=<pet_id> / 关:subject_id 留空,subject_name="旺财")member_routine(subject_id / subject_name 同上)member_persona:按「物种 → 体型 → 主毛色/花纹 → 毛长 → 显著标记」凝成一句(如"中等体型的黑色短毛英短猫,尾巴尖一撮白毛"),供感知在画面中区分与称呼;把握不大的维度(如品种)宁可不写。
miloco-miot-pet-register skill(对话端到端注册:文字通路建壳+外观 / 素材通路再加识别参照,均确认后落库),或引导 web「宠物」页「自动生成」。本 skill 处理的是泛档案里顺带提到的宠物事实(作息/习惯/健康 + 首次提及建壳)——顺带遇到的纯文字外观也可直接写 member_persona。家庭构成 / 成员关系(家里几口人、谁是谁的什么人)→ member_persona,subject_name 为对应成员;全家整体构成用 subject_name="shared"。
cad239d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.