self-improving-agent
Skill438 starsChanged 3 months agoMITView on GitHub
Self-improvement logging and closed-loop feedback: Trigger when a command or operation fails, the user corrects you, outdated knowledge is identified, an external API fails, or a better reusable solution is found. Review historical learnings before important tasks. Avoid triggering during ordinary chat, for temporary mistakes that do not need to be logged, or when the user has explicitly said not to log.
19 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- kopp0510/claude-ddtheir own version, first seen Oct 5, 2026
- delorenj/skillstheir own version, first seen Oct 2, 2026
- zeroclaw-labs/zeroclaw-skillstheir own version, first seen Sep 24, 2026
- YiShu5/claude-skillstheir own version, first seen Sep 20, 2026
- themusecatcher/ai-coding-kittheir own version, first seen Sep 15, 2026
- lsongdev/skillsedited, first seen Sep 10, 2026
Used with
Projects with it also use find-skills, brainstorming and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillfind-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Also in 6 projects that use this
OpenAISkillbrainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Also in 4 projects that use this
MicrosoftSkillskill-creator
Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.
Also in 7 projects that use this
VercelSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Also in 3 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- mick-gsk/drift★ 1612% same
- lsongdev/skills★ 191% same
- ftcalvinwang-ai/claude_skills★ 015% same
Wrote their own version · 16
- YiShu5/claude-skills★ 133same name
- zeroclaw-labs/zeroclaw-skills★ 65same name
- Tyuts/xiaobai-skills★ 58same name
- zhouguoqing/QianYuan.AIAgenticFramework★ 37same name
- Hassaan146/claude-skills★ 18same name
- delorenj/skills★ 15same name
- dglijin-oss/chinese-metaphysics-skills★ 13same name
- kopp0510/claude-dd★ 12same name
- Hussain-Elfalah/Agentic-Skills★ 2same name
- thoitiettxl-cyber/Claw-II★ 2same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository51 other files it gives its agents.
- android-devSkill
- android-ui-automationSkill
- apple-remindersSkill
- appstoreprice-hubSkill
- asc-cliSkill
- bilibili-hubSkill
- Clash 控制器Skill
- cloudflare-dnsSkill
- codex-imageSkill
- codex-on-ishSkill
- contact-vcard-extractorSkill
- deepseek-usageSkill
- doubao-ttsSkill
- douyin-downloaderSkill
- exa-searchSkill
- free-ttsSkill
- fucai3d-latestSkill
- generative-ui-minisSkill
- github-sync-helperSkill
- health-sleep-analysisSkill
- hyperframes-cliSkill
- hyperframesSkill
- korea-stockSkill
- maimai-hubSkill
- memos-apiSkill
- nano-bananaSkill
- notion-hubSkill
- openstreetmap-markerSkill
- pdf-converterSkill
- production-agent-publicSkill
- qbt-hubSkill
- quark-hubSkill
- reverse-dcfSkill
- shortcut-share-fileSkill
- spotify-hubSkill
- stock-fund-flowSkill
- stock-priceSkill
- tavily-searchSkill
- tg-hubSkill
- todoocardSkill
- twitter-downloaderSkill
- twitter-x-hubSkill
- us-stockSkill
- web-content-extractorSkill
- web-searchSkill
- weibo-hubSkill
- whenpeakSkill
- xianyu-hubSkill
- xiaohongshu-hubSkill
- youtube-downloaderSkill
- ytmusic-hubSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 15 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Project-level logging: Use <project>/.learnings/ only when --project <path> is passed explicitly
- Very specific: line 34
Duplicate protection: If the entry already exists in the skill's public area, running promote again will not append a duplicate
- Distinctive: line 57
If any of the following conditions are met, the event should be logged unless you explicitly say "do not log it":
- Very specific: line 73
After confirming that the entry has reuse value across tasks, use promote to move it to the public area within the skill: data/public/.
- Distinctive: line 84
Write to this skill's logs first: When the content needs context, such as error output, troubleshooting paths, or solution comparisons.
- Distinctive: line 85
Then promote to memory: When the conclusion is stable, applies across tasks or skills, and can be expressed in one sentence.
- Very specific: line 89
Consider memory_write only if at least one of the following is true:
- Distinctive: line 240
After an issue is fixed, update the entry:
- Distinctive: line 243
Add a resolution block after the metadata:
- Distinctive: line 260
When a learning item is broadly applicable rather than a one-time fix, it should be promoted to the Minis memory system.
- Very specific: line 278
Write: Use memory_write to write to daily memory, and sync to project notes if needed
- Distinctive: line 279
Write back: Update the original entry:
- Very specific: line 281
Add Promoted: YYYY-MM-DD.md or PROJECT_NOTES.md
- Distinctive: line 285
If the content being logged is similar to an existing entry:
- Very specific: line 288
Create an association: Add See Also: ERR-20250110-001 to the metadata
- Distinctive: line 289
Raise the priority: If the issue recurs
- Very specific: line 301
Read simplify_and_harden.learning_loop.candidates from the task summary.
- Very specific: line 303
Search .learnings/LEARNINGS.md to see whether it already exists:
- Distinctive: line 305
If it already exists:
- Very specific: line 308
Add a See Also association
- Distinctive: line 309
If it does not exist:
- Very specific: line 310
Create a new LRN-... entry
- Distinctive: line 316
When the following conditions are met, promote the recurring pattern to Minis memory:
- Distinctive: line 330
Before starting a new important task
- Distinctive: line 331
After completing a feature
- Distinctive: line 332
When entering a domain that has previous learnings
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Self-Improvement Skill (Minis Edition)
This skill is used in the Minis environment to record errors, corrections, and reusable best practices, creating a traceable learning loop.
Minis Directory Conventions
- Working directory:
/var/minis/workspace/ - Default learning log directory for this skill:
/var/minis/skills/self-improving-agent/data/ - Public learning log directory within this skill (after promotion):
/var/minis/skills/self-improving-agent/data/public/ - Project-level learning log directory (optional):
<project>/.learnings/ - Learning log files:
LEARNINGS.md(corrections, knowledge gaps, best practices)ERRORS.md(command failures, exception output)FEATURE_REQUESTS.md(new capabilities requested by users)
By default, log entries go first to the skill's own
datadirectory. When you explicitly specify a project, write to the project-level log. When an issue has been abstracted into a cross-project rule, promote it to the skill's public area or the Minis memory system.
Current Final Rules
- Default logging location:
/var/minis/skills/self-improving-agent/data/ - Public area within the skill:
/var/minis/skills/self-improving-agent/data/public/ - Project-level logging: Use
<project>/.learnings/only when--project <path>is passed explicitly - Recommended public parameter:
--public - Compatibility alias:
--workspaceis still available, but only for compatibility and is no longer recommended - Promotion behavior:
promote <entryID>copies the entry to the public area within the skill, automatically marks the source entry aspromoted, and writes back**Promoted to**and### Resolution Record - Duplicate protection: If the entry already exists in the skill's public area, running
promoteagain will not append a duplicate
Quick Reference
| Scenario | Action |
| Command or operation fails | Log to the skill directory by default: data/ERRORS.md |
| The user corrects you | Log to the skill directory by default: data/LEARNINGS.md, category correction |
| The user needs a missing capability | Log to the skill directory by default: data/FEATURE_REQUESTS.md |
| Project context is explicitly specified | Log to <project>/.learnings/ |
| External API or tool fails | Log to ERRORS.md in the current scope, including integration details |
| Knowledge is outdated | Log to LEARNINGS.md in the current scope, category knowledge_gap |
| A better solution is found | First log it to the current scope, then promote it after confirming it is generally applicable |
| Similar issues recur across multiple projects | Promote to the public area within the skill: data/public/ |
| Similar to an existing entry | Link with **See Also** and consider raising the priority |
| Widely applicable experience | Promote to the public area within the skill or to Minis memory. See "Promoting to Minis Memory" below |
Trigger Logging Rules (Minis Runtime Conventions)
Note: By default, this skill does not automatically listen in the background. When trigger conditions are met, the assistant (or you) should actively call
scripts/minis_auto_log.shto write the log to disk.
Recommended Triggers That "Must Be Logged"
If any of the following conditions are met, the event should be logged unless you explicitly say "do not log it":
- A command or operation fails and the cause is not obvious: For example, permissions, paths, dependencies, network issues, or third-party API exceptions that require investigation to diagnose.
- User correction: You point out where my understanding is wrong, where my logic does not match the actual behavior of this software, or where paths or conventions are incorrect.
- Knowledge update or outdated assumption correction: A previous assumption is found not to apply to Minis, or documentation or implementation needs correction.
- Reusable better solution: A stable practice, convention, template, or workflow emerges that can significantly reduce rework.
- Recurring pattern: Similar issues appear repeatedly within the same task, or across tasks or projects.
Situations That Generally Should Not Be Logged
- Ordinary chat, one-off small changes, or minor details with no reuse value.
- You explicitly ask "do not log this."
Recommended Logging Location
- By default, write to the skill area
data/first. - After confirming that the entry has reuse value across tasks, use
promoteto move it to the public area within the skill:data/public/.
Difference from Minis Memory and Promotion Criteria
Difference (Suggested Interpretation)
- This skill's logs (
data/anddata/public/) are an editable work review repository: they record context, troubleshooting processes, and solution evolution, and they allow long text and details. - Minis memory (
memory_writewriting to/var/minis/memory/) is for cross-session long-term rules and preferences: entries should be short, stable, and reusable. Poorly written entries can "pollute" future decisions for a long time.
Where to Write (Log First, Then Refine into Memory)
- Write to this skill's logs first: When the content needs context, such as error output, troubleshooting paths, or solution comparisons; when it is not yet clear whether it is generally applicable; or when it is still being iterated on.
- Then promote to memory: When the conclusion is stable, applies across tasks or skills, and can be expressed in one sentence.
When to Promote to Memory (Hard Criteria)
Consider memory_write only if at least one of the following is true:
- It can be condensed into a rule of the form "When X happens in the future, do Y" and does not depend on specific project details.
- It recurs 3 or more times within 30 days, or appears in at least 2 different tasks or domains.
- It clearly belongs to your long-term preferences or conventions, such as tool usage constraints, path conventions, or output format rules, and you explicitly say "remember this" or "do this from now on."
Recommended Promotion Actions
- First use
promoteto promote the entry to the public area within the skill,data/public/, for higher visibility and easier review. - Then distill 1 to 3 short rules from the public entry and write them to the day's memory with
memory_write.
Usage examples:
# By default, write to the skill's own data directory
sh /var/minis/skills/self-improving-agent/scripts/minis_auto_log.sh init
# Log a skill-level learning
sh /var/minis/skills/self-improving-agent/scripts/minis_auto_log.sh learning "Fixed the download timeout" "Use chunking and retries"
# If you need to log explicitly at the project level, pass --project
sh /var/minis/skills/self-improving-agent/scripts/minis_auto_log.sh --project /var/minis/workspace/my-project error "curl request failed" "HTTP 429"
# If you need to write directly to the public area within the skill, pass --public explicitly
sh /var/minis/skills/self-improving-agent/scripts/minis_auto_log.sh --public feature "Support batch export" "Operations needs daily reports"
# Search the skill area + project area + public area within the skill
sh /var/minis/skills/self-improving-agent/scripts/minis_auto_log.sh search timeout
# Promote an entry to the public area within the skill
sh /var/minis/skills/self-improving-agent/scripts/minis_auto_log.sh promote LRN-20260317-ABC
# View the current scope
sh /var/minis/skills/self-improving-agent/scripts/minis_auto_log.sh statusLogging Format
Learning Record
Append to .learnings/LEARNINGS.md:
## [LRN-YYYYMMDD-XXX] category
**Record time**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending
**Domain**: frontend | backend | infra | tests | docs | config
### Summary
One-line description of what was learned
### Details
Full context: what happened, what went wrong, and the correct approach
### Recommended Action
Specific actionable improvement or fix
### Metadata
- Source: conversation | error | user_feedback
- Related file: path/to/file.ext
- Tags: tag1, tag2
- Related entry: LRN-20250110-001 (if applicable)
- Pattern key: simplify.dead_code | harden.input_validation (optional, for recurring pattern tracking)
- Recurrence count: 1 (optional)
- First seen: 2025-01-15 (optional)
- Last seen: 2025-01-15 (optional)
---Error Record
Append to .learnings/ERRORS.md:
## [ERR-YYYYMMDD-XXX] skill_or_command_name
**Record time**: ISO-8601 timestamp
**Priority**: high
**Status**: pending
**Domain**: frontend | backend | infra | tests | docs | config
### Summary
Brief description of the failure
### Error
```
Actual error message or output
```
### Context
- Command or operation attempted
- Input or parameters
- Environment details, if relevant
### Recommended Fix
If identifiable, provide possible solutions
### Metadata
- Reproducible: yes | no | unknown
- Related file: path/to/file.ext
- Related entry: ERR-20250110-001 (if recurring)
---Feature Request Record
Append to .learnings/FEATURE_REQUESTS.md:
## [FEAT-YYYYMMDD-XXX] capability_name
**Record time**: ISO-8601 timestamp
**Priority**: medium
**Status**: pending
**Domain**: frontend | backend | infra | tests | docs | config
### Requested Capability
The capability the user wants to implement
### User Context
Why it is needed and what problem it solves
### Complexity Assessment
simple | medium | complex
### Recommended Implementation
Possible implementation approaches and extension points
### Metadata
- Frequency: first_time | recurring
- Related feature: existing_feature_name
---ID Generation Rules
Format: TYPE-YYYYMMDD-XXX
- TYPE:
LRN(learning),ERR(error),FEAT(feature) - YYYYMMDD: current date
- XXX: sequential number or random 3-character value, such as
001orA7B
Examples: LRN-20250115-001, ERR-20250115-A3F, FEAT-20250115-002
Resolving Entries
After an issue is fixed, update the entry:
- Change
**Status**: pendingto**Status**: resolved - Add a resolution block after the metadata:
### Resolution Record
- **Resolution time**: 2025-01-16T09:00:00Z
- **Commit/PR**: abc123 or #42
- **Notes**: Brief description of what was doneOther statuses:
in_progress- Being worked onwont_fix- Decided not to fix. Write the reason in the resolution recordpromoted- Promoted to Minis memory
Promoting to Minis Memory
When a learning item is broadly applicable rather than a one-time fix, it should be promoted to the Minis memory system.
When to Promote
- The learning applies across multiple files or features
- Any contributor, human or AI, should know it
- It prevents repeated mistakes
- It records project conventions
Promotion Targets (Minis)
- Daily memory:
/var/minis/memory/YYYY-MM-DD.md(written throughmemory_write) - Global memory:
/var/minis/memory/GLOBAL.md(read-only; the user must maintain it in settings) - Project notes: Recommended target:
/var/minis/workspace/PROJECT_NOTES.md
How to Promote
- Distill: Condense the learning into concise rules or facts
- Write: Use
memory_writeto write to daily memory, and sync to project notes if needed - Write back: Update the original entry:
**Status**: pendingto**Status**: promoted- Add
**Promoted**: YYYY-MM-DD.mdorPROJECT_NOTES.md
Recurring Pattern Detection
If the content being logged is similar to an existing entry:
- Search first:
grep -r "keyword" /var/minis/workspace/.learnings/ - Create an association: Add
**See Also**: ERR-20250110-001to the metadata - Raise the priority: If the issue recurs
- Consider a systematic fix: Recurring issues usually indicate:
- Missing documentation (write to
PROJECT_NOTES.mdor daily memory) - Missing automation (add scripts or toolchain support)
- Architectural issues (create a technical debt task)
- Missing documentation (write to
Simplify & Harden Feed
Used to ingest recurring patterns from the simplify-and-harden skill and convert them into persistent prompt rules.
Ingestion Workflow
- Read
simplify_and_harden.learning_loop.candidatesfrom the task summary. - For each candidate, use
pattern_keyas the stable deduplication key. - Search
.learnings/LEARNINGS.mdto see whether it already exists:grep -n "Pattern-Key: <pattern_key>" /var/minis/workspace/.learnings/LEARNINGS.md
- If it already exists:
- Increment
Recurrence-Count - Update
Last-Seen - Add a
See Alsoassociation
- Increment
- If it does not exist:
- Create a new
LRN-...entry - Set
Source: simplify-and-harden - Set
Pattern-Key,Recurrence-Count: 1, andFirst-Seen/Last-Seen
- Create a new
Promotion Rules (System Prompt Feedback)
When the following conditions are met, promote the recurring pattern to Minis memory:
Recurrence-Count >= 3- Appears in at least 2 different tasks
- Occurs within 30 days
The promoted rule should be a short and clear preventive rule that describes what to do before or during work, not a lengthy incident review.
Periodic Review
Review .learnings/ at natural milestones:
When to Review
- Before starting a new important task
- After completing a feature
- When entering a domain that has previous learnings
- Once a week during active development
Quick Status Check
# Count pending items
grep -h "Status\*\*: pending" /var/minis/workspace/.learnings/*.md | wc -l
# List pending high-priority items
grep -B5 "Priority\*\*: high" /var/minis/workspace/.learnings/*.md | grep "^## \["
# Find learnings for a specific area
grep -l "Domain\*\*: backend" /var/minis/workspace/.learnings/*.mdDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

