Agent Self-Improvement Log
Paste the following prompt into your AI chat to install this skill:
Install @user_bf9a29cc/1-2-3 into your AI assistant using the official guide at https://skillhub.cn/install/skillhub.md.
About this skill
Solving Repetitive Trial-and-Error and Experience Loss
When AI agents execute coding tasks, they frequently encounter command failures, user corrections, knowledge gaps, or new feature requests. This feedback is often ephemeral, leading agents to repeat the same mistakes in subsequent tasks or failing to distill effective practices into shared team knowledge. This skill establishes a structured self-improvement logging mechanism, enabling agents to continuously record, review, and promote critical insights.
Core Capabilities and Workflow
The skill manages the knowledge lifecycle through the following key steps:
- Initializing the Log Directory: Creates a .learnings/ folder in the project root and initializes ERRORS.md, LEARNINGS.md, and FEATURE_REQUESTS.md.
- Real-time Capture and Structured Logging: Upon detecting command failures, user corrections (e.g., "No, that's wrong..."), or knowledge gaps, the agent immediately appends the context, reproduction steps, and priority to the corresponding Markdown files to avoid losing critical details.
- Pattern Recognition and Deduplication: Uses Pattern-Key to identify recurring error patterns, links existing records, and bumps their priority to prevent log bloat.
- Memory Promotion: When a learning proves broadly applicable (e.g., project dependency conventions, specific tool gotchas), the agent distills it into concise rules and writes it to long-term memory files like CLAUDE.md, AGENTS.md, or .github/copilot-instructions.md, making it the default context for future sessions.
- Periodic Review and Status Updates: At task milestones or periodic checks, the agent reviews the logs, marking fixed issues as resolved and promoted insights as promoted.
Boundaries and Considerations
- Privacy and Security: The skill defaults to avoiding the logging of
secrets,tokens, orprivate keys. When logging errors, prefer sanitized summaries or short code snippets over full raw outputs. - Team Sharing Strategy: Log files can serve as a developer's local private notes (recommended to add to
.gitignore) or as a shared team knowledge base (commit to the repository). Choose based on project compliance requirements. - Environment Dependencies: This skill relies on the agent's ability to read and write Markdown files and performs best in environments supporting context injection or hook mechanisms, such as OpenClaw, Claude Code, or Codex.
Use Cases
- After a failed API fix in Codex, log the failing command and repro steps to .learnings/ERRORS.md to prevent repeat mistakes.
- When a user corrects an API convention, append the correction to LEARNINGS.md with a correction category for later review.
- At feature completion, review .learnings/ and promote recurring pnpm dependency pitfalls into CLAUDE.md for future sessions.
- In a shared repo, link similar issues with Pattern-Key, bump priority, and identify missing docs or automation.
Best For
- Engineers maintaining AI coding workflows who want to turn session errors and corrections into project rules.
- Developers using Claude Code or Codex for daily code changes who want to avoid repeating the same build or dependency pitfalls.
- Team leads managing multi-agent workspaces who want to write tooling experience and behavior preferences into shared workspace files.
- Senior engineers organizing tech debt and automation needs who want to spot recurring patterns from error logs and propose systemic fixes.
Related Skills
Turn vague requests into structured prompts with role, task, context, and constraints, outputting only usable prompts without executing the task.
A skill for game NPC and enemy AI that separates decision, steering, and pathfinding, covering FSMs, behavior trees, A*, path caching, and pitfalls.
Provides multi-turn emotional companion chat through a third-party Agent API and supports continuing sessions via session_id.
An evaluation-driven workflow for diagnosing, optimizing, validating, and logging Agent Skills based on design patterns and anti-patterns.