cortex

cortex is a skill for Claude Code, Codex from Sh3rd3n/megazord. It costs 20 tokens per session (2,022 once invoked), scanned A, original, MIT.

An automatic reasoning protocol classifies each task as clear, complicated, complex, or chaotic, then chooses a matching way to think through it. Cynefin is a framework for making that classification.

In plain words
What is it for?
Choosing a reasoning method before carrying out tasks when this feature is enabled in the configuration.
Why use it?
It helps the executor adjust its approach to the task's size, uncertainty, affected files, and existing patterns without requiring a manual command.

Skill for Claude CodeCodex

Part of the mz plugin — 16 skills, 16 commands, 6 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sh3rd3n/megazord/cortex
Any agent
npx skills add Sh3rd3n/megazord --skill cortex
Clone the repo
git clone --depth 1 https://github.com/Sh3rd3n/megazord

Made for: Claude Code, Codex.

Or install mz, the plugin that ships this one along with the rest of its 16 skills, 16 commands, 6 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cortex

README.md
[![agentmods](https://agentmods.dev/badge/skills/sh3rd3n/megazord/cortex.svg)](https://agentmods.dev/skills/sh3rd3n/megazord/cortex)
Your own site
<a href="https://agentmods.dev/skills/sh3rd3n/megazord/cortex"><img src="https://agentmods.dev/badge/skills/sh3rd3n/megazord/cortex.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,022 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.02022
Opus 5 $0.00010 $0.01011
Sonnet 5 $0.00004 $0.00404
Haiku 4.5 $0.00002 $0.00202

Measured 3d ago against content hash 8997847c6619, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cortex scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cortex/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CORTEX: Adaptive Reasoning Engine

CORTEX classifies every task through Cynefin domains (Clear/Complicated/Complex/Chaotic) and applies appropriate mental models from untools.co. It is a protocol reference consumed by the executor during task execution when cortex_enabled: true.

CORTEX is NOT a manually invocable skill. It activates automatically as part of the executor flow before each task when the config flag is enabled.

Classification Heuristic Matrix

Before every task, assess the domain using these concrete heuristics. Each signal is evaluated independently.

Signal Clear Complicated Complex Chaotic
LOC estimate <50 50-300 >300 or new architecture N/A (broken state)
Files affected 1-2 3-5 6+ or new module structure N/A
New APIs/interfaces 0 1-2 internal External API or new public interface N/A
Module scope Same module 2-3 modules 4+ modules or cross-system N/A
Pattern familiarity Well-known, done before 2+ valid patterns to choose from No clear pattern, novel territory N/A
Existing test coverage Tests exist, minor modification Tests need modification No existing test patterns Tests failing on unrelated code
Side effects None Localized, predictable Distributed, hard to trace Cascading failures
External dependencies None new Internal packages External services, 3rd-party APIs External service down/corrupt

Classification Algorithm

  1. Evaluate each signal independently
  2. Task domain = HIGHEST domain any signal triggers
  3. Chaotic ONLY triggered by crisis signals (build broken, tests failing on unrelated code, external service down, data corruption, security incident) -- never by quantitative thresholds alone
  4. When signals conflict, explain the override: CORTEX: Complicated -- 30 LOC but new external API integration elevates from Clear

Classification Output Format

Read the full file on GitHub · 179 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 179 lines · 20 tokens per session scan A 8997847c6619

Subscribe to this mod's changes

cortex is a skill published in the GitHub repository Sh3rd3n/megazord (3 stars, last pushed 6mo ago), licensed MIT. It adds 20 tokens to every session and 2,022 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

new-skill

Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…

hyhmrright/brooks-lint · 145 tokens

pm

Project manager for GitHub issues: brainstorm design approaches, create structured issues optimized for LLM agent teams, triage and recommend what to work on next, audit and clean up stale issues, or deep-validate a single issue against the codebase. Triggers: create issue, plan work, new task, project manager, write…

rube-de/cc-skills · 98 tokens

brainstorm

Explores a codebase, researches the problem space, and produces an approved design specification before any code is written. Use when the user wants to create a new feature, add significant functionality, redesign a subsystem, or build something that touches multiple parts of the project.

greglas75/zuvo · 56 tokens

a11y-audit

Dedicated WCAG 2.2 AA/AAA accessibility audit across 10 dimensions (A1-A10) covering semantic HTML, keyboard navigation, ARIA patterns, color contrast, forms, images/media, responsive/zoom, motion/animation, reading/content, and legal compliance. Goes far beyond surface-level design-review checks with deep…

greglas75/zuvo · 147 tokens

performance-audit

Full-stack performance health check across 12 dimensions. Rendering, bundles, assets, API/network, algorithms, memory, database, caching, Web Vitals, backend runtime, concurrency, and framework-specific pathologies. Evidence-based Impact Models with confidence tiers and a prioritized optimization roadmap. Switches…

greglas75/zuvo · 90 tokens

add

Register a deferred decision in the debt registry. Trigger by judgment, not a marker scan, whenever a future reader would ask "why this way?": an unmade decision, stub, loosened type, bypassed check, swallowed error, a default picked "for now", or a TODO/FIXME/HACK/XXX marker. Trigger immediately whenever you defer…

bcanfield/agentic-tech-debt · 110 tokens