A learning architecture that converts session observations into reusable behaviors (instincts) with confidence scoring.

Install

mkdir -p .claude/skills/continuous-learning-mostafa-ismail-2004 && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13163" && unzip -o skill.zip -d .claude/skills/continuous-learning-mostafa-ismail-2004 && rm skill.zip

Installs to .claude/skills/continuous-learning-mostafa-ismail-2004

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. Features project-scoped instincts to prevent cross-project contamination.
234 charsno explicit “when” trigger
Advanced

Key capabilities

  • Observe sessions via hooks to capture prompts and tool use
  • Create atomic instincts with confidence scoring
  • Evolve instincts into skills, commands, or agents
  • Manage project-scoped and global instincts
  • Promote project instincts to global scope

How it works

This skill observes Codex sessions via hooks, detects project context, and identifies patterns to create atomic instincts. These instincts are confidence-weighted and can be evolved into full skills or agents.

Inputs & outputs

You give it
Codex session activity in a git repository
You get back
Atomic instincts with confidence scores, and evolved skills, commands, or agents

When to use continuous-learning

  • Learn project coding styles
  • Capture best practices
  • Evolve reusable instincts
  • Automate workflow conventions

About this skill

Continuous Learning - Instinct-Based Architecture

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

Features 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 Codex 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

The Instinct Model

An instinct is a small learned behavior:

---
id: prefer-functional-style
trigger: "when writing new functions"
confidence: 0.7
domain: "code-style"
source: "session-observation"
scope: project
project_id: "a1b2c3d4e5f6"
project_name: "my-react-app"
---

# Prefer Functional Style

## Action
Use functional patterns over classes when appropriate.

## Evidence
- Observed 5 instances of functional pattern preference
- 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)
      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. CODEX_PLUGIN_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 ~/.codex/codex-plugin/continuous-learning/projects.json maps IDs to human-readable names.

Quick Start

1. Enable Observation Hooks

The continuous learning observation hooks are bundled as part of the plugin in the hooks/hooks.json file. When the plugin is installed and trusted, Codex can run them on PreToolUse and PostToolUse.

2. Initialize Directory Structure

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

# Global directories
mkdir -p ~/.codex/codex-plugin/continuous-learning/{instincts/{personal,inherited},evolved/{agents,skills,commands},projects}

# Project directories are auto-created when the hook first runs in a git repo

3. Use the Instinct Commands

python3 scripts/instinct-cli.py status     # Show learned instincts (project + global)
python3 scripts/instinct-cli.py evolve     # Cluster related instincts into skills/commands
python3 scripts/instinct-cli.py export     # Export instincts to file
python3 scripts/instinct-cli.py import     # Import instincts from others
python3 scripts/instinct-cli.py promote    # Promote project instincts to global scope
python3 scripts/instinct-cli.py projects   # List all known projects and their instinct counts

Configuration

Configuration is managed with environment variables and Codex plugin settings. Use CODEX_PLUGIN_OBSERVER_ENABLED=true to enable observation.

SettingDefaultDescription
Observer EnabledfalseEnable the background observer agent
Run Interval5How often the observer analyzes observations (in minutes)
Min Observations20Minimum observations before analysis runs

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

File Structure

~/.codex/codex-plugin/continuous-learning/
+-- 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:

# Promote a specific instinct
python3 scripts/instinct-cli.py promote prefer-explicit-errors

# Auto-promote all qualifying instincts
python3 scripts/instinct-cli.py promote

# Preview without changes
python3 scripts/instinct-cli.py promote --dry-run

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 for Observation?

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

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

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

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

When not to use it

  • When observation hooks are not enabled
  • When raw observations are to be shared instead of instincts
  • When cross-project contamination of patterns is desired

Limitations

  • Observations stay local on the machine
  • Only instincts (patterns) can be exported, not raw observations
  • Requires `CODEX_PLUGIN_OBSERVER_ENABLED=true` to enable observation

How it compares

This skill provides an instinct-based learning architecture that captures atomic behaviors from sessions and evolves them into reusable knowledge, ensuring project-scoped patterns and confidence scoring, unlike generic learning systems.

Compared to similar skills

continuous-learning side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
continuous-learning (this skill)01moReviewAdvanced
autonomous-loops02moReviewAdvanced
gemini-runtime05moNo flagsIntermediate
mcporter06moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

autonomous-loops

Rajbharti06

Self-improvement loop patterns — eval → learn → improve cycles running without human input

00

gemini-runtime

dickymoore

Gemini CLI runtime/session control: use Gemini CLI slash commands and CLI flags to manage sessions, models, and restarts in a worker terminal. Trigger when the controller needs to operate the Gemini CLI like a human.

00

mcporter

consuelohq

--- name: mcporter description: Call MCP servers via MCPorter - browser automation, vision, and other MCP tools homepage: https://github.com/steipete/mcporter metadata: { "openclaw": { "emoji": "🧳", "requires": { "bins": ["npx"] } } }

00

openai-whisper

qianleigood

Use when transcribing local audio or video on Apple Silicon without an API key, especially when MLX Whisper should be the default general-purpose local speech-to-text path.

00

opencode-cli

SpillwaveSolutions

This skill should be used when configuring or using the OpenCode CLI for headless LLM automation. Use when the user asks to "configure opencode", "use opencode cli", "set up opencode", "opencode run command", "opencode model selection", "opencode providers", "opencode vertex ai", "opencode mcp servers", "opencode ollama", "opencode local models", "opencode deepseek", "opencode kimi", "opencode mistral", "fallback cli tool", or "headless llm cli". Covers command syntax, provider configuration, Vertex AI setup, MCP servers, local models, cloud providers, and subprocess integration patterns.

14174

robotics-code-generator

HumaizaNaz

Generates clean, runnable ROS 2, Gazebo, Isaac Sim, and VLA code for humanoid robotics

1490

Search skills

Search the agent skills registry