返回顶部
f

failure-memory

Automatic failure pattern recording and recall system. Prevents repeating the same mistakes by logging errors with context, root cause, and resolution. Use when: (1) a command/task fails and you want to record why, (2) starting a new task and want to check for known pitfalls, (3) reviewing accumulated failure patterns for learning, (4) agent makes an error and needs to log it for future prevention. Triggers: 'log failure', 'check failures', 'failure report', 'what went wrong', 'mistake log', or

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
355
下载量
2
收藏
概述
安装方式
版本历史

failure-memory

# Failure Memory Record failures. Learn from them. Never repeat them. ## Core Concept Every failure has three parts: 1. **What happened** (error message, symptom) 2. **Why it happened** (root cause) 3. **How to fix/avoid it** (resolution) This skill stores them in a searchable markdown file and provides a recall mechanism before starting similar tasks. ## File Structure ``` memory/ └── failures.md # All failure records (append-only log) ``` ## Recording a Failure When an error occurs during work, append to `memory/failures.md`: ```markdown ## [YYYY-MM-DD HH:mm] <short title> - **Category:** <build|deploy|config|api|permissions|data|logic|network|dependency> - **Context:** <what you were trying to do> - **Error:** `<exact error message or symptom>` - **Root Cause:** <why it happened> - **Resolution:** <what fixed it> - **Prevention:** <how to avoid next time> - **Tags:** <comma-separated keywords for search> ``` ### When to Record Record AUTOMATICALLY when: - A shell command exits non-zero and you identify why - An API call fails and you find the cause - A config/setup step fails and you resolve it - You catch yourself repeating a previously-solved mistake - A sub-agent reports an error with resolution Do NOT record: - Transient network timeouts (unless pattern emerges) - Intentional test failures - User-cancelled operations ## Pre-Task Recall **Before starting any significant task**, search failures for relevant history: ```bash grep -i "<keyword>" memory/failures.md ``` Or use `memory_search` if vector search is available: ``` memory_search query="<task description> failure error" ``` If matches found, mention them briefly: > ⚠️ Known pitfall: [title] — [prevention tip] ## Failure Report When asked for a failure report or review, generate a summary: 1. Read `memory/failures.md` 2. Group by category 3. Identify repeat patterns (same root cause appearing multiple times) 4. Suggest systemic fixes for patterns ### Report Format ```markdown # Failure Report — YYYY-MM-DD ## Stats - Total: N failures recorded - Top category: <category> (N occurrences) - Repeat offenders: N patterns seen 2+ times ## Repeat Patterns ### <pattern name> - Seen: N times - Root cause: <shared cause> - Systemic fix: <recommendation> ## Recent Failures (last 7 days) - [date] <title> — <resolution> ``` ## Initialization Run `scripts/init.sh` to set up the failures file: ```bash bash scripts/init.sh [memory_dir] ``` Default memory_dir: `./memory` ## Best Practices 1. **Be specific** — "EACCES on /var/run/docker.sock" beats "permission error" 2. **Include the exact error** — Future grep depends on it 3. **Tag generously** — More tags = better recall 4. **Review monthly** — Patterns reveal systemic issues 5. **Link to fixes** — Reference commits, PRs, or config changes when possible

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 failure-memory-log-1776283765 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 failure-memory-log-1776283765 技能

通过命令行安装

skillhub install failure-memory-log-1776283765

下载 Zip 包

⬇ 下载 failure-memory v1.0.0

文件大小: 2.89 KB | 发布时间: 2026-4-16 17:58

v1.0.0 最新 2026-4-16 17:58
Initial release: automatic failure pattern recording, pre-task recall, and failure report generation

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部