ReasoningBank Intelligence — Claude Code skill: setup and use
Integrates adaptive learning into AI agents via ReasoningBank for pattern recognition and strategy choice. Useful for building self-improving agents and optimizing workflows.
npx skills add ruvnet/ruflo --skill reasoningbank-intelligence -a claude-codeWhat ReasoningBank Intelligence does
The skill gives agents a self-learning loop. It logs execution outcomes via recordExperience, detects recurring triggers, and ranks strategies for tasks like bug fixing or code review. State persistence relies on AgentDB with optional vector indexing.
Recommendations stay inaccurate until the store logs around 100 experiences per task type. The engine handles knowledge transfer across related domains via transferKnowledge and can trigger background model updates every 100 runs.
Running this requires Node.js 18+, agentic-flow v1.5.11 or higher, and AgentDB v1.0.4+. Pruning or TTL settings help prevent unrestricted database growth over time.
What it helps with
- record task execution metrics into AgentDB for continuous agent learning
- recommend optimal approaches for code reviews based on historical success
- transfer learned debugging patterns between related programming languages
- detect pipeline failure patterns from trigger data and deployment metrics
Example prompts for the agent
- Use ReasoningBank to recommend the best strategy for a medium complexity code review
- Record the outcome of the bug fix task into AgentDB with execution metrics
- Transfer learned code review patterns from JavaScript to TypeScript
How to install ReasoningBank Intelligence
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill reasoningbank-intelligence -a claude-code2Manually: put the files in place
~/.claude/skills/reasoningbank-intelligence/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/reasoningbank-intelligence/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill reasoningbank-intelligence -a codex2Manually: put the files in place
.agents/skills/reasoningbank-intelligence/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill reasoningbank-intelligence -a cursor2Manually: put the files in place
.cursor/skills/reasoningbank-intelligence/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo reasoningbank-intelligence2Manually: put the files in place
.github/skills/reasoningbank-intelligence/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill reasoningbank-intelligence -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path v3/@claude-flow/cli/.claude/skills/reasoningbank-intelligenceManually: put the files in place
.devin/skills/reasoningbank-intelligence/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill reasoningbank-intelligence -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about ReasoningBank Intelligence
How to install ReasoningBank Intelligence in Claude Code?
Run npx skills add ruvnet/ruflo --skill reasoningbank-intelligence -a claude-code in your terminal. This adds the configuration to ~/.claude/skills/reasoningbank-intelligence/SKILL.md.
What does ReasoningBank Intelligence do?
It equips agents with adaptive learning routines. The system tracks task outcomes, identifies execution patterns, and selects optimal strategies based on historical data.
What are the prerequisites for ReasoningBank Intelligence?
You need Node.js 18+, agentic-flow version 1.5.11+, and AgentDB version 1.0.4+. You also need roughly 100 experiences per task type to get reliable strategy suggestions.
Source text
SKILL.md · MIT
---
name: "ReasoningBank Intelligence"
description: "Implement adaptive learning with ReasoningBank for pattern recognition, strategy optimization, and continuous improvement. Use when building self-learning agents, optimizing workflows, or implementing meta-cognitive systems."
---
# ReasoningBank Intelligence
## What This Skill Does
Implements ReasoningBank's adaptive learning system for AI agents to learn from experience, recognize patterns, and optimize strategies over time. Enables meta-cognitive capabilities and continuous improvement.
## Prerequisites
- agentic-flow v1.5.11+
- AgentDB v1.0.4+ (for persistence)
- Node.js 18+
## Quick Start
```typescript
import { ReasoningBank } from 'agentic-flow/reasoningbank';
// Initialize ReasoningBank
const rb = new ReasoningBank({
persist: true,
learningRate: 0.1,
adapter: 'agentdb' // Use AgentDB for storage
});
// Record task outcome
await rb.recordExperience({
task: 'code_review',
approach: 'static_analysis_first',
outcome: {
success: true,
metrics: {
bugs_found: 5,
time_taken: 120,
false_positives: 1
}
},
context: {
language: 'typescript',
complexity: 'medium'
}
});
// Get optimal strategy
const strategy = await rb.recommendStrategy('code_review', {
language: 'typescript',
complexity: 'high'
});
```
## Core Features
### 1. Pattern Recognition
```typescript
// Learn patterns from data
await rb.learnPattern({
pattern: 'api_errors_increase_after_deploy',
triggers: ['deployment', 'traffic_spike'],
actions: ['rollback', 'scale_up'],
confidence: 0.85
});
// Match patterns
const matches = await rb.matchPatterns(currentSituation);
```
### 2. Strategy Optimization
```typescript
// Compare strategies
const comparison = await rb.compareStrategies('bug_fixing', [
'tdd_approach',
'debug_first',
'reproduce_then_fix'
]);
// Get best strategy
const best = comparison.strategies[0];
console.log(`Best: ${best.name} (score: ${best.score})`);
```
### 3. Continuous Learning
```typescript
// Enable auto-learning from all tasks
await rb.enableAutoLearning({
threshold: 0.7, // Only learn from high-confidence outcomes
updateFrequency: 100 // Update models every 100 experiences
});
```
## Advanced Usage
### Meta-Learning
```typescript
// Learn about learning
await rb.metaLearn({
observation: 'parallel_execution_faster_for_independent_tasks',
confidence: 0.95,
applicability: {
task_types: ['batch_processing', 'data_transformation'],
conditions: ['tasks_independent', 'io_bound']
}
});
```
### Transfer Learning
```typescript
// Apply knowledge from one domain to another
await rb.transferKnowledge({
from: 'code_review_javascript',
to: 'code_review_typescript',
similarity: 0.8
});
```
### Adaptive Agents
```typescript
// Create self-improving agent
class AdaptiveAgent {
async execute(task: Task) {
// Get optimal strategy
const strategy = await rb.recommendStrategy(task.type, task.context);
// Execute with strategy
const result = await this.executeWithStrategy(task, strategy);
// Learn from outcome
await rb.recordExperience({
task: task.type,
approach: strategy.name,
outcome: result,
context: task.context
});
return result;
}
}
```
## Integration with AgentDB
```typescript
// Persist ReasoningBank data
await rb.configure({
storage: {
type: 'agentdb',
options: {
database: './reasoning-bank.db',
enableVectorSearch: true
}
}
});
// Query learned patterns
const patterns = await rb.query({
category: 'optimization',
minConfidence: 0.8,
timeRange: { last: '30d' }
});
```
## Performance Metrics
```typescript
// Track learning effectiveness
const metrics = await rb.getMetrics();
console.log(`
Total Experiences: ${metrics.totalExperiences}
Patterns Learned: ${metrics.patternsLearned}
Strategy Success Rate: ${metrics.strategySuccessRate}
Improvement Over Time: ${metrics.improvement}
`);
```
## Best Practices
1. **Record consistently**: Log all task outcomes, not just successes
2. **Provide context**: Rich context improves pattern matching
3. **Set thresholds**: Filter low-confidence learnings
4. **Review periodically**: Audit learned patterns for quality
5. **Use vector search**: Enable semantic pattern matching
## Troubleshooting
### Issue: Poor recommendations
**Solution**: Ensure sufficient training data (100+ experiences per task type)
### Issue: Slow pattern matching
**Solution**: Enable vector indexing in AgentDB
### Issue: Memory growing large
**Solution**: Set TTL for old experiences or enable pruning
## Learn More
- ReasoningBank Guide: agentic-flow/src/reasoningbank/README.md
- AgentDB Integration: packages/agentdb/docs/reasoningbank.md
- Pattern Learning: docs/reasoning/patterns.md
© ruvnet · MIT · ruvnet/ruflo