Open Source & Free

Claude Code That
Learns & Evolves

Transform your Claude Code into a self-improving AI assistant that remembers context, learns from every interaction, and evolves with your workflow.

View on GitHub Learn More
claude-code — neural-mode
$ claude
🧠 Neural Claude Code v1.0
✓ Expertise loaded: [knowledge-management v3] [strategic-advisor v2]
✓ Patterns detected: 12 workflows, 3 skill candidates
✓ Memory active: 47 facts, 156 events
Luna> Ready to assist. What shall we build today?

Superpowers for Claude Code

Everything you need to turn Claude into a learning, evolving AI companion that grows smarter with every session.

🧠

Self-Learning Expertise

Claude automatically loads domain knowledge at session start and learns from every interaction. No more repeating context.

🔄

Act-Learn Cycle

After significant work, Claude prompts you to capture learnings. Patterns, lessons, and preferences are stored for future sessions.

📊

Pattern Detection

Automatically analyzes your workflows to detect repeating patterns. Get recommendations for skills to create.

💾

Persistent Memory

Facts, events, and session logs persist across conversations. Claude remembers what matters to you.

🤖

Multi-AI Collaboration

Route tasks to Claude, Codex, or Gemini based on their strengths. Get the best AI for each job.

Self-Evolution

Run /evolve to analyze patterns, generate skills, and improve the system. Claude gets better over time.

How It Works

Three simple steps to transform your Claude Code experience.

1

Clone the Plugin

Get the plugin and run the setup script to configure hooks and create the expertise structure.

$ git clone https://github.com/brolag/neural-claude-code-plugin
$ ./scripts/setup-hooks.sh
2

Work Naturally

Use Claude Code as you normally would. The system automatically tracks patterns, loads expertise, and prompts for learnings.

$ claude
Expertise auto-loaded
Session tracking active
3

Watch It Evolve

Run the evolve command periodically to analyze patterns and improve the system. New skills are generated automatically.

> /evolve
Analyzing 156 events...
3 new patterns detected
1 skill candidate generated

Installation Guide

Set up Neural Claude Code in your projects in minutes.

1

Clone the Plugin Repository

Clone the plugin to a permanent location on your machine.

Terminal
$ git clone https://github.com/brolag/neural-claude-code-plugin

$ cd neural-claude-code-plugin
2

Run Global Setup

This configures global hooks and sets up the plugin root.

Terminal
$ chmod +x scripts/setup-hooks.sh
$ ./scripts/setup-hooks.sh
3

Set Environment Variable

Add this to your shell profile (~/.zshrc or ~/.bashrc).

~/.zshrc
# Neural Claude Code Plugin
export CLAUDE_PLUGIN_ROOT="$HOME/Sites/neural-claude-code-plugin"
Done! The plugin is now installed globally. Claude Code will automatically use these hooks in all projects.
1

Create .claude Directory

Initialize the Neural Claude Code structure in your project.

Terminal
$ cd your-project
$ mkdir -p .claude/{expertise,memory,scripts,data}
$ mkdir -p .claude/memory/{events,facts,session_logs}
2

Create Expertise Files

Add domain expertise for your project. Start with a base template.

.claude/expertise/project.yaml
# Project Expertise
domain: your_project_domain
version: 1
last_updated: 2025-01-01

understanding:
  project_type: "web-app"  # or api, cli, library, etc.
  tech_stack:
    - typescript
    - react
    - nodejs

patterns:
  - "Components go in src/components/"
  - "API routes in src/api/"

lessons_learned: []
open_questions: []
user_preferences: []
3

Create Expertise Manifest

Define load order and dependencies between expertise files.

.claude/expertise/manifest.yaml
version: 1
last_updated: 2025-01-01

load_order:
  - project
  - domain-specific

confidence:
  promotion_threshold: 0.7
  deprecation_threshold: 0.3

auto_update:
  enabled: true
4

Add Project Hooks (Optional)

Override or extend global hooks with project-specific behavior.

.claude/scripts/session-start.sh
#!/bin/bash
# Project-specific session start hook

# Source global hook first
if [ -f "$CLAUDE_PLUGIN_ROOT/scripts/hooks/session-start.sh" ]; then
    source "$CLAUDE_PLUGIN_ROOT/scripts/hooks/session-start.sh"
fi

# Add project-specific initialization here
echo '{"systemMessage": "Project: Your Project Name"}'
💡
Tip: Copy templates from ~/Sites/neural-claude-code-plugin/templates/ for a quick start.
📁 Project Structure
your-project/
├── .claude/
│   ├── expertise/           # Domain knowledge (YAML)
│   │   ├── manifest.yaml      # Load order & dependencies
│   │   ├── project.yaml       # Project-specific expertise
│   │   └── shared.yaml        # Cross-domain knowledge
│   │
│   ├── memory/              # Persistent memory
│   │   ├── events/            # Daily event logs (JSONL)
│   │   │   └── 2025-01-15.jsonl
│   │   ├── facts/             # Stored facts (JSON)
│   │   ├── session_logs/      # Session transcripts
│   │   ├── active_context.md  # Current context
│   │   ├── context-cache.json # Hot memory cache
│   │   └── pattern-index.json # Detected patterns
│   │
│   ├── scripts/             # Project hooks
│   │   ├── session-start.sh   # On session start
│   │   ├── session-stop.sh    # On session end
│   │   └── event-indexer.js   # Pattern detection
│   │
│   ├── agents/              # Custom agents
│   ├── skills/              # Reusable skills
│   ├── commands/            # Slash commands
│   ├── data/                # Session state
│   │   └── current-session.json
│   │
│   ├── settings.json          # Project settings
│   └── CLAUDE.md              # Project instructions
│
└── ... your project files

Key Components

🧠
expertise/

YAML files storing learned patterns, lessons, and user preferences. Auto-loaded at session start.

💾
memory/

Event logs, facts, and session history. Analyzed by /evolve for pattern detection.

scripts/

Hooks that run on session events. Extend global hooks with project-specific logic.

🤖
agents/ & skills/

Custom agents and reusable skills specific to your project.

Essential Commands

/evolve

Analyze patterns and improve the system

/remember <fact>

Save a fact to persistent memory

/recall <query>

Search and retrieve from memory

/health

Check system health and maintenance

The Numbers Speak

Real improvements from closing the learning loop.

3x
More patterns captured per week
40%
Faster context loading
Persistent memory across sessions

Ready to Level Up?

Join developers who are building with AI that actually learns and improves over time.

Get Started on GitHub