AI Agent Hub
Back to skills
Agent Self-Improvement Logging icon

Agent Self-Improvement Logging

AI Agent Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_189e97e8/234512 by following https://skillhub.cn/install/skillhub.md.

About this skill

Problem It Solves

Agents often repeat the same coding mistakes: user corrections are not retained, command failures are patched temporarily, and missing capabilities disappear after the session. If these lessons stay only in chat transcripts, the next session may hit the same traps. This skill turns corrections, errors, and feature requests into Markdown logs in the project, giving later coding agents a searchable, repairable, promotable knowledge base.

How It Works

The core loop is log, archive, and promote:
- Initialization: create .learnings/ in the project root with LEARNINGS.md, ERRORS.md, and FEATURE_REQUESTS.md, without overwriting existing files.
- Immediate logging: when users correct behavior, commands fail, knowledge is outdated, or external tools fail, append typed entries using IDs like LRN-YYYYMMDD-XXX, ERR-..., and FEAT-... for easy lookup.
- Status tracking: move entries from pending to in_progress, resolved, wont_fix, or promoted, and add resolution notes or related-entry links.
- Project memory promotion: when a lesson applies across files or tasks, distill it into a short rule and write it to CLAUDE.md, AGENTS.md, or .github/copilot-instructions.md; OpenClaw workspaces may use SOUL.md or TOOLS.md.
- Recurring pattern handling: search existing logs first, then add See Also, raise priority, or promote a prevention rule once the pattern meets recurrence conditions.

Boundaries

It fits engineering-style agent workflows with persistent project files and cross-session context. It is less useful for one-off scripts or ephemeral tasks without a durable workspace. Logs should avoid secrets, tokens, environment variables, and full source dumps, preferring short summaries and redacted excerpts. Promoted files should stay concise: reusable rules, not long incident reports.

Use Cases

  • After a coding agent is corrected, log the wrong assumption and the correct convention in `LEARNINGS.md` for later retrieval.
  • When a command, API, or external tool fails, record the error, context, and reproduction steps in `ERRORS.md` for repair tracking.
  • When a problem recurs across tasks, review `.learnings/` and promote the pattern into `AGENTS.md` or `CLAUDE.md` as a durable rule.
  • Capture missing capabilities requested by users in `FEATURE_REQUESTS.md` as input for backlog planning and agent behavior improvements.

Best For

  • AI engineering leads who need Claude Code, Codex, or Copilot to remember project conventions and recurring gotchas.
  • Backend or platform engineers who want to turn repeated agent corrections, command failures, and capability gaps into team knowledge.
  • OpenClaw workspace maintainers who promote learnings into `SOUL.md`, `TOOLS.md`, or `AGENTS.md`.
  • Indie developers who manage project memory with Markdown instead of relying only on chat context.