← 返回
未分类 中文

Life State

Daily mood / energy / soreness / sleep capture primitive. Other lifekit skills read this to make state-aware suggestions instead of generic templates.
每日情绪/精力/酸痛/睡眠采集。其他lifekit读取此数据,实现状态感知建议,替代通用模板。
dsdevq
未分类 clawhub v0.1.0 1 版本 99641.6 Key: 无需
★ 0
Stars
📥 278
下载
💾 0
安装
1
版本
#latest

概述

life-state

A boring, durable state primitive. NOT a chat experience — it's the integration glue that lets other skills (morning_brief, future workout suggester, bedtime brief) adapt to your current state instead of returning the same template every day.

When to invoke

User describes how they feel, their energy level, soreness, or sleep quality. Examples:

  • "feeling tired today, energy 4, sore chest"
  • "slept well, energy 8"
  • "good mood but quads are wrecked"
  • "headache, low energy"
  • "morning check-in: normal mood, energy 6, slept ok"

How to invoke

Use the life-state CLI via Bash. YAML output to stdout.

Capture state (merge semantics — only updates the fields you pass)

life-state set --mood tired --energy 4 --sore chest,triceps --sleep poor --note "headache, late night"

Flags (all optional, at least one required):

  • --mood great | good | normal | tired | terrible (freeform accepted; lowercased)
  • --energy — 1-10 (rejected outside that range)
  • --sleep good | ok | poor (freeform accepted)
  • --sore — comma-separated muscle groups (e.g. chest,triceps)
  • --note "" — free-text annotation
  • --date YYYY-MM-DD — override (default: today)

Merge semantics: calling set twice on the same day updates only the fields passed. Morning check-in + post-workout check-in compose cleanly.

Read today's state

life-state get
life-state get --date 2026-05-15

Week aggregate

life-state week              # last 7 days
life-state week --days 14    # last 14 days

Returns avg energy, mood histogram, top soreness areas, and per-day rollup.

Data location

~/.life/state/.json — one JSON file per day. Stable, known location every other lifekit skill should read from.

Schema:

{
  "date": "2026-05-15",
  "mood": "tired",
  "energy": 4,
  "soreness": ["chest", "triceps"],
  "sleep_quality": "poor",
  "note": "headache, late night",
  "updated_at": "2026-05-15T19:30:00.000Z"
}

Notes for the agent

  • Don't be Sol. This skill has no personality — capture the state and confirm tersely. Personality belongs in morning_brief, not here.
  • Parse loosely from natural language. "feeling tired, energy 4" → --mood tired --energy 4. "sore chest and triceps" → --sore chest,triceps.
  • Merge, don't replace. If user adds "energy 6 now" later in the day, only update --energy. Don't wipe morning mood.
  • Recommend the enum values when you summarize back, but accept freeform — if a user says "drained" or "wired," store it verbatim; downstream skills can pattern-match or pass-through.
  • Other skills should read this state at the start of their flow:
  • morning_brief: read yesterday's sleep_quality + today's energy to vary breakfast / day prep
  • workout suggester (when built): read today's energy + soreness to adapt volume
  • bedtime brief: read today's note to tailor wind-down

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-20 05:42 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 676 📥 325,308
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,376 📥 320,263
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,225 📥 267,708