Agent skill

Capy Cortex

by happycapy-ai in happycapy-ai/Happycapy-skills

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

MITAuto-check passedData & Analytics

Install Capy Cortex

skills CLI
$ npx skills add happycapy-ai/Happycapy-skills --skill capy-cortex -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install happycapy-ai/Happycapy-skills capy-cortex --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/happycapy-ai/Happycapy-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/capy-cortex .claude/skills/capy-cortex && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
capy-cortex
GitHub stars
137
Token cost
~600 tokens
SKILL.md length
146 words
Files
79 (incl. scripts)
Skills in repo
28
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 5 steps: Automatic (via hooks): Errors are… → Reflection: Deep analysis of session… → Consolidation: sklearn clustering groups… → …
  • Data & Analytics work in your project
  • SKILL.md covers Architecture, Manual Commands and How It Learns
  • Runs Python and JavaScript scripts from its folder; calls python3

What it does

Capy Cortex is an agent skill from happycapy-ai/Happycapy-skills. Autonomous learning system - learns from mistakes, reflects on sessions, and gets smarter over time. The AI brain.

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. The skill folder holds 82 other files, including scripts (for example `README.md`, `dashboard.py` and `dashboard/README.md`).

It sits in Data & Analytics. It works with scikit-learn. The repository describes itself as: A curated collection of high-quality Claude Code skills to enhance your development workflow. The licence is MIT.

When your agent uses it

  • Data & Analytics work in your project

Example prompts

  • “/capy-cortex”

Requirements

  • Python 3
  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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)

What it can do on your machine

Read from SKILL.md and the folder at commit 9ff72fe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python and JavaScript, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Capy Cortex loads about 600 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 146 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~600

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from happycapy-ai/Happycapy-skills at commit 9ff72fe, republished under its MIT licence (© happycapy-ai). 146 words, ~600 tokens.

Download SKILL.mdSave it as .claude/skills/capy-cortex/SKILL.md (or your agent's skills folder). This skill also uses 78 other files; get the full folder from GitHub.
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)

© happycapy-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 78 other files (scripts) in skills/capy-cortex of happycapy-ai/Happycapy-skills.

  • SKILL.md
  • .gitignore
  • LICENSE
  • README.md
  • dashboard.py
  • dashboard/.gitignore
  • dashboard/README.md
  • dashboard/eslint.config.js
  • dashboard/index.html
  • dashboard/package-lock.json
  • dashboard/package.json
  • dashboard/public/favicon.svg
  • dashboard/public/icons.svg
  • dashboard/src/App.tsx
  • dashboard/src/assets/hero.png
  • dashboard/src/assets/react.svg
  • dashboard/src/assets/vite.svg
  • … and 62 more

Open the folder on GitHubat commit 9ff72fe

Compare with similar skills

