continuous-learning-v2 — for Claude Code continuous-learning-v2, everything-claude-code, official, for Claude Code, ide skills, instinct-based learning, atomic instincts, confidence scoring, project-scoped instincts, behavior extraction, Claude Code

Verified
v2.1.0
GitHub

About this Skill

Ideal for Advanced AI Agents like Claude Code, AutoGPT, and LangChain, seeking to enhance their learning capabilities through instinct-based behavior extraction and confidence scoring. continuous-learning-v2 is a cutting-edge AI agent skill that enables instinct-based learning, creating atomic instincts with confidence scoring for efficient coding.

Features

Extracting instinct-based behaviors using hooks
Evolving instincts into skills, commands, or agents
Tuning confidence thresholds for learned behaviors
Managing project-scoped vs global instincts
Promoting instincts from project to global scope
Utilizing preToolUse and postToolUse for reliable observation

# Core Topics

affaan-m affaan-m
[105.8k]
[13742]
Updated: 3/25/2026

Agent Capability Analysis

The continuous-learning-v2 skill by affaan-m is an open-source official AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for for Claude Code, instinct-based learning, atomic instincts.

Ideal Agent Persona

Ideal for Advanced AI Agents like Claude Code, AutoGPT, and LangChain, seeking to enhance their learning capabilities through instinct-based behavior extraction and confidence scoring.

Core Value

Empowers agents to evolve instincts into reusable knowledge through atomic learned behaviors, utilizing project-scoped instincts and confidence thresholds, while preventing cross-project contamination and promoting instincts from project to global scope via git remote URL or repo path detection.

Capabilities Granted for continuous-learning-v2

Automating the evolution of instincts into full skills, commands, or agents
Generating project-scoped instincts to prevent cross-project contamination
Debugging and tuning confidence thresholds for learned behaviors to optimize performance

! Prerequisites & Limits

  • Requires Claude Code sessions and hook configuration
  • Needs project context detection via git remote URL or repo path
  • Limited to project-scoped instincts by default, with optional promotion to global scope
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

continuous-learning-v2

Unlock efficient coding with continuous-learning-v2, an AI agent skill for Claude Code that turns sessions into reusable knowledge through atomic instincts,...

SKILL.md
Readonly

Continuous Learning v2.1 - Instinct

-Based Architecture

An advanced learning system that turns your Claude Code sessions into reusable knowledge through atomic "instincts" - small learned behaviors with confidence scoring.

v2.1 adds project-scoped instincts — React patterns stay in your React project, Python conventions stay in your Python project, and universal patterns (like "always validate input") are shared globally.

When to Activate

  • Setting up automatic learning from Claude Code sessions
  • Configuring instinct-based behavior extraction via hooks
  • Tuning confidence thresholds for learned behaviors
  • Reviewing, exporting, or importing instinct libraries
  • Evolving instincts into full skills, commands, or agents
  • Managing project-scoped vs global instincts
  • Promoting instincts from project to global scope

What's New in v2.1

Featurev2.0v2.1
StorageGlobal (~/.claude/homunculus/)Project-scoped (projects/<hash>/)
ScopeAll instincts apply everywhereProject-scoped + global
DetectionNonegit remote URL / repo path
PromotionN/AProject → global when seen in 2+ projects
Commands4 (status/evolve/export/import)6 (+promote/projects)
Cross-projectContamination riskIsolated by default

What's New in v2 (vs v1)

Featurev1v2
ObservationStop hook (session end)PreToolUse/PostToolUse (100% reliable)
AnalysisMain contextBackground agent (Haiku)
GranularityFull skillsAtomic "instincts"
ConfidenceNone0.3-0.9 weighted
EvolutionDirect to skillInstincts -> cluster -> skill/command/agent
SharingNoneExport/import instincts

The Instinct Model

An instinct is a small learned behavior:

yaml
1--- 2id: prefer-functional-style 3trigger: "when writing new functions" 4confidence: 0.7 5domain: "code-style" 6source: "session-observation" 7scope: project 8project_id: "a1b2c3d4e5f6" 9project_name: "my-react-app" 10--- 11 12# Prefer Functional Style 13 14## Action 15Use functional patterns over classes when appropriate. 16 17## Evidence 18- Observed 5 instances of functional pattern preference 19- User corrected class-based approach to functional on 2025-01-15

Properties:

  • Atomic -- one trigger, one action
  • Confidence-weighted -- 0.3 = tentative, 0.9 = near certain
  • Domain-tagged -- code-style, testing, git, debugging, workflow, etc.
  • Evidence-backed -- tracks what observations created it
  • Scope-aware -- project (default) or global

How It Works

Session Activity (in a git repo)
      |
      | Hooks capture prompts + tool use (100% reliable)
      | + detect project context (git remote / repo path)
      v
+---------------------------------------------+
|  projects/<project-hash>/observations.jsonl  |
|   (prompts, tool calls, outcomes, project)   |
+---------------------------------------------+
      |
      | Observer agent reads (background, Haiku)
      v
