Skip to main content

Context orchestration CLI with curated agents, rules, skills, and management tools for Claude Code

Project description

Cortex — AI Development Framework

Tests Type Check PyPI License

Context orchestration for Claude Code, Codex, and Gemini — curated agents, skills, rules, hooks, and a Python CLI for management.

Documentation · Install · Quick Start

Why Cortex

  • Curated context assets for Claude Code (agents/, skills/, rules/, hooks/)
  • A Python CLI (cortex) for activation, validation, TUI workflows, diagnostics, and exports
  • Built-in support for MCP docs, memory capture, and review gates

Feature Highlights

Original Cortex Skills

Cortex includes four foundational skills that drive quality across development workflows:

agent-loops — Structured Implementation & Verification

  • Skill file: skills/agent-loops/SKILL.md
  • Purpose: Multi-phase implementation loop with built-in verification, audit, and independent review gates
  • When to use: Any feature implementation, bug fix, or refactoring task
  • Workflow: Plan → Implement → Verify → Independent review/audit with same-model shell-outs kept for last resort
  • CLI integration: Complements cortex review command:
cortex review --dry-run                    # Preview review gates
cortex review -c feature -c debug          # Full review workflow

test-review — Quality Assurance & Coverage Analysis

  • Skill file: skills/test-review/SKILL.md
  • Purpose: Audit test quality and coverage across modules
  • When to use: After test suite changes, coverage gaps, or brittle tests
  • Features: Identifies gaps, suggests improvements, validates test patterns

doc-claim-validator — Documentation Accuracy Auditing

  • Skill file: skills/doc-claim-validator/SKILL.md
  • Purpose: Validates that documentation claims match codebase reality
  • When to use: Before releases, after major refactors, periodic audits
  • Features: Extracts verifiable assertions (file paths, code patterns), checks against actual code

doc-maintenance — Documentation Lifecycle Management

  • Skill file: skills/doc-maintenance/SKILL.md
  • Purpose: Systematic documentation audit and maintenance
  • When to use: Documentation may be stale, outdated references, inconsistent structure
  • Features: Identifies orphaned docs, updates cross-references, improves navigation

Skills command suite

  • Discover and inspect skills:
cortex skills list
cortex skills info agent-loops
cortex skills recommend
  • Collect feedback and ratings:
cortex skills feedback agent-loops helpful --comment "High signal loop guidance"
cortex skills rate agent-loops --stars 5 --review "Reliable workflow"

Skill Recommendations (automatic)

Skills are suggested automatically via a two-layer pipeline:

  • Layer 1 (hook): Keyword matching against skill-rules.json on every prompt (~50 ms)
  • Layer 2 (recommender): Semantic, rule-based, agent-based, and historical strategies via SkillRecommender (~100-200 ms, optional)

Results from both layers are merged and deduplicated — keyword matches first, then richer recommendations. The hook gracefully falls back to Layer 1 if the full package isn't installed.

The TUI auto-starts the watch daemon on launch for continuous background recommendations. See Skill Recommendation Engine for the full architecture.

AI command suite

  • Recommendations and auto-activation:
cortex ai recommend
cortex ai auto-activate
  • Continuous watch mode (auto-started by TUI):
cortex ai watch --interval 2.0 --threshold 0.7 --dir .
  • Learning ingestion and export:
cortex ai ingest-review .agents/reviews/latest.md
cortex ai export --output ai-recommendations.json

Repository Layout

Path Purpose
agents/ Agent definitions used by Claude Code
skills/ Reusable skill modules with metadata and guidance
rules/ Rule modules for behavior and quality guardrails
hooks/ Hook definitions and validation assets
commands/ Slash-command style command assets
claude_ctx_py/ Python CLI implementation
docs/ Documentation source for guides/reference
schemas/ Validation schemas
tests/ Unit and integration tests

Installation (pip / pipx)

Install released CLI

# Recommended
pipx install claude-cortex

# Alternative
python3 -m pip install claude-cortex

Local development install

git clone https://github.com/NickCrew/claude-cortex.git
cd claude-cortex
python3 -m pip install -e ".[dev]"

Quick Start

# Link bundled assets into ~/.claude
cortex install link

# Optional post-install helpers (completions + manpages)
cortex install post

# Check current state
cortex status

# Launch TUI
cortex tui

CLI Arguments and Commands

Current global arguments:

  • --scope {auto,project,global}
  • --cortex-root PATH (alias: --plugin-root)
  • --skip-wizard (alias: --no-init)

Usage pattern:

cortex [--scope {auto,project,global}] [--cortex-root PATH] [--skip-wizard] <command> [<args>]

Documented command groups in this README:

  • agent
  • rules
  • hooks
  • skills
  • mcp
  • statusline
  • tui
  • ai
  • export
  • install
  • memory
  • plan
  • docs
  • dev
  • file
  • uninstall
  • status
  • review

Run help anytime:

cortex --help
cortex <command> --help

Common Workflows

Using Original Cortex Skills

Feature implementation with agent-loops:

# Start implementation with built-in verification gates
# Reviews prefer Claude, keep same-model shell-outs last, and preserve artifacts
cortex review --dry-run                    # Preview what will be reviewed
cortex review -c feature -c debug          # Run full review workflow

Quality assurance with test-review:

# Audit test quality and identify coverage gaps
cortex skills info test-review             # View skill details
# Then invoke: /test-review in Claude Code to audit your test suite

Documentation accuracy with doc-claim-validator:

# Validate documentation matches codebase reality
cortex skills info doc-claim-validator     # View skill details
# Then invoke: /doc-claim-validator in Claude Code to audit docs

Documentation maintenance with doc-maintenance:

# Perform systematic documentation audit
cortex skills info doc-maintenance         # View skill details
# Then invoke: /doc-maintenance in Claude Code for maintenance workflow

Agent + skill management

cortex agent list
cortex agent status
cortex skills list
cortex skills feedback agent-loops helpful --comment "High signal loop guidance"
cortex skills rate agent-loops --stars 5 --review "Reliable workflow"

MCP diagnostics

cortex mcp list
cortex mcp diagnose

AI recommendations

cortex ai recommend
cortex ai auto-activate
cortex ai watch

Development

Preferred local commands

command -v committer
command -v tx
  • Use committer for atomic commits
  • Use tx for local workflow/service orchestration

Build, test, quality

just install
just test
just lint
just type-check

Additional useful targets:

just test-unit
just test-integration
just test-cov
just docs
just docs-build
just build

Docs preview

cd docs
bundle exec jekyll serve --livereload

Documentation Index

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_cortex-1.2.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_cortex-1.2.0-py3-none-any.whl (379.4 kB view details)

Uploaded Python 3

File details

Details for the file claude_cortex-1.2.0.tar.gz.

File metadata

  • Download URL: claude_cortex-1.2.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_cortex-1.2.0.tar.gz
Algorithm Hash digest
SHA256 8b928e541f116079e97a752a5d47974742b787de14435b3e261dc11e0acf937d
MD5 64fa2e0dd1270e09322ef099ef6d6137
BLAKE2b-256 dc80513defacc469c270dd6bd213871e38f02545858000b39b244414dae52391

See more details on using hashes here.

File details

Details for the file claude_cortex-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: claude_cortex-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 379.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_cortex-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7625c5cc498f3219bda11978e77934b40c603b0a715f36fea0a21a29b551498c
MD5 03141e73867252e984bde2a13617baa5
BLAKE2b-256 be868fb3206da640a9fe778d377d694f0cc78df6c9d9cbe222708e62dfd0cd78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page