Emotion State
/install emotion-state
Emotion State (NL) Skill
This skill describes how to install and configure the Emotion State hook, which
adds a compact emotion_state block to the system prompt.
What it does
- Evaluates user and agent emotions as short natural-language phrases.
- Stores per-user emotion state across sessions in the agent state directory.
- Injects the latest entries plus a decayed trend line into the system prompt.
Install & enable (workspace hook)
- After installing the skill, copy the bundled hook into your workspace:
cp -R ./skills/emotion-state/hooks/emotion-state ./hooks/
- Enable the hook in OpenClaw:
openclaw hooks enable emotion-state
- Restart the OpenClaw gateway.
Configuration
Set environment variables for the hook via OpenClaw config, e.g. in
~/.openclaw/openclaw.json:
{
"hooks": {
"internal": {
"enabled": true,
"entries": {
"emotion-state": {
"enabled": true,
"env": {
"EMOTION_CLASSIFIER_URL": "",
"OPENAI_API_KEY": "YOUR_KEY",
"OPENAI_BASE_URL": "https://api.openai.com/v1",
"EMOTION_MODEL": "gpt-4o-mini",
"EMOTION_CONFIDENCE_MIN": "0.35",
"EMOTION_HISTORY_SIZE": "100",
"EMOTION_HALF_LIFE_HOURS": "12",
"EMOTION_TREND_WINDOW_HOURS": "24",
"EMOTION_MAX_USER_ENTRIES": "3",
"EMOTION_MAX_AGENT_ENTRIES": "2",
"EMOTION_MAX_OTHER_AGENTS": "3",
"EMOTION_TIMEZONE": "America/Los_Angeles"
}
}
}
}
}
}
Notes
- The hook stores state at
~/.openclaw/agents/\x3CagentId>/agent/emotion-state.json. - It does not store raw user text; only model-inferred reasons.
- If the classifier fails, entries fall back to
neutral/low/unsure.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install emotion-state - After installation, invoke the skill by name or use
/emotion-state - Provide required inputs per the skill's parameter spec and get structured output
What is Emotion State?
NL emotion tracking + prompt injection via OpenClaw hook. It is an AI Agent Skill for Claude Code / OpenClaw, with 2718 downloads so far.
How do I install Emotion State?
Run "/install emotion-state" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Emotion State free?
Yes, Emotion State is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Emotion State support?
Emotion State is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Emotion State?
It is built and maintained by tashfeenahmed (@tashfeenahmed); the current version is v1.2.0.