Skip to content
Back to skills

Capy Cortex

ASecurity

Autonomous learning system - learns from mistakes, reflects on sessions, and gets smarter over time. The AI brain.

  • 67 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 10, 2026
ai-agentstypescriptpythonbashsqlreactdatabase

Security analysis

A100/100

Pro scans all 19 files and shows the line behind each finding

Scanned November 10, 2026

npx -y skills add ComeOnOliver/skillshub --skill capy-cortex --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Capy Cortex?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Capy Cortex
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/comeonoliver-capy-cortex/badge)](https://www.skillsdirectory.com/skills/comeonoliver-capy-cortex)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: capy-cortex
description: "Autonomous learning system - learns from mistakes, reflects on sessions, and gets smarter over time. The AI brain."
---

# Capy Cortex - Autonomous Learning System

You have a persistent learning brain powered by SQLite + FTS5 + sklearn TF-IDF.
Knowledge is automatically loaded via hooks. This file describes manual operations.

## Architecture

- **Database**: `~/.claude/skills/capy-cortex/cortex.db` (SQLite + FTS5 + WAL)
- **Hooks** (automatic, never call manually):
  - SessionStart: Loads anti-patterns, preferences, principles
  - UserPromptSubmit: Retrieves task-relevant rules via FTS5
  - PreToolUse(Bash): Blocks known dangerous commands
  - PostToolUseFailure: Records errors as anti-patterns
  - Stop: Extracts corrections and preferences from conversation
- **Scripts** (for manual/scheduled use):
  - `cortex.py`: Core engine (retrieve, add rules, stats)
  - `reflect.py`: Deep session analysis
  - `consolidate.py`: Cluster rules into principles (sklearn)
  - `bootstrap.py`: Mine historical sessions

## Manual Commands

```bash
# Check system health
python3 ~/.claude/skills/capy-cortex/scripts/cortex.py stats

# Retrieve rules for a topic
python3 ~/.claude/skills/capy-cortex/scripts/cortex.py retrieve "react typescript"

# Add a rule manually
python3 ~/.claude/skills/capy-cortex/scripts/cortex.py add-rule "Always use TypeScript strict mode" "best_practice"

# Add an anti-pattern
python3 ~/.claude/skills/capy-cortex/scripts/cortex.py add-ap "Never force push to main" "critical"

# Add a preference
python3 ~/.claude/skills/capy-cortex/scripts/cortex.py add-pref "User prefers functional components over class components"

# Run consolidation (clusters rules into principles)
python3 ~/.claude/skills/capy-cortex/scripts/consolidate.py

# Retrain TF-IDF model
python3 ~/.claude/skills/capy-cortex/scripts/cortex.py retrain

# Apply confidence decay
python3 ~/.claude/skills/capy-cortex/scripts/cortex.py decay
```

## How It Learns

1. **Automatic** (via hooks): Errors are captured, corrections noted, preferences extracted
2. **Reflection**: Deep analysis of session transcripts extracts patterns
3. **Consolidation**: sklearn clustering groups similar rules into principles
4. **Decay**: Old, unreinforced rules fade; validated rules strengthen
5. **Retrieval**: Two-stage FTS5 + TF-IDF returns only relevant knowledge (O(1) context)

Files in this skill

  • .gitignore277 B
  • LICENSE1 KB
  • README.md17.4 KB
  • SKILL.md2.3 KB
  • dashboard.py6.8 KB
  • dashboard/.gitignore253 B
  • dashboard/README.md2.4 KB
  • dashboard/eslint.config.js616 B
  • dashboard/index.html636 B
  • dashboard/package.json960 B
  • dashboard/public/favicon.svg9.3 KB
  • dashboard/public/icons.svg4.9 KB
  • dashboard/src/App.tsx4.7 KB
  • dashboard/src/assets/hero.png43.9 KB
  • dashboard/src/assets/react.svg4 KB
  • dashboard/src/assets/vite.svg8.5 KB
  • dashboard/src/components/charts/CategoryDonut.tsx2.2 KB
  • dashboard/src/components/charts/ConfidenceBar.tsx1.6 KB
  • dashboard/src/components/charts/EventsTimeline.tsx1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.