技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
lov-do-they-love-me【数据与研究】把两个人的微信私聊做成有证据的恋爱指数分析:量化互动节奏,用本地模型区分工作/情感/生活内容,再产出一张手机竖版信息图。Use when the user says “分析我们的聊天记录”“他/她爱不爱我”,or asks for a chat relationship analysis.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: lov-do-they-love-me description: > 把两个人的微信私聊做成有证据的恋爱指数分析:量化互动节奏,用本地模型区分工作/情感/生活内容,再产出一张手机竖版信息图。Use when the user says “分析我们的聊天记录”“他/她爱不爱我”,or asks for a chat relationship analysis. license: MIT compatibility: > Portable Agent Skills format. macOS for the local WeChat query handoff; Python 3.9+; Playwright for card rendering and audit; an optional local Ollama model for semantic labelling. No network access is required. depends_on:
调用 ID 是 lov-do-they-love-me,用的是英文单数 they:指一个性别未知或不必指明的人,
所以它同时覆盖 he 和 she。单数 they 的动词形式是 do,不是 does——does they 是语法错误,
这里不是笔误,后续维护、改名或本地化时不要把它「纠正」成 does。
展示名固定为「恋爱指数分析」;ID 与展示名分工不同,不要互相替换。
把一段两个人的真实聊天,做成经得起追问的结论:先量化互动节奏,再做语义分层, 最后交付一张手机竖版信息图。结论必须写清口径、样本与误差,不许把工作消息当成情感热度, 也不许把自定义指数说成对当事人情绪的测量。
用户拿到的是三样东西:可复算的中间数据、一张能直接发出去的卡片、以及这套结论的误差范围。
lov-wdb-cli。lov-mobile-infographic;本 Skill 只在没有
量化与语义结论时从数据开始。Every generated Skill is connected to the shared user-profile/v1 contract in
skill.yaml. Read the shared user, brand, workspace, preferences, and this
Skill's skills.<skill_id> namespace at the start of every run. Keep the source
portable: resolved personal values belong in the shared profile, never here.
When the user directly states a durable preference or brand fact, persist it
through scripts/profile_store.py and report the saved profile path. Put
Skill-specific values under records.<field>; use brand.<field> or
user.<field> for shared values. Do not persist inferred secrets or credentials.
See references/user-profile.md for the complete contract.
Read references/skill-composition.md before deciding whether to invoke or
extend any adjacent capability. The record distinguishes optional upstream and
downstream handoffs from embedded Kit modules. Do not silently depend on a
sibling Skill that is not shipped with this source.
You MUST follow these steps in order.
SKILL_DIR if the environment provides it.scripts/chat_metrics.py, scripts/matrix_dataset.py, scripts/export_text.py,
scripts/semantic_label.py, scripts/topic_composition.py, scripts/card_figures.py,
scripts/verify_figures.py, and the four references exist before work.When running scripts manually:
export SKILL_DIR="/path/to/lov-do-they-love-me"
Resolve context.profile on every invocation. The precedence is current request,
project context, Skill-specific profile records, shared preferences, shared
brand/user profile, then safe defaults. A direct user statement about a durable
preference or brand fact should be saved with scripts/profile_store.py record
using --confirm, followed by a concise saved-path report.
references/privacy-and-consent.md:这是第三方的私人聊天,默认只在本机处理。references/skill-composition.md.references/skill-composition.md:上游是 lov-wdb-cli,
下游是 lov-mobile-infographic;除非用户改口径,不要重新发明取数或排版。按顺序执行下面五段。每段都以文件为交接物,失败就停在该段并说明缺什么。
2.1 取数(交给 lov-wdb-cli)
用对方的昵称/备注定位唯一联系人,导出时间窗内的私聊为 JSONL,并记录本机账号与对方账号:
python3 "$WDB_SKILL/skills/wdb-query/scripts/wdb_cli.py" chats \
--contact "<昵称或备注>" --from <起> --to <止> --limit 5000 --format jsonl > messages.jsonl
先跑 stats 看体量与分日分布,再决定窗口。记录 truncated 与 meta.errors;
不要在卡面或报告里写出账号、库路径、表名。
2.2 量化
python3 "$SKILL_DIR/scripts/chat_metrics.py" \
--messages messages.jsonl --me <本机账号> --other <对方账号> --out metrics.json
python3 "$SKILL_DIR/scripts/matrix_dataset.py" \
--messages messages.jsonl --me <本机账号> --other <对方账号> --out matrix.json
口径细则见 references/chat-metrics.md。idx 只是活动度指数,写清权重,别称它为情绪。
2.3 语义分层(默认全本地)
python3 "$SKILL_DIR/scripts/export_text.py" \
--messages messages.jsonl --me <本机账号> --other <对方账号> --out label_input.jsonl
python3 "$SKILL_DIR/scripts/semantic_label.py" \
--input label_input.jsonl --out labels.jsonl --model qwen3:8b --batch 20 --context 40
references/semantic-taxonomy.md。other,其余带上一条上文交给模型。规则层在
本项目覆盖 10% 的消息且校准集上全对;--context 0、--no-prerules 只用于对比。gold.json,先跑
semantic_label.py --input label_input.jsonl --eval-gold gold.json --report accuracy.json,
把这个配置的 accuracy.json 作为结论门槛。--backend remote --api-key-env <ENV>,密钥只走环境变量。python3 "$SKILL_DIR/scripts/topic_composition.py" \
--labels labels.jsonl --out composition.json --accuracy accuracy.json \
--weeks-start <第1周周一> --weeks <周数>
2.4 出图
python3 "$SKILL_DIR/scripts/card_figures.py" \
--matrix matrix.json --composition composition.json --metrics metrics.json \
--outdir figures --partner-label "<对方昵称>"
得到 figure-matrix.svg、figure-composition.svg、figure-weekly.svg 与 card-data.json。
版式与注入位置见 references/card-blueprint.md。
2.5 成卡(交给 lov-mobile-infographic)
用该 Skill 的 scaffold → author → render → audit 流程,把三张 SVG 注入对应区块,
标题用「恋爱指数分析」,定位标签写「分析对象:<昵称>」,全卡只留一句结论。
lov-mobile-infographic 的 audit --strict --human-review passed。python3 "$SKILL_DIR/scripts/verify_figures.py" --card card.html --out verify.json
(SVG 标签重叠、溢出、越出画布、被自身 viewBox 裁切)。图上标题与轴标签必须逐个回读确认。skill-card.yaml, cases/cases.json, and pricing-card.yaml as the
standard trust bundle for this Skill.chat_metrics、matrix_dataset、export_text、
topic_composition、card_figures 无需第三方包)。verify_figures,以及下游卡片渲染与审计)。qwen3:8b);未安装时必须停下来说明,
不要静默改用外部 API。lov-wdb-cli(取数)与下游 lov-mobile-infographic(成卡)都是可选交接,
不是隐藏依赖:缺少它们时仍可交付 metrics.json/composition.json 等中间结论。python3 "$SKILL_DIR/scripts/chat_metrics.py" --help
python3 "$SKILL_DIR/scripts/semantic_label.py" --help
python3 "$SKILL_DIR/scripts/verify_figures.py" --card <card.html>
python3 scripts/validate_skill.py .
运行前读取本 Skill 包的 skill.yaml,由宿主提供 skill-runtime/v1 上下文。字段解析顺序为:当前请求、项目上下文、Skill 专属记录、个人 Preferences、品牌/用户 Profile、通用默认值。
skills.lov-do-they-love-me.records 保存本 Skill 的持久化记录。scripts/profile_store.py 原子写回 Profile,并在结果中报告保存路径。required: true 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题。context_id、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
task-specific(仅本次)还是 reusable(可跨任务复用)。task-specific 只修改当前任务,不改 Skill。reusable 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。reusable 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。