knowledge/self-improvement/SKILL.md
Capture errors, corrections, discoveries, and recurring patterns so future sessions start smarter. Use when a user corrects the agent, a non-obvious failure is diagnosed, a project convention is discovered, a requested capability is missing, or before starting long multi-session work in an area that may already have learnings.
npx skillsauth add aeondave/malskill self-improvementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to preserve hard-won knowledge across long coding cycles, follow-up sessions, and repeated work in the same repository. Log what mattered, review it before similar work, and promote durable patterns into project memory or reusable skills.
Core principle: treat solved surprises as reusable assets, not disposable chat history.
Activate this skill when any of these happen:
Do not use this skill for trivial one-off typos or obvious failures that add no future value.
| Situation | Log file | Default type |
|---|---|---|
| User correction or new repo fact | .learnings/LEARNINGS.md | correction or knowledge_gap |
| Non-obvious fix or better workflow | .learnings/LEARNINGS.md | best_practice or insight |
| Command, tool, or integration failure | .learnings/ERRORS.md | error entry |
| Missing capability requested by user | .learnings/FEATURE_REQUESTS.md | feature request |
| Session end or significant milestone | .learnings/STATUS.md | session handoff |
| Repeated issue or repeated workaround | update existing entry first | recurring pattern |
| Broadly reusable lesson | promote beyond .learnings/ | promoted or promoted_to_skill |
Use a local .learnings/ directory in the current project or workspace:
.learnings/
├── LEARNINGS.md
├── ERRORS.md
├── FEATURE_REQUESTS.md
└── STATUS.md
If the files do not exist, create them from the templates in assets/.
Automation options:
scripts/ensure_store.py --store-dir .learningsscripts/ensure_store.sh .learningsThese helpers create the store and starter files only. They do not edit AGENTS.md for you.
Critical: after creating .learnings/, add a section to the project's AGENTS.md (or CLAUDE.md, .github/copilot-instructions.md — whichever the project uses) so that future agent sessions know the store exists and which skill to use. Without this reference, agents will not consult .learnings/ or apply this skill. Add at minimum:
## Self-improvement
This project uses a `.learnings/` folder to track errors, corrections, discoveries, and session status.
- Before starting deep work, review `.learnings/STATUS.md` and scan relevant entries in `LEARNINGS.md` and `ERRORS.md`.
- After corrections, non-obvious failures, or session-end, log entries using the `self-improvement` skill.
- See the `self-improvement` skill for entry formats, brevity rules, and promotion guidelines.
If the project already references .learnings/ in its instruction file, verify the reference is current and skip this step.
Before starting a large feature, refactor, research task, or debugging pass:
.learnings/STATUS.md first — it tells you where the last session left off.learnings/ for matching keywords, tags, files, or area valuesUse this pre-flight review especially for work that spans multiple sessions.
Log while context is still fresh. Write a prevention rule, not an incident report.
Each entry must answer exactly three questions:
If the entry needs code blocks, tables, architecture explanations, or multi-paragraph narratives, the content belongs in project documentation — not in .learnings/.
Automation options:
scripts/log_learning.py for structured Python-based loggingscripts/log_learning.sh for shell-only environmentsIf a similar entry already exists:
See Also linkPromote a learning when it should shape future behavior before the next failure happens.
Typical targets:
AGENTS.md for repeatable agent workflow rulesCLAUDE.md or .github/copilot-instructions.md for project conventions and coding remindersAutomation options:
scripts/promote_learning.py --target file ... to append a distilled rule and mark the source entry as promotedscripts/promote_learning.py --target skill ... to scaffold a new skill and mark the source entry as promoted_to_skill.sh versions for POSIX shell environments without PythonAt the end of a significant task or work session, update .learnings/STATUS.md:
Also in .learnings/LEARNINGS.md and .learnings/ERRORS.md:
Log prevention rules — not incident histories. Each entry should help a future session avoid repeating a mistake or rediscovering a convention. If the entry reads like a story of what was fixed, rewrite it as a rule.
Log learnings (corrections, insights, knowledge gaps, best practices), non-obvious errors, and feature requests for missing capabilities. See references/entry-formats.md for full schemas and field constraints.
Promote a learning when it is broader than one incident, verified by real work, and concise enough for project instructions. Extract a new skill when the lesson is broadly reusable and procedural. Treat repetition as signal — update recurrence fields instead of duplicating entries.
See references/promotion-guidelines.md for the full decision framework, recurring pattern thresholds, and skill extraction checklist.
Every entry must pass this test: can a future session extract the prevention rule in under 30 seconds? If reading the entry feels like reading an incident report, it is too long.
Hard constraints:
Anti-patterns — do NOT produce entries that:
references/getting-started.md — create the .learnings/ store, choose tracking strategy, wire optional reminders, and automation command referencereferences/entry-formats.md — full entry schemas, enums, ID rules, area taxonomy, and resolution fieldsreferences/examples.md — malskill-oriented examples for learnings, errors, promotions, and extracted skillsreferences/promotion-guidelines.md — decide what belongs in local logs versus project instructions or new skillsreferences/openclaw-integration.md — optional OpenClaw-specific install and hook pathassets/LEARNINGS.md — template and status glossary for the main learning logassets/ERRORS.md — starter structure for error log entriesassets/FEATURE_REQUESTS.md — starter structure for feature request entriesassets/STATUS.md — session handoff template for multi-session project trackingreferences/skill-template.md — template for turning a learning into a standalone skillscripts/activator.py — lightweight reminder output for prompt-submit style hooksscripts/activator.sh — shell fallback for the same reminder outputscripts/error_detector.py — reminder output when command results contain real error signalsscripts/error_detector.sh — shell fallback for the same error reminder logicscripts/ensure_store.py and scripts/ensure_store.sh — create the .learnings/ store and starter filesscripts/log_learning.py and scripts/log_learning.sh — append structured learning, error, or feature entriesscripts/promote_learning.py and scripts/promote_learning.sh — promote a learning into project guidance or a new skillscripts/extract_skill.py and scripts/extract_skill.sh — scaffold a new skill from an explicit theme or source learning entryscripts/run_in_wsl.ps1 — Windows bridge that invokes the .sh fallbacks through WSL with safe path conversionhooks/openclaw/HOOK.md and hooks/openclaw/ handlers — optional OpenClaw bootstrap reminder resourcesdevelopment
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.