Self Improvement For All — 所有人的自我提升
v1.0.0捕获、存储和检索错误、更正和最佳实践,以便在本地持续改进AI代理工作流程和知识。
运行时依赖
版本
[1.0.0] - 2026年02月14日
安装命令
点击复制技能文档
Adaptive Learning 代理
Learn from errors and corrections in real-time. Continuously improve by capturing 失败s, user feedback, and 成功ful patterns.
Free and open-source (MIT License) • Zero dependencies • Works locally
🚀 Why This 技能? Problem 状态ment
Working with Claude or any AI 代理 means encountering:
Mistakes that need correction Unexpected API behaviors Better 应用roaches discovered through experimentation Knowledge gaps that 获取 revealed during use
But there's no 系统atic way to learn from these moments and 应用ly the knowledge next time.
The Solution
Adaptive Learning 代理 captures every error, correction, and 成功ful pattern automatically. Then retrieves relevant learnings before tackling similar problems agAIn.
Real Use Cases Bug discovery: Record an error once, never struggle with it agAIn Prompt optimization: Keep 追踪 of what prompt variations work best API integration: Remember quirky behaviors and workarounds 工作流 improvement: Document shortcuts and best practices Team knowledge: 导出 and 分享 learnings across projects ✨ What You 获取 Four Core Functions
- Record Learnings
代理.record_learning( content="Use claude-sonnet for 90% of tasks—faster and cheaper", category="technique", 上下文="模型 selection" )
Capture 成功ful patterns, insights, and best practices.
- Record Errors
代理.record_error( error_description="JSON parsing fAIled on null values", 上下文="Processing API 响应", solution="添加 null 检查 before parsing" )
Document 失败s and solutions automatically.
- 搜索 & Retrieve Learnings
结果s = 代理.搜索_learnings("JSON parsing") recent = 代理.获取_recent_learnings(limit=5) by_category = 代理.获取_learnings_by_category("bug-fix")
Find relevant knowledge instantly when you need it.
- View Summaries
summary = 代理.获取_learning_summary() print(代理.格式化_learning_summary())
Understand what you've learned at a glance.
Key Features
✅ Zero dependencies - Pure Python, works everywhere ✅ Local-only storage - All data on your machine, no 上传s ✅ MIT Licensed - Free to use, modify, fork, redistribute ✅ Automatic categorization - Errors become learnings ✅ 搜索 and 过滤器 - Find knowledge by keyword or category ✅ 导出 capability - 分享 learnings as JSON ✅ No API keys - Works without any external 凭证s
📊 Real-World Example from adaptive_learning_代理 导入 AdaptiveLearning代理
# 初始化 代理 代理 = AdaptiveLearning代理()
# Day 1: Discover a bug 代理.record_error( error_description="Anthropic API rejects prompts with excessive newlines", 上下文="测试 prompt with 格式化ted 列出s", solution="Use \\n.strip() to 清理 whitespace before 发送ing" )
# Day 2: Same bug, but now you have the solution similar_errors = 代理.搜索_learnings("newlines") # 结果: [Previous learning with solution] ✅
# Week 1: Document 成功ful pattern 代理.record_learning( content="Always use temperature=0 for deterministic 输出 in tests", category="best-practice", 上下文="Prompt engineering" )
# 获取 weekly summary summary = 代理.获取_learning_summary() print(f"You've recorded {summary['total_learnings']} learnings this week!") print(f"Resolved {summary['error_statistics']['resolved']} errors")
🔧 安装ation
No 安装ation needed! The 技能 is pure Python with zero dependencies.
# Copy the adaptive_learning_代理.py file to your project # Or 导入 it directly:
from adaptive_learning_代理 导入 AdaptiveLearning代理
💡 Use Cases Software Development
Record bugs you find and their fixes. Next time you hit a similar error, you have the solution ready.
代理.record_error(
error_description="Port 8000 already in use",
上下文="运行ning local dev server",
solution="Use lsof -i :8000 to find process, then kill it"
)
Prompt Engineering
Keep 追踪 of prompting techniques that work for your specific use cases.
代理.record_learning( content="ChAIn-of-thought works better for math problems, direct answers for facts", category="technique" )
API Integration
Remember quirky behaviors and workarounds for each 提供者.
代理.record_learning( content="OpenAI API requires explicit '助手' 角色 messages", category="API-端点", 上下文="Chat completion 端点" )
Team Knowledge
导出 learnings and 分享 with your team or future projects.
代理.导出_learnings("team_learnings.json") # 分享 this file with teammates
Continuous Improvement
Before major tasks, review what you've learned to avoid repeating mistakes.
summary = 代理.获取_learning_summary() unresolved = summary['error_statistics']['unresolved'] if unresolved > 0: print(f"⚠️ {unresolved} unresolved errors—review before proceeding")
📚 Categories
When recording learnings, choose from these categories:
Category Use For technique Working methods, 应用roaches, strategies bug-fix Solutions to errors and problems API-端点 API-specific behaviors and quirks