← Back to Skills Marketplace
gongyu0918-debug

情绪.skill / Emotion Skill

by gongyu0918-debug · GitHub ↗ · v1.2.2 · MIT-0
darwinlinuxwin32 ✓ Security Clean
245
Downloads
0
Stars
0
Active Installs
16
Versions
Install in OpenClaw
/install emotion-skill
Description
Positive routing for coding agents under pressure. Use when repo debugging, scoped implementation, repeated-failure recovery, evidence-demanding review, caut...
README (SKILL.md)

Emotion Skill

Emotion Skill is a small runtime router for coding agents.

It reads the latest user turn, recent dialogue, retries, delay pressure, optional host state, and optional feedback from the last routing decision. It then returns a compact host contract that tells the agent how to work this turn.

The core rule: internal user-state signals must become positive execution instructions. Production hosts should pass guidance.system_prompt_addendum, response_constraints, and routing into the model. Raw affect fields stay internal unless audit mode is explicitly enabled.

Use It When

  • A bug fix has failed more than once.
  • The user asks for evidence, exact checks, logs, or root cause.
  • The user says to touch only specific files or avoid config drift.
  • A tool call, session, queue, or heartbeat path has gone silent.
  • The user says the work is good and the agent should close out.
  • The agent needs to choose between collect, steer, and interrupt modes.

What It Returns

Use the host command for real integration:

python scripts/emotion_engine.py host --message "Show me the basis before changing more files." --pretty

Default host shape:

{
  "mode": "skeptical",
  "route_reasons": ["repeat_failure_pressure", "evidence_requested"],
  "response_constraints": ["show_basis_first", "name_verification_steps"],
  "guidance": {
    "system_prompt_addendum": "The user wants evidence before more changes. Start with a verification point, command, or log excerpt, then give the conclusion and next step.",
    "tone": "evidence_first"
  },
  "routing": {
    "reply_style": "evidence_then_act",
    "verification_level": "high",
    "queue_mode": "collect",
    "prefer_main_thread": true,
    "progress_update_interval_sec": 20
  }
}

Default output deliberately keeps raw labels and raw emotion_vector out of the host prompt path. This keeps the skill from amplifying negative state words inside the model context.

Host Fields

  • guidance.system_prompt_addendum: positive instruction text for the host LLM.
  • guidance.tone: compact tone target such as evidence_first, careful_and_bounded, or guarded_closeout.
  • response_constraints: compact reply guardrails.
  • route_reasons: enum-like routing codes for logs and telemetry.
  • routing.reply_style: response posture.
  • routing.verification_level: checking depth.
  • routing.queue_mode: collect, steer, or interrupt.
  • routing.prefer_main_thread: keep the work on the main turn when user trust or clarity needs it.
  • routing.progress_update_interval_sec: progress cadence for long-running work.
  • satisfaction_lock: closeout guard after success.
  • interaction_state: positive host-facing axes: clarity, trust, engagement.
  • state.state_delta: action-named shifts such as needs_concrete_unblock, needs_evidence_first, or needs_alignment_check.
  • memory.should_persist: host-side persistence recommendation.

Input Contract

Smallest valid payload:

{
  "message": "latest user message"
}

Production payload:

{
  "message": "Only touch the parser file and show the failing path first.",
  "history": [
    {"role": "user", "text": "earlier user turn"},
    {"role": "assistant", "text": "earlier assistant turn"}
  ],
  "runtime": {
    "response_delay_seconds": 20,
    "unresolved_turns": 3,
    "bug_retries": 2,
    "same_issue_mentions": 2,
    "queue_depth": 1,
    "background_tasks_running": 1,
    "last_routing_outcome": {
      "mode_was": "skeptical",
      "user_followed_up_with": "still broken"
    }
  },
  "last_state": {
    "vector": {},
    "emotion_vector": {},
    "ttl_seconds": 1200
  },
  "calibration_state": {},
  "user_profile": {}
}

Malformed JSON, missing files, and top-level arrays return exit code 2 with a single-line error.

Raw Affect Audit Mode

For audit and calibration only:

{
  "host_capabilities": {
    "include_raw_emotion": true
  }
}

This adds diagnostics.internal.labels, diagnostics.internal.emotion_vector, raw state_delta, and mode_scores. Keep these fields out of normal LLM prompts.

Runtime Commands

Command Purpose
host compact production contract
run full diagnostics
screen deterministic first pass
confirm final state and weight schedule
predict risk, stall, patience, and semantic-pass budget
route routing only
guide short-probe guidance
overlay overlay prompt inspection
posthoc review-pass and calibration inspection

