Skip to content
Back to skills

Emotion State

ASecurity

NL emotion tracking + prompt injection via OpenClaw hook

  • 21 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 7, 2026
ai-agentsbashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill emotion-state --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Emotion State?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Emotion State
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-emotion-state/badge)](https://www.skillsdirectory.com/skills/modbender-emotion-state)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: emotion-state
description: NL emotion tracking + prompt injection via OpenClaw hook
---
# 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)

1) After installing the skill, copy the bundled hook into your workspace:

```bash
cp -R ./skills/emotion-state/hooks/emotion-state ./hooks/
```

2) Enable the hook in OpenClaw:

```bash
openclaw hooks enable emotion-state
```

3) Restart the OpenClaw gateway.

## Configuration

Set environment variables for the hook via OpenClaw config, e.g. in
`~/.openclaw/openclaw.json`:

```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/<agentId>/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`.

Files in this skill

  • SKILL.md1.9 KB
  • hooks/emotion-state/HOOK.md1.5 KB
  • hooks/emotion-state/handler.ts21.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.