+---------------------------------------------+
|          PATTERN DETECTION                   |
|   * User corrections -> instinct             |
|   * Error resolutions -> instinct            |
|   * Repeated workflows -> instinct           |
|   * Scope decision: project or global?       |
+---------------------------------------------+
      |
      | Creates/updates
      v
+---------------------------------------------+
|  projects/<project-hash>/instincts/personal/ |
|   * prefer-functional.yaml (0.7) [project]   |
|   * use-react-hooks.yaml (0.9) [project]     |
+---------------------------------------------+
|  instincts/personal/  (GLOBAL)               |
|   * always-validate-input.yaml (0.85) [global]|
|   * grep-before-edit.yaml (0.6) [global]     |
+---------------------------------------------+
      |
      | /evolve clusters + /promote
      v
+---------------------------------------------+
|  projects/<hash>/evolved/ (project-scoped)   |
|  evolved/ (global)                           |
|   * commands/new-feature.md                  |
|   * skills/testing-workflow.md               |
|   * agents/refactor-specialist.md            |
+---------------------------------------------+

Project Detection

The system automatically detects your current project:

  1. CLAUDE_PROJECT_DIR env var (highest priority)
  2. git remote get-url origin -- hashed to create a portable project ID (same repo on different machines gets the same ID)
  3. git rev-parse --show-toplevel -- fallback using repo path (machine-specific)
  4. Global fallback -- if no project is detected, instincts go to global scope

Each project gets a 12-character hash ID (e.g., a1b2c3d4e5f6). A registry file at ~/.claude/homunculus/projects.json maps IDs to human-readable names.

Quick Start

1. Enable Observation Hooks

Add to your ~/.claude/settings.json.

If installed as a plugin (recommended):

json
1{ 2 "hooks": { 3 "PreToolUse": [{ 4 "matcher": "*", 5 "hooks": [{ 6 "type": "command", 7 "command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh" 8 }] 9 }], 10 "PostToolUse": [{ 11 "matcher": "*", 12 "hooks": [{ 13 "type": "command", 14 "command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh" 15 }] 16 }] 17 } 18}

If installed manually to ~/.claude/skills:

json
1{ 2 "hooks": { 3 "PreToolUse": [{ 4 "matcher": "*", 5 "hooks": [{ 6 "type": "command", 7 "command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh" 8 }] 9 }], 10 "PostToolUse": [{ 11 "matcher": "*", 12 "hooks": [{ 13 "type": "command", 14 "command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh" 15 }] 16 }] 17 } 18}

2. Initialize Directory Structure

The system creates directories automatically on first use, but you can also create them manually:

bash
1# Global directories 2mkdir -p ~/.claude/homunculus/{instincts/{personal,inherited},evolved/{agents,skills,commands},projects} 3 4# Project directories are auto-created when the hook first runs in a git repo

3. Use the Instinct Commands

bash
1/instinct-status # Show learned instincts (project + global) 2/evolve # Cluster related instincts into skills/commands 3/instinct-export # Export instincts to file 4/instinct-import # Import instincts from others 5/promote # Promote project instincts to global scope 6/projects # List all known projects and their instinct counts

Commands

CommandDescription
/instinct-statusShow all instincts (project-scoped + global) with confidence
/evolveCluster related instincts into skills/commands, suggest promotions
/instinct-exportExport instincts (filterable by scope/domain)
/instinct-import <file>Import instincts with scope control
/promote [id]Promote project instincts to global scope
/projectsList all known projects and their instinct counts

Configuration

Edit config.json to control the background observer:

json
1{ 2 "version": "2.1", 3 "observer": { 4 "enabled": false, 5 "run_interval_minutes": 5, 6 "min_observations_to_analyze": 20 7 } 8}
KeyDefaultDescription
observer.enabledfalseEnable the background observer agent
observer.run_interval_minutes5How often the observer analyzes observations
observer.min_observations_to_analyze20Minimum observations before analysis runs

Other behavior (observation capture, instinct thresholds, project scoping, promotion criteria) is configured via code defaults in instinct-cli.py and observe.sh.

File Structure

~/.claude/homunculus/
+-- identity.json           # Your profile, technical level
+-- projects.json           # Registry: project hash -> name/path/remote
+-- observations.jsonl      # Global observations (fallback)
+-- instincts/
|   +-- personal/           # Global auto-learned instincts
|   +-- inherited/          # Global imported instincts
+-- evolved/
|   +-- agents/             # Global generated agents
|   +-- skills/             # Global generated skills
|   +-- commands/           # Global generated commands
+-- projects/
    +-- a1b2c3d4e5f6/       # Project hash (from git remote URL)
    |   +-- project.json    # Per-project metadata mirror (id/name/root/remote)
    |   +-- observations.jsonl
    |   +-- observations.archive/
    |   +-- instincts/
    |   |   +-- personal/   # Project-specific auto-learned
    |   |   +-- inherited/  # Project-specific imported
    |   +-- evolved/
    |       +-- skills/
    |       +-- commands/
    |       +-- agents/
    +-- f6e5d4c3b2a1/       # Another project
        +-- ...

