AI Agent Hub
Back to skills
Continuous Improvement Learning Log icon

Continuous Improvement Learning Log

AI Agent Updated 2026.08.30

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

Please follow https://skillhub.cn/install/skillhub.md to install @user_d4891e98/fjkksdaf.

About this skill

The Problem It Solves

When AI coding agents (such as Claude Code or Codex) encounter command failures, outdated knowledge, or user corrections during a session, these "one-off" issues are usually lost once the context window resets. Without a structured way to retain these experiences, agents will repeatedly make the same mistakes in subsequent tasks, wasting tokens and failing to truly "grow." This skill solves that problem by allowing agents to distill transient errors and corrections into searchable, reusable project memory.

Core Capabilities & Key Steps

The skill initializes a .learnings/ directory at the workspace root, categorizing agent runtime states into three types of logs:
- Error Logs (ERRORS.md): Captures command failures, exception stack traces, or external API errors.
- Learning Logs (LEARNINGS.md): Records user corrections, discovered knowledge gaps, and best practices.
- Feature Requests (FEATURE_REQUESTS.md): Tracks desired capabilities that are currently missing.

Key steps include:
1. Trigger & Log: Upon detecting user corrections (e.g., "No, that's not right") or non-zero command exit codes, the agent immediately appends a log using a standardized TYPE-YYYYMMDD-XXX ID format, complete with priority levels (e.g., critical, high) and area tags (e.g., frontend, infra).
2. Deduplicate & Link: For recurring issues, the agent searches the .learnings/ directory using grep, links related entries via See Also, and increments the Recurrence-Count.
3. Distill & Promote: When an experience proves broadly applicable (e.g., applies across multiple files or occurs 3+ times within a 30-day window), the agent distills it into concise rules and "promotes" it to permanent project memory files, such as CLAUDE.md (project facts), AGENTS.md (workflows), or .github/copilot-instructions.md (Copilot context).

Boundaries & Considerations

  • Security Boundaries: The skill strictly prohibits logging secrets, tokens, environment variables, or full source/config files unless explicitly requested. Short summaries or redacted excerpts are preferred.
  • Hook Dependency: The automatic reminder feature (Hook Integration) is opt-in. It requires manual configuration of files like .claude/settings.json. By default, the agent relies on system prompts or user instructions to log proactively.
  • Team Collaboration: The .learnings/ directory is recommended to be added to .gitignore to maintain local privacy. However, teams can choose to commit it to the repository to share these experiences as collective knowledge.

Use Cases

  • After a terminal command fails, log the error, exit code, and repro steps.
  • When a user corrects the model, record the rule and scope in the learning log.
  • When an error recurs, link related entries and increment Recurrence-Count.
  • When a rule applies across files, distill it and add it to CLAUDE.md.

Best For

  • Claude Code workspace maintainers who need traceable error context after command failures.
  • Engineering leads who want to distill repeated agent mistakes into CLAUDE.md rules.
  • Codex users who refactor code and need to log user corrections and best practices.
  • OpenClaw setup engineers who want to promote behavioral guidelines into SOUL.md.