Persistence Boundary

The core engine is stateless. It returns JSON, makes no network calls, and writes only when --output is provided.

The minimal host adapter writes three host-owned JSON files under --store-dir when persistence is enabled:

  • user_profile.json
  • last_state.json
  • calibration_state.json

Use --no-persist for read-only previews. Use --ignore-bad-store to skip corrupt store files and continue from empty values.

Integration Pattern

  1. Run host when a user turn arrives.
  2. Put guidance.system_prompt_addendum before the model's task instructions.
  3. Put overlay_prompt near the runtime metadata.
  4. Feed response_constraints into reply planning.
  5. Feed routing into queue, heartbeat, progress cadence, and subtask policy.
  6. Apply satisfaction_lock after success.
  7. Persist memory.proposed_calibration_state only in host-owned storage.

Published Bundle

ClawHub publish now ships the runtime-facing subset only:

  • SKILL.md
  • README.md
  • README.zh-CN.md
  • CHANGELOG.md
  • agents/openai.yaml
  • scripts/emotion_engine.py
  • scripts/minimal_host_adapter.py
  • scripts/download_smoke.py
  • demo/local_history_event.json
  • references/examples.md
  • references/model-prompts.md
  • references/emotion-value-model.md
  • references/emotion-policy-matrix.md
  • references/integration-openclaw-hermes.md

The full GitHub repo keeps the heavier regression, audit, and calibration assets.

Validation

Published-bundle smoke:

python scripts/download_smoke.py

Full GitHub validation:

python scripts/alignment_test.py
python scripts/ablation_test.py
python scripts/smoke_test.py --seed 20260424 --strict
python scripts/independent_audit.py
python scripts/marketplace_tag_audit.py
python scripts/feature_gate_audit.py
python scripts/bundle_manifest_check.py

Current local regression results:

  • alignment: 70/70
  • ablation: 333/333
  • strict smoke: ok
  • independent audit: ok
  • download smoke: ok
  • bundle manifest: ok

Good Fit

Use it for coding-agent orchestration, repository debugging, scoped edits, verification-first replies, and closeout behavior after success.

Use a different skill for general emotional memory, roleplay, personal journaling, or long-term personality simulation.

Usage Guidance
This package appears coherent and local: it computes routing/guidance JSON and only writes three documented host files when you enable persistence. Before installing to production: (1) run the included smoke test (python scripts/download_smoke.py) to confirm behavior in your environment; (2) inspect the full scripts/emotion_engine.py for any unexpected network calls (the docs state none, but review the full file if you need high assurance); (3) pick a secure, host-controlled --store-dir and review what will be persisted (user_profile.json, last_state.json, calibration_state.json); (4) be cautious if you enable raw-affect audit (host_capabilities.include_raw_emotion) because that exposes internal labels/emotion_vector to the host output; (5) if you do not want implicit invocation, review agents/openai.yaml (allow_implicit_invocation) and your host policy before enabling automatic routing. Overall the skill is internally consistent with its stated purpose.
Capability Analysis
Type: OpenClaw Skill Name: emotion-skill Version: 1.2.2 The emotion-skill bundle is a sentiment analysis and orchestration engine designed to help AI agents adjust their behavior based on user frustration, urgency, or skepticism. The core logic in scripts/emotion_engine.py uses extensive keyword matching and heuristic scoring to generate system prompt addenda and routing instructions, operating entirely locally using the Python standard library with no network access. The persistence mechanism in scripts/minimal_host_adapter.py is limited to local JSON state files, and the provided documentation (SKILL.md, README.md) contains legitimate instructions for agent integration without any evidence of malicious prompt injection or data exfiltration.
Capability Assessment
Purpose & Capability
The name/description (positive routing for coding agents) matches the files and runtime behavior: the engine computes routing/guidance fields and the adapter persists small host-owned JSON profiles/state. No unrelated env vars, binaries, or cloud credentials are requested.
Instruction Scope
SKILL.md and the code focus on ingesting recent user turns, runtime pressure metadata, and optional store state to emit a compact host contract. The minimal_host_adapter reads/writes only the documented host files (user_profile.json, last_state.json, calibration_state.json) and merges store with incoming event payloads as expected. The skill documents an explicit audit opt-in for raw affect and warns not to inject raw labels into model prompts.
Install Mechanism
No install spec; runtime is Python-only using the standard library. scripts/download_smoke.py and other helpers run local smoke tests; there are no network downloads or third-party package installs in the provided files.
Credentials
The skill declares no required environment variables or external credentials. The runtime writes and reads host-owned profile/state JSON (intended). There are no hidden credential accesses in the presented files. The only sensitive opt-in is host_capabilities.include_raw_emotion, which intentionally exposes internal labels/emotion_vector for audit.
Persistence & Privilege
The skill is not force-installed (always:false). The minimal host adapter can persist three host-owned JSON files under a host-specified --store-dir when persistence is enabled; this is intended behavior but means hosts should choose storage locations and permissions carefully. agents/openai.yaml allows implicit invocation (allow_implicit_invocation: true), which is a policy choice documented in the manifest.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install emotion-skill
  3. After installation, invoke the skill by name or use /emotion-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.2
