cortex-hub: Command for Claude Code

.claude/commands/ce.md

ce is a command for Claude Code from lktiep/cortex-hub. It costs 0 tokens per session (623 once invoked), scanned A, original, MIT.

A session-closing command that checks code changes, runs the project's build, type checks, and lint checks, then records the results. It can also complete tracked tasks and save useful knowledge when the related tools are available.

In plain words
What is it for?
Use it before ending a coding session to inspect uncommitted changes, run quality checks, report the outcome, complete in-progress tasks, and capture reusable notes.
Why use it?
It gives the session a consistent final checklist, so unfinished work, failed checks, and unrecorded results are less likely to be missed.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is lktiep/cortex-hub's own configuration. It tells Claude Code how to work on cortex-hub itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cortex-hub configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lktiep/cortex-hub. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lktiep/cortex-hub/master/.claude/commands/ce.md
Clone the repo
git clone --depth 1 https://github.com/lktiep/cortex-hub

Made for: Claude Code.

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 ce

README.md
[![agentmods](https://agentmods.dev/badge/commands/lktiep/cortex-hub/ce/github.svg)](https://agentmods.dev/commands/lktiep/cortex-hub/ce)
Your own site
<a href="https://agentmods.dev/commands/lktiep/cortex-hub/ce"><img src="https://agentmods.dev/badge/commands/lktiep/cortex-hub/ce/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ce

Your own site · 80×15
<a href="https://agentmods.dev/commands/lktiep/cortex-hub/ce"><img src="https://agentmods.dev/badge/commands/lktiep/cortex-hub/ce.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00623
Opus 5.5 $0.00000 $0.00249
Sonnet 5.5 $0.00000 $0.00125
Haiku 4.5 $0.00000 $0.00062

Measured 24d ago against content hash f15d5737b3f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ce 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 24d 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.

.claude/commands/ce.md · 70 lines

How it starts

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

/ce — Cortex End v0.9.0

Version: 0.9.0 | Updated: 2026-09-28 Changelog: v0.9.0 — version synced with the v0.9.0 release Changelog: v0.8.0 — search-once/read-all-ten ordering from measured retrieval; recall no longer counts as discovery Changelog: v0.7.0 — unified versioning, session_end auto-saves memory, removed STATE.md, streamlined steps Changelog: v2.0 — added detect_changes, tool stats, task completion, recipe capture check

Run ALL steps IN ORDER before ending the session.

Step 1: Pre-commit Check

If uncommitted changes exist:

  • cortex_detect_changes(diff: "<output of git diff HEAD>") — verify blast radius
  • If HIGH risk → warn user before proceeding

Step 2: Quality Gates

pnpm build && pnpm typecheck && pnpm lint

Record pass/fail for each.

Step 3: Quality Report

cortex_quality_report(
  gate_name: "Session Quality",
  passed: <true if all gates pass>,
  score: <0-100>,
  details: "<build/typecheck/lint results>"
)

Step 4: Complete Conductor Tasks (Optional)

If cortex_task_list and cortex_task_update tools are available: cortex_task_list(status: "in_progress") — find tasks worked on this session. For each: cortex_task_update(taskId, status: "completed", result: { summary: "..." }) If the tools are not available, skip this step.

Step 5: Store Knowledge (if applicable)

If this session involved any of these, call cortex_knowledge_store:

  • Bug fix with non-obvious root cause
  • Architecture decision or tradeoff
  • Workflow pattern that worked well
  • Error + solution that others might encounter

Step 6: Store Memory

cortex_memory_store with:

  • What was done this session
  • Key decisions made
  • Context for resuming next session
  • Any user preferences discovered

Step 7: End Session

cortex_session_end(
  sessionId: "<from session_start>",
  summary: "<concise: what was done, what's next>"
)

The backend automatically saves this summary as searchable memory — a safety net even if Step 6 was skipped.

Read the full file on GitHub · 70 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. 24d ago Changed · +2 lines f15d5737b3f5
  2. 1mo ago First seen · 68 lines · 0 tokens per session scan A 1176481ff305

Subscribe to this mod's changes

ce is a command published in the GitHub repository lktiep/cortex-hub (93 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 623 tokens. 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-30.