Scope Decision Guide

Pattern TypeScopeExamples
Language/framework conventionsproject"Use React hooks", "Follow Django REST patterns"
File structure preferencesproject"Tests in __tests__/", "Components in src/components/"
Code styleproject"Use functional style", "Prefer dataclasses"
Error handling strategiesproject"Use Result type for errors"
Security practicesglobal"Validate user input", "Sanitize SQL"
General best practicesglobal"Write tests first", "Always handle errors"
Tool workflow preferencesglobal"Grep before Edit", "Read before Write"
Git practicesglobal"Conventional commits", "Small focused commits"

Instinct Promotion (Project -> Global)

When the same instinct appears in multiple projects with high confidence, it's a candidate for promotion to global scope.

Auto-promotion criteria:

  • Same instinct ID in 2+ projects
  • Average confidence >= 0.8

How to promote:

bash
1# Promote a specific instinct 2python3 instinct-cli.py promote prefer-explicit-errors 3 4# Auto-promote all qualifying instincts 5python3 instinct-cli.py promote 6 7# Preview without changes 8python3 instinct-cli.py promote --dry-run

The /evolve command also suggests promotion candidates.

Confidence Scoring

Confidence evolves over time:

ScoreMeaningBehavior
0.3TentativeSuggested but not enforced
0.5ModerateApplied when relevant
0.7StrongAuto-approved for application
0.9Near-certainCore behavior

Confidence increases when:

  • Pattern is repeatedly observed
  • User doesn't correct the suggested behavior
  • Similar instincts from other sources agree

Confidence decreases when:

  • User explicitly corrects the behavior
  • Pattern isn't observed for extended periods
  • Contradicting evidence appears

Why Hooks vs Skills for Observation?

"v1 relied on skills to observe. Skills are probabilistic -- they fire ~50-80% of the time based on Claude's judgment."

Hooks fire 100% of the time, deterministically. This means:

  • Every tool call is observed
  • No patterns are missed
  • Learning is comprehensive

Backward Compatibility

v2.1 is fully compatible with v2.0 and v1:

  • Existing global instincts in ~/.claude/homunculus/instincts/ still work as global instincts
  • Existing ~/.claude/skills/learned/ skills from v1 still work
  • Stop hook still runs (but now also feeds into v2)
  • Gradual migration: run both in parallel

Privacy

  • Observations stay local on your machine
  • Project-scoped instincts are isolated per project
  • Only instincts (patterns) can be exported — not raw observations
  • No actual code or conversation content is shared
  • You control what gets exported and promoted
  • ECC-Tools GitHub App - Generate instincts from repo history
  • Homunculus - Community project that inspired the v2 instinct-based architecture (atomic observations, confidence scoring, instinct evolution pipeline)
  • The Longform Guide - Continuous learning section

Instinct-based learning: teaching Claude your patterns, one project at a time.

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is continuous-learning-v2?

Ideal for Advanced AI Agents like Claude Code, AutoGPT, and LangChain, seeking to enhance their learning capabilities through instinct-based behavior extraction and confidence scoring. continuous-learning-v2 is a cutting-edge AI agent skill that enables instinct-based learning, creating atomic instincts with confidence scoring for efficient coding.

How do I install continuous-learning-v2?

Run the command: npx killer-skills add affaan-m/everything-claude-code/continuous-learning-v2. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for continuous-learning-v2?

Key use cases include: Automating the evolution of instincts into full skills, commands, or agents, Generating project-scoped instincts to prevent cross-project contamination, Debugging and tuning confidence thresholds for learned behaviors to optimize performance.

Which IDEs are compatible with continuous-learning-v2?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for continuous-learning-v2?

Requires Claude Code sessions and hook configuration. Needs project context detection via git remote URL or repo path. Limited to project-scoped instincts by default, with optional promotion to global scope.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add affaan-m/everything-claude-code/continuous-learning-v2. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use continuous-learning-v2 immediately in the current project.

Related Skills

Looking for an alternative to continuous-learning-v2 or another official skill for your workflow? Explore these related open-source skills.

View All

flags

Logo of facebook
facebook

Use when you need to check feature flag states, compare channels, or debug why a feature behaves differently across release channels.

243.6k
0
Developer

extract-errors

Logo of facebook
facebook

Use when adding new error messages to React, or seeing unknown error code warnings.

243.6k
0
Developer

fix

Logo of facebook
facebook

Use when you have lint errors, formatting issues, or before committing code to ensure it passes CI.

243.6k
0
Developer

flow

Logo of facebook
facebook

Use when you need to run Flow type checking, or when seeing Flow type errors in React code.

243.6k
0
Developer