Capy Cortex next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Capy Cortex compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Capy Cortex this skillhappycapy-ai/Happycapy-skills137—~600Automated safety check: PassMIT
Scikit LearnzLanqing/codex-claude-academic-skills4.7k16 repos~3.9kAutomated safety check: PassBSD-3-Clause
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0
Senior Data ScientistRaidriar7170/hermes-skilleval1255 repos~1.4kAutomated safety check: PassMIT
Statistical Data Analysislingzhi227/agent-research-skills386—~886Automated safety check: PassNone
Time Series Analytics Useropen-edge-platform/edge-ai-libraries169—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 16 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 9 days ago
    Data & AnalyticsAuto-check passed
  • Senior Data Scientist

    Raidriar7170/hermes-skilleval

    World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics.

    125 GitHub starsUsed in 5 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Statistical Data Analysis

    lingzhi227/agent-research-skills

    Writes statistical analysis code for experimental data, runs it through a four-round review, and reports effect sizes, p-values and confidence intervals.

    386 GitHub stars~886 tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Time Series Analytics User

    open-edge-platform/edge-ai-libraries

    Build a new time-series analytics use case on top of the deployed Time Series Analytics microservice — bring it up with Docker Compose (from a repo clone, or by fetching the compose files from…

    169 GitHub stars~3.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Estimate Online Covariance

    microprediction/precise

    Estimate a covariance / correlation / precision matrix incrementally with precise.

    336 GitHub stars~535 tokensUpdated 3 days ago
    Data & AnalyticsAuto-check passed

More from happycapy-ai/Happycapy-skills

All 28 skills in this repo
  • Happycapy Skill Creator

    happycapy-ai/Happycapy-skills

    Automate HappyCapy skill creation by finding and adapting existing skills from anthropics/skills repository.

    137 GitHub stars~627 tokensUpdated 1 mo ago
    Auto-check passed
  • 360 Panorama Viewer

    happycapy-ai/Happycapy-skills

    Build a fully self-contained 360° equirectangular panorama viewer as a single HTML file.

    137 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Generate Image

    happycapy-ai/Happycapy-skills

    Generate and transform images using AI Gateway API. An agent skill from happycapy-ai/Happycapy-skills.

    137 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check: notes
  • LLM Council

    happycapy-ai/Happycapy-skills

    Multi-model LLM Council with live dashboard. An agent skill from happycapy-ai/Happycapy-skills.

    137 GitHub stars~581 tokensUpdated 1 mo ago
    Auto-check passed
  • PPTX

    happycapy-ai/Happycapy-skills

    Create polished PowerPoint (.pptx) presentations directly from a topic or content description.

    137 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • World Class Carousel

    happycapy-ai/Happycapy-skills

    Generate world-class Instagram carousel content on any topic.

    137 GitHub stars~16k tokensUpdated 1 mo ago
    Auto-check: notes

Works with

Questions about Capy Cortex

What does Capy Cortex do?

Autonomous learning system - learns from mistakes, reflects on sessions, and gets smarter over time. Capy Cortex is an agent skill from happycapy-ai/Happycapy-skills. Autonomous learning system - learns from mistakes, reflects on sessions, and gets smarter over time.

When should I use Capy Cortex?

Capy Cortex fits situations like: data & Analytics work in your project.

How do I install Capy Cortex in Claude Code?

Run `npx skills add happycapy-ai/Happycapy-skills --skill capy-cortex -a claude-code`. Or copy the skill folder (skills/capy-cortex in happycapy-ai/Happycapy-skills) into .claude/skills/capy-cortex in your project. Claude Code loads it when a task matches its description.

How do I install Capy Cortex in Codex?

Run `npx skills add happycapy-ai/Happycapy-skills --skill capy-cortex -a codex`. Or copy the skill folder (skills/capy-cortex in happycapy-ai/Happycapy-skills) into .agents/skills/capy-cortex in your project. Codex loads it when a task matches its description.

Can I use Capy Cortex in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add happycapy-ai/Happycapy-skills --skill capy-cortex -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/capy-cortex, .gemini/skills/capy-cortex, .github/skills/capy-cortex and .opencode/skills/capy-cortex in your project.

What does Capy Cortex need to run?

Going by SKILL.md and its folder, Capy Cortex needs Python and JavaScript for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3; Node.js.

Does Capy Cortex access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Capy Cortex safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Capy Cortex use?

Capy Cortex is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Capy Cortex use?

About 600 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Capy Cortex?

Skills that share tags, products or a category with Capy Cortex: Scikit Learn (zLanqing/codex-claude-academic-skills, 4.7k stars), TimesFM Forecasting (google-research/timesfm, 34k stars), Senior Data Scientist (Raidriar7170/hermes-skilleval, 125 stars) and Statistical Data Analysis (lingzhi227/agent-research-skills, 386 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Capy Cortex?

happycapy-ai (a GitHub user) maintains it in happycapy-ai/Happycapy-skills, which has 137 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on September 3, 2026.

Source: happycapy-ai/Happycapy-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.