v1.2.2: aligned the ClawHub published-bundle manifest with the real install surface; excluded the repository license file from the runtime package; updated README license links to the GitHub repository license.
v1.2.1
v1.2.1: rewrote README/README.zh-CN as GitHub landing pages and SKILL.md as a ClawHub runtime card; refreshed marketplace listing copy around positive routing, evidence-first replies, scope protection, progress visibility, and guarded closeout.
v1.2.0
v1.2.0: default host output now translates internal user-state signals into positive system_prompt_addendum guidance; raw labels/emotion_vector moved behind explicit include_raw_emotion diagnostics; added action-named state deltas, last_routing_outcome feedback, route-reason enum validation, clamp hardening, degradation truncation sentinel, and exact bundle manifest parsing.
v1.1.4
v1.1.4: hardened host input/output handling, added download smoke and bundle manifest checks, rewrote README/SKILL for coding-agent orchestration and real install validation.
v0.5.6
Add compact route reasons, response constraints, state deltas, satisfaction lock, and expanded community smoke coverage.
v0.5.5
Add compact host output, adapter preview mode, host-contract audits, and clearer README/skill listing for user-invisible integration.
v0.5.4
Harden host normalization and diagnostics: recover JSON-string mappings, skip non-string labels and history fields, cap degradation reasons, gate soft urgency phrases by context, add weight-schedule boundary audits, and document schema 1.1.1 changes.
v0.5.3
Harden long-tail routing and community smoke coverage: add targeted community regressions, split strict-vs-label smoke accounting, and tighten dominant-mode routing for high-pressure and guardrail-heavy cases.
v0.5.2
Harden host-facing contracts: add degraded-mode payload normalization, stable label ordering, deterministic local-hour handling without wall-clock fallback, atomic host-store persistence, and contract audits for malformed input.
v0.5.1
Ship a runtime-only ClawHub bundle via .clawhubignore, align published metadata with platform MIT-0 terms, and keep heavier regression and audit assets in the GitHub repository.
v0.5.0
Add dedicated long-tail community cluster regressions, tighten community smoke to message-driven runtime-only payloads, expand skeptical/confused/cautious lexicons for real-world complaints, and refresh alignment/ablation/audit coverage.
v0.4.0
Tighten marketplace-facing contract, remove suspicious hidden-runtime wording, add full-surface capability audits, and regenerate published calibration packs.
v0.3.0
Fix P1/P2 routing issues, add smoke and audit suites, tighten marketplace scope, and ship a minimal host adapter plus demo payload.
v0.2.0
Tighten core admission with feature gate audit, expand zh/en calibration clusters, add OpenClaw Hermes Claude Code and Codex real-world corpora, and raise alignment to 47/47 with 95.48% real-case ablation routing accuracy.
v0.1.1
Polish skill copy and intro.
v0.1.0
Initial public release.
Metadata
Slug emotion-skill
Version 1.2.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 16
Frequently Asked Questions

What is 情绪.skill / Emotion Skill?

Positive routing for coding agents under pressure. Use when repo debugging, scoped implementation, repeated-failure recovery, evidence-demanding review, caut... It is an AI Agent Skill for Claude Code / OpenClaw, with 245 downloads so far.

How do I install 情绪.skill / Emotion Skill?

Run "/install emotion-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 情绪.skill / Emotion Skill free?

Yes, 情绪.skill / Emotion Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 情绪.skill / Emotion Skill support?

情绪.skill / Emotion Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (darwin, linux, win32).

Who created 情绪.skill / Emotion Skill?

It is built and maintained by gongyu0918-debug (@gongyu0918-debug); the current version is v1.2.2.

💬 Comments