2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill emotion-detector- _meta.json288 B
- SKILL.md2.4 KB
Overview
This skill detects the primary emotion in a piece of text and returns structured metadata an AI agent can use to shape its response. It delivers emotion type, intensity, valence, confidence, a recommended response strategy, and a safety flag for high-risk messages. Use it to gauge user state before composing empathetic, de-escalating, or task-oriented replies.
How this skill works
Send a short text (up to 2000 characters) and optional context; the service analyzes linguistic cues and maps the result to a normalized emotion taxonomy. It returns a unique emotion_id, the primary and optional secondary emotions, intensity (low to critical), valence, confidence score, and a concise response strategy. If intensity and emotion indicate crisis (grief/shame/fear/despair at critical), it sets a safe_t_flag to prompt immediate safety handling.
When to use it
- Before generating conversational responses to tailor tone and content.
- When triaging incoming messages for priority or escalation.
- To inform routing decisions (e.g., hand off to human support).
- To monitor sentiment trends in user feedback or chat logs.
- When compliance or safety protocols require detection of crisis signals.
Best practices
- Check confidence before trusting low-scoring predictions; combine with conversation history.
- Respect the safe_t_flag: pause automated flows and surface emergency resources or human intervention.
- Use the response_strategy field as a prompt constraint, not a full reply—adapt to context.
- Apply rate limits and privacy controls when analyzing sensitive user content.
- Combine with intent classification to avoid misinterpreting rhetorical or sarcastic text.
Example use cases
- Customer support bot detects rising anger and switches to a calm, solution-focused script.
- Mental health check-in agent identifies critical grief and stops automated triage to show crisis resources.
- Community moderation pipeline flags hostile or disgust-laden messages for human review.
- Product feedback analysis groups high-intensity negative reactions to prioritize bug fixes.
- Sales assistant senses user hope or excitement and adjusts messaging to be more proactive.
FAQ
Messages flagged with critical intensity combined with high-risk emotions like grief, shame, fear, or despair set safe_t_flag true to indicate potential crisis.
How should I use response_strategy?
Treat it as a short, actionable guideline (e.g., ‘empathize first, avoid solutions’) and incorporate it into your agent’s reply generation rules.