capy-cortex

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

25 stars

Best use case

capy-cortex is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using capy-cortex should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/capy-cortex/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/happycapy-ai/Happycapy-skills/capy-cortex/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/capy-cortex/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How capy-cortex Compares

Feature / Agentcapy-cortexStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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)

Related Skills

happycapy-skill-creator

25
from ComeOnOliver/skillshub

Automate HappyCapy skill creation by finding and adapting existing skills from anthropics/skills repository. Handles environment constraints (Python 3.11, Node.js 24, no Docker). Use when user wants to create or adapt skills for specific tasks.

happycapy-feishu

25
from ComeOnOliver/skillshub

为 HappyCapy 安装并授权飞书(Lark)MCP,让 Claude 直接操作飞书消息、文档、多维表格、日历等。当用户提到安装飞书 MCP、配置飞书、接入飞书、飞书 MCP setup、connect feishu/lark、飞书重新授权、飞书 token 过期、lark mcp 失效等场景时,必须使用此 skill。

capy-video-gen-skill

25
from ComeOnOliver/skillshub

Multi-shot AI video generation pipeline with face identity consistency. Converts scripts or ideas into complete videos using character extraction, storyboarding, frame generation, and video assembly. 300 experiments validated, 70% face distance improvement. Use when the user asks to create a video from a script, story, idea, or wants multi-shot video with consistent characters.

arm-cortex-expert

25
from ComeOnOliver/skillshub

Senior embedded software engineer specializing in firmware and driver development for ARM Cortex-M microcontrollers (Teensy, STM32, nRF52, SAMD). Decades of experience writing reliable, optimized, and maintainable embedded code with deep expertise in memory barriers, DMA/cache coherency, interrupt-driven I/O, and peripheral drivers.

textcortex-automation

25
from ComeOnOliver/skillshub

Automate Textcortex tasks via Rube MCP (Composio). Always search tools first for current schemas.

Daily Logs

25
from ComeOnOliver/skillshub

Record the user's daily activities, progress, decisions, and learnings in a structured, chronological format.

Socratic Method: The Dialectic Engine

25
from ComeOnOliver/skillshub

This skill transforms Claude into a Socratic agent — a cognitive partner who guides

Sokratische Methode: Die Dialektik-Maschine

25
from ComeOnOliver/skillshub

Dieser Skill verwandelt Claude in einen sokratischen Agenten — einen kognitiven Partner, der Nutzende durch systematisches Fragen zur Wissensentdeckung führt, anstatt direkt zu instruieren.

College Football Data (CFB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.

College Basketball Data (CBB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.

Betting Analysis

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for odds formats, command parameters, and key concepts.

Research Proposal Generator

25
from ComeOnOliver/skillshub

Generate high-quality academic research proposals for PhD applications following Nature Reviews-style academic writing conventions.