← 返回 Skills 市场
Feedback Learning V2
作者
Maxim Kravtsov
· GitHub ↗
· v2.0.0
· MIT-0
102
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install feedback-learning-v2
功能描述
Zero-LLM feedback learning system for OpenClaw agents. Detects user feedback (emoji reactions, text signals like "переделай"/"круто"), logs events, tracks po...
使用说明 (SKILL.md)
Feedback Learning System v2
A complete, zero-LLM pipeline for agents to learn from user feedback. Track what works, catch what doesn't, promote durable rules.
Architecture
User feedback / exec error
↓
detect-feedback.py ←── error-catcher.sh (PostToolUse hook)
↓
log-event.sh ──────────────────────────────────────────→ events.jsonl
↓
analyze-patterns.py (nightly)
↓
patterns.json
(positive + negative patterns)
↓ (≥3 hits, delta test)
genes.json
(structured rules: condition→action)
↓
weekly-report.py (Sundays)
↓
reports/WEEKLY_*.md
Quick Reference
| Situation | Action |
|---|---|
| User gives positive feedback | log-event.sh \x3Cagent> positive user_nlp "\x3Cctx>" "\x3Csignal>" |
| User corrects/complains | log-event.sh \x3Cagent> correction user_nlp "\x3Cctx>" "\x3Csignal>" "\x3Clesson>" |
| Exec command failed | log-event.sh \x3Cagent> error exec_fail "\x3Cctx>" "\x3Cstderr>" "\x3Clesson>" |
| Detect feedback from text | python3 detect-feedback.py "переделай это" |
| Run pattern analysis now | python3 analyze-patterns.py |
| Generate report now | python3 weekly-report.py |
| Check active rules (genes) | python3 check-genes.py |
| Mark gene as resolved | python3 check-genes.py --resolve \x3Cgene_id> |
Setup
1. Install files
DIR="${FEEDBACK_LEARNING_DIR:-$HOME/.openclaw/shared/learning}"
mkdir -p "$DIR/reports"
cp scripts/* "$DIR/"
chmod +x "$DIR/log-event.sh" "$DIR/error-catcher.sh"
touch "$DIR/events.jsonl"
2. Initialize data files
DIR="${FEEDBACK_LEARNING_DIR:-$HOME/.openclaw/shared/learning}"
[ -f "$DIR/patterns.json" ] || cat > "$DIR/patterns.json" \x3C\x3C 'EOF'
{"version": "2.1", "updated": "", "patterns": {"negative": [], "positive": []}}
EOF
[ -f "$DIR/genes.json" ] || cat > "$DIR/genes.json" \x3C\x3C 'EOF'
{"version": "2.1", "rules": []}
EOF
[ -f "$DIR/capsules.json" ] || cat > "$DIR/capsules.json" \x3C\x3C 'EOF'
{"version": "2.1", "capsules": []}
EOF
3. Add to AGENTS.md boot sequence
## Feedback Learning
Before tasks: check `$FEEDBACK_LEARNING_DIR/genes.json` for applicable rules.
Auto-detect and log signals:
- Positive words/emoji → `bash $DIR/log-event.sh \x3Cagent> positive user_nlp "\x3Cctx>" "\x3Csignal>"`
- Negative/correction → `bash $DIR/log-event.sh \x3Cagent> correction user_nlp "\x3Cctx>" "\x3Csignal>" "\x3Clesson>"`
- Exec fail (exit≠0) → `bash $DIR/log-event.sh \x3Cagent> error exec_fail "\x3Cctx>" "\x3Cstderr[:200]>" "\x3Clesson>"`
4. Set up crons
# Pattern analysis (nightly 3:30 AM)
schedule: cron 30 3 * * * @ Europe/Moscow
payload: python3 ~/.openclaw/shared/learning/analyze-patterns.py
# Weekly report (Sundays 4:00 AM)
schedule: cron 0 4 * * 0 @ Europe/Moscow
payload: python3 ~/.openclaw/shared/learning/weekly-report.py
5. (Optional) Hook integration for auto-error capture
For Claude Code / Codex hooks:
{
"hooks": {
"PostToolUse": [{
"matcher": "Bash",
"hooks": [{"type": "command", "command": "bash ~/.openclaw/shared/learning/error-catcher.sh"}]
}]
}
}
Usage
Log events manually
DIR="${FEEDBACK_LEARNING_DIR:-$HOME/.openclaw/shared/learning}"
# Error
bash "$DIR/log-event.sh" anton error exec_fail \
"updating openclaw.json" "SyntaxError: trailing comma" \
"Always validate JSON with python3 -c before writing"
# Positive
bash "$DIR/log-event.sh" anton positive user_nlp \
"generated weekly report" "🔥 огонь!"
# Correction
bash "$DIR/log-event.sh" anton correction user_nlp \
"sent message in wrong format" "не так, в маркдауне давай" \
"Confirm output format before sending to Telegram"
Detect feedback from text (no LLM)
echo "круто, зашло!" | python3 detect-feedback.py
# → {"type": "positive", "source": "user_nlp", "signal": "круто", "confidence": 0.8}
python3 detect-feedback.py "переделай это, не тот формат"
# → {"type": "correction", "source": "user_nlp", "signal": "переделай", "confidence": 0.8}
# Pipe mode for hook usage
echo "$TOOL_OUTPUT" | python3 detect-feedback.py --pipe | bash log-event.sh auto
Check active rules before a task
python3 check-genes.py
# Lists active rules, signals stale ones
python3 check-genes.py --filter exec_fail
# Filter by type
python3 check-genes.py --resolve gene_20260310_120000_0
# Mark a resolved rule as inactive
Data Files
| File | Purpose |
|---|---|
events.jsonl |
Append-only event log (all feedback), deduped by content hash |
patterns.json |
Grouped patterns: BOTH positive and negative, with counts |
genes.json |
Promoted structured rules (condition → action → context) |
capsules.json |
Successful reasoning paths to avoid re-computation |
reports/ |
Weekly synthesis reports |
Event Schema
{
"ts": "2026-03-20T12:00:00Z",
"id": "sha256_first8",
"agent": "anton",
"type": "error|correction|positive|requery",
"source": "exec_fail|user_nlp|user_emoji|requery|auto",
"context": "what agent was doing",
"signal": "the trigger text or emoji",
"hint": "suggested fix or rule",
"heat": 1
}
Gene (Promoted Rule) Schema v2
{
"id": "gene_20260310_120000_0",
"status": "active|stale|resolved|wont-fix",
"origin": "original signal/pattern text",
"type": "error|correction|positive",
"condition": "When doing X",
"action": "Do Y instead of Z",
"context": "Additional context",
"agents": ["anton"],
"occurrences": 3,
"last_seen": "2026-03-20T...",
"promoted_at": "2026-03-20T...",
"expires": null,
"active": true
}
Promotion Flow (v2)
- Events accumulate in
events.jsonl(deduped by hash) analyze-patterns.pygroups similar events (both positive AND negative)- Pattern hits ≥3 in 30 days → Behavioral Delta Test: would this rule change a future decision? If yes → promote.
- Promoted gene has structured fields:
condition,action,context - Stagnation check: if gene exists but same pattern keeps recurring → mark gene as
staleand escalate - Genes auto-expire after 90 days of inactivity (no new events matching)
weekly-report.pyincludes gene health: active / stale / resolved counts
Supported Languages
- Russian: 20+ negative, 19+ positive triggers, correction patterns
- English: 10 negative, 8 positive triggers
- Emoji: Universal positive/negative reactions
What's New in v2
| Feature | v1 | v2 |
|---|---|---|
| Positive pattern tracking | ❌ skipped | ✅ tracked separately |
| Gene structure | "AVOID: key_text" |
condition → action → context |
| Gene lifecycle | active only | active / stale / resolved / wont-fix |
| Behavioral Delta Test | ❌ | ✅ promotes only if rule changes future behavior |
| Stagnation detection | ❌ | ✅ re-occurring genes flagged as stale |
| Path configuration | hardcoded | $FEEDBACK_LEARNING_DIR env var |
| Event deduplication | ❌ | ✅ content hash |
| Hook integration | ❌ | ✅ error-catcher.sh for PostToolUse |
| Gene check utility | ❌ | ✅ check-genes.py |
| Gene expiry | ❌ | ✅ 90-day inactivity auto-expire |
安全使用建议
What to check before installing:
1) Inspect SKILL.md for hidden characters: the pre-scan flagged unicode control characters — open the file in a hex or 'show-nonprinting' view to ensure nothing is obfuscated.
2) Review and audit the scripts: they are pure Python/shell and do not contact external hosts, but you should manually read them (especially log-event.sh, error-catcher.sh, and detect-feedback.py) to confirm no unexpected behavior.
3) Consider sensitive-data exposure: the optional PostToolUse hook and log-event calls capture TOOL_COMMAND and TOOL_STDERR and write them into events.jsonl and reports. If your tools might print secrets (tokens, passwords, database URLs, stack traces containing keys), that data will be stored locally. If you enable this skill, either filter/redact such output or restrict the directory's filesystem permissions and retention.
4) Add hooks/crons intentionally: the skill requires manual changes to AGENTS.md and cron entries; do not enable these automatically. Only enable the hook if you accept ongoing local logging and automated promotion of rules.
5) Backup/retention: ensure events.jsonl and reports are stored where you control retention and access. Remove or rotate logs if they accumulate sensitive content.
6) If you are unsure, run the scripts in a sandboxed account or container first to observe what gets captured before enabling them in your production agent environment.
功能分析
Type: OpenClaw Skill
Name: feedback-learning-v2
Version: 2.0.0
The bundle provides a local feedback-driven learning system for OpenClaw agents, designed to track user reactions and execution errors. It uses regex-based detection (detect-feedback.py) and local JSONL logging (log-event.sh) to identify patterns and promote them into behavioral rules ('genes') via analyze-patterns.py. The system operates entirely within a local directory (~/.openclaw/shared/learning), contains no network exfiltration logic, and lacks any indicators of malicious intent or obfuscation.
能力评估
Purpose & Capability
Name/description match the included scripts and instructions: the package provides local shell+Python scripts to detect feedback, append events, analyze patterns, promote 'genes', and generate reports. No network endpoints, credentials, or unrelated binaries are requested.
Instruction Scope
Runtime instructions ask you to copy scripts into a shared directory, add a boot-time check for genes.json, set cron jobs, and (optionally) hook into PostToolUse so that exec failures are auto-logged. The hook/error-catcher will capture TOOL_STDERR and TOOL_COMMAND and write them into events.jsonl; these can include sensitive data. Also, the SKILL.md was flagged for unicode-control-chars (prompt-injection style obfuscation) — inspect the SKILL.md source for hidden characters before trusting it.
Install Mechanism
There is no external install/download. This is an instruction-only skill whose files are included in the bundle; the install procedure is manual file copying and adding cron/hook entries. No remote archives or package installs were used.
Credentials
The skill requires no secrets or external credentials, which aligns with its purpose. However, it logs command contexts and stderr without redaction. If your tools print secrets (tokens, paths, stack traces with config), those will be appended to events.jsonl and reports. The skill uses optional env vars (FEEDBACK_LEARNING_DIR, AGENT_ID) but does not request or need other credentials.
Persistence & Privilege
The skill is not forced-always. It suggests adding hooks and cron jobs which will give it ongoing presence and automatic data collection (error capture, nightly analysis, weekly reports). That's expected for this functionality, but you should only enable the PostToolUse hook and crons if you accept continuous local logging of tool output.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install feedback-learning-v2 - 安装完成后,直接呼叫该 Skill 的名称或使用
/feedback-learning-v2触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
Version 2.0.0 of feedback-learning introduces major upgrades to feedback detection, tracking, and learning:
- Now tracks both positive and negative patterns—positive triggers are analyzed and promoted alongside corrections.
- Structured rules (genes) use a new detailed schema with condition, action, and context fields for clearer auto-promotion and diagnostics.
- Adds lifecycle statuses for rules: active, stale, resolved, or wont-fix, with automatic resolution and stagnation checks.
- Introduces a Behavioral Delta Test to ensure only meaningful rules are promoted.
- Data files, cron integration, shell/Python automation, and Russian/English feedback detection are thoroughly documented and streamlined.
- Weekly reporting and analysis are enhanced, including rule health and recurring pattern detection.
元数据
常见问题
Feedback Learning V2 是什么?
Zero-LLM feedback learning system for OpenClaw agents. Detects user feedback (emoji reactions, text signals like "переделай"/"круто"), logs events, tracks po... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 102 次。
如何安装 Feedback Learning V2?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install feedback-learning-v2」即可一键安装,无需额外配置。
Feedback Learning V2 是免费的吗?
是的,Feedback Learning V2 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Feedback Learning V2 支持哪些平台?
Feedback Learning V2 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Feedback Learning V2?
由 Maxim Kravtsov(@surdeddd)开发并维护,当前版本 v2.0.0。
推荐 Skills