Compound Learnings
Capture insights and corrections to make future work easier. Implements RSI (Recursive Self-Improvement) through automated correction detection and pattern extraction.
Best use case
Compound Learnings is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Capture insights and corrections to make future work easier. Implements RSI (Recursive Self-Improvement) through automated correction detection and pattern extraction.
Teams using Compound Learnings should expect a more consistent output, faster repeated execution, less prompt rewriting, better workflow continuity with your supporting tools.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
- You already have the supporting tools or dependencies needed by this skill.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/compound-learnings/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Compound Learnings Compares
| Feature / Agent | Compound Learnings | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Capture insights and corrections to make future work easier. Implements RSI (Recursive Self-Improvement) through automated correction detection and pattern extraction.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Compound Learnings
> "Each unit of engineering work should make subsequent units easier—not harder."
This skill implements the compound engineering philosophy AND **Recursive Self-Improvement (RSI)**: systematically capturing what you learn during development to accelerate future work. Now includes automatic correction detection to learn from mistakes.
## When This Skill Activates
This skill should be invoked:
- After completing a significant task or feature
- When you discover a pattern that will be reused
- After debugging a tricky issue
- When you find a better way to do something
- At the end of a productive session
- **NEW**: When Claude is corrected during a task (auto-detected)
**Keywords**: compound, learnings, document what I learned, capture pattern, session summary, retrospective, correction, mistake, wrong, actually, instead
---
## RSI: Self-Updating Through Corrections
**NEW in v2.0**: This skill now detects and learns from corrections automatically.
### Correction Detection Triggers
The skill watches for these patterns indicating a correction:
- "No, actually..." / "That's not right" / "That's wrong"
- "Instead, do..." / "The correct way is..."
- User provides alternative code immediately after Claude's output
- User references documentation contradicting Claude's suggestion
- "Don't do that" / "Never do X"
### Correction Workflow
```
┌─────────────────────────────────────────────────────────────────┐
│ RSI CORRECTION LOOP │
├─────────────────────────────────────────────────────────────────┤
│ │
│ CLAUDE OUTPUT ──► USER CORRECTION ──► DETECT ──► EXTRACT │
│ │ │ │
│ │ ▼ │
│ │ STORE IN │
│ │ corrections/ │
│ │ │ │
│ │ ▼ │
│ FUTURE OUTPUTS ◄──── APPLY RULE ◄──── SYNTHESIZE RULE │
│ │
└─────────────────────────────────────────────────────────────────┘
```
### Command: /correction
Use `/correction` to manually capture a correction.
```bash
# After being corrected
/correction
# With specific context
/correction "Use admin_notes not notes column"
```
### Correction Entry Format
```markdown
# Correction: [Brief Description]
**Date**: YYYY-MM-DD
**Session**: [session-name]
**Skill Affected**: [which skill was wrong]
## Original Approach
[What Claude did/suggested]
## Correction Received
[How user corrected Claude]
## Learning Extracted
[Rule derived from correction]
## Application
- **Update to**: [Which skill/pattern to update]
- **Rule**: [Concrete rule to add]
## Validation
- [ ] Rule added to skill
- [ ] No regression in related areas
```
## The Compound Workflow
```
┌─────────────────────────────────────────────────────────────────┐
│ COMPOUND ENGINEERING CYCLE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ PLAN ──────► WORK ──────► REVIEW ──────► COMPOUND │
│ │ │ │
│ │ │ │
│ └──────────── Future work is easier ◄──────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
```
## Command: /compound
Use `/compound` to trigger the learning capture workflow.
### Usage
```bash
# After completing work
/compound
# With specific focus
/compound "console migration patterns"
# Quick pattern capture
/compound --pattern "API error handling"
```
## What to Capture
### 1. Friction Points (What Slowed You Down)
```markdown
## Friction: [Brief Title]
**Task**: What were you trying to do?
**Obstacle**: What slowed you down?
**Root Cause**: Why did this happen?
**Solution**: How did you resolve it?
**Prevention**: How can future tasks avoid this?
```
### 2. Patterns (Reusable Solutions)
```markdown
## Pattern: [Pattern Name]
**Context**: When to use this pattern
**Problem**: What problem does it solve?
**Solution**: The pattern itself (with code)
**Trade-offs**: Pros and cons
**Examples**: Where it's used in CircleTel
```
### 3. Discoveries (Things You Learned)
```markdown
## Discovery: [Brief Title]
**Context**: What were you working on?
**Insight**: What did you learn?
**Impact**: How does this change future work?
**References**: Related files, docs, or code
```
### 4. Shortcuts (Time Savers)
```markdown
## Shortcut: [Brief Title]
**Before**: How it was done previously
**After**: The faster/better way
**Savings**: Estimated time saved
**Command/Code**: The actual shortcut
```
## File Organization
```
.claude/skills/compound-learnings/
├── SKILL.md # This file
├── templates/
│ ├── learning-template.md # Template for learnings
│ ├── pattern-template.md # Template for patterns
│ └── correction-template.md # NEW: Template for corrections
├── corrections/ # NEW: RSI corrections
│ └── YYYY-MM-DD_topic.md # Detected corrections
├── extracted-rules/ # NEW: Synthesized rules
│ └── rule-name.md # Rules derived from corrections
└── learnings/
├── YYYY-MM-DD_topic.md # Date-prefixed learnings
└── patterns/
├── api-routes.md # API route patterns
├── error-handling.md # Error handling patterns
├── testing.md # Testing patterns
└── migrations.md # Migration patterns
```
## Extracted Rules (RSI Output)
Rules synthesized from corrections are stored in `extracted-rules/`:
```markdown
# Rule: [Rule Name]
**Derived From**: corrections/YYYY-MM-DD_topic.md
**Confidence**: high | medium | low
**Applications**: N times
## The Rule
[Clear, actionable rule]
## Example
[Code or workflow example]
## Counter-Example
[What NOT to do - the original mistake]
```
### Example Extracted Rules
| Rule | Derived From | Applications |
|------|--------------|--------------|
| Use `admin_notes` not `notes` | Correction 2026-02-06 | 3 |
| Always `await context.params` | Correction 2026-02-08 | 5 |
| Add service_role policy | Correction 2026-02-09 | 4 |
## Integration with MEMORY.md
After capturing learnings, the most important insights should be summarized in MEMORY.md for cross-session persistence:
```markdown
# In MEMORY.md
## Key Patterns
- API routes: Use apiLogger, not console.log (see compound-learnings/patterns/api-routes.md)
- Error handling: Use lib/errors/app-error.ts classes (see patterns/error-handling.md)
## Recent Learnings
- 2026-02-09: Console migration - batch by domain, use parallel agents
```
## Best Practices
### DO Capture
- Solutions to problems that took >30 minutes to solve
- Patterns you'll use more than twice
- Gotchas specific to CircleTel's stack
- Commands or workflows that saved significant time
- Architectural decisions and their rationale
### DON'T Capture
- Obvious things documented elsewhere
- One-off fixes unlikely to recur
- External library documentation (just link to it)
- Temporary workarounds (capture the proper fix instead)
## Example Compound Session
```
You: /compound
Claude: Let me analyze this session for compoundable learnings...
## Session Summary: Console Migration (2026-02-09)
### Patterns Extracted
1. **Batch Migration Pattern**: Group files by domain (cron, payments, admin)
for focused, reviewable commits.
2. **Logger Selection Pattern**: Match logger to domain:
- `apiLogger` - API routes
- `cronLogger` - Scheduled tasks
- `webhookLogger` - External webhooks
- `paymentLogger` - Payment flows
### Friction Points
1. **Duplicate catch blocks**: Automated migration introduced syntax errors.
Prevention: Always run type-check before committing bulk changes.
### Time Savings
- Parallel subagents reduced migration time by ~70%
- Domain-based batching made PRs reviewable
Shall I save these to learnings/2026-02-09_console-migration.md?
```
## Metrics
Track the compound effect over time:
| Metric | Description |
|--------|-------------|
| Patterns Created | Number of reusable patterns documented |
| Friction Resolved | Issues prevented by prior learnings |
| Time Saved | Estimated hours saved by patterns |
| MEMORY.md Updates | Cross-session insights captured |
## Related Skills
- `session-manager` - Name and resume sessions
- `refactor` - Identify improvement opportunities
- `tech-debt-analyzer` - Track technical debt
- `filesystem-context` - Persist context across sessions
---
**Philosophy**: Don't just ship code—ship knowledge. Every task completed is an investment in your future velocity.Related Skills
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
database-architect
Expert database architect specializing in data layer design from scratch, technology selection, schema modeling, and scalable database architectures. Masters SQL/NoSQL/TimeSeries database selection, normalization strategies, migration planning, and performance-first design. Handles both greenfield architectures and re-architecture of existing systems. Use PROACTIVELY for database architecture, technology selection, or data modeling decisions.
data-transform-gen
Generate ETL and data transformation scripts. Use when migrating data between systems.
data-sql-optimization
Production-grade SQL optimization for OLTP systems: EXPLAIN/plan analysis, balanced indexing, schema and query design, migrations, backup/recovery, HA, security, and safe performance tuning across PostgreSQL, MySQL, SQL Server, Oracle, SQLite.
data-engineering-backend-architect
Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs. Use when: the task directly matches backend architect responsibilities within plugin data-engineering. Do not use when: a more specific framework or task-focused skill is clearly a better match.
data-client-setup
Install and set up @data-client/react or @data-client/vue in a project. Detects project type (NextJS, Expo, React Native, Vue, plain React) and protocol (REST, GraphQL, custom), then hands off to protocol-specific setup skills.
data-architect
**Master Skill**: Data Architect for PayU. Expert in PostgreSQL design, Performance Tuning (Indexing/Locking), Flyway migrations, CQRS/Event-Sourcing, TimescaleDB, and high-scale JSONB patterns.
darpan-gemini
Use when coding or reviewing the Moqui-based Darpan component to follow local conventions, documentation practices, and verification steps; keep work inside runtime/component/darpan/** and apply both AGENTS files.
dapr-integration
Integrate Dapr building blocks for event-driven microservices - Pub/Sub, State Management, Secrets, Service Invocation, and Jobs API. Use when implementing event-driven architecture for Phase 5. (project)
dapp-sdd:specify
Use when expanding a README-based dApp description into a full specification with user stories and acceptance criteria.
dansk-qa
Use when reviewing Danish copy for anglicisms, technical jargon, defensive tone, vague formulations, English words, and overly formal language. Scans uncommitted files by default or specific files with --file flag.
d3-viz
使用 d3.js 创建交互式数据可视化。此技能应在创建自定义图表、图形、网络图、地理可视化或任何需要对视觉元素、转换或交互进行细粒度控制的复杂基于 SVG 的数据可视化时使用。用于标准图表库之外的定制可视化,无论是 React、Vue、Svelte、原生 JavaScript 还是任何其他环境。