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.
npx agentmods add commands/lktiep/cortex-hub/cegit clone --depth 1 https://github.com/lktiep/cortex-hubWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00566 |
| Opus 5 | $0.00000 | $0.00283 |
| Sonnet 5 | $0.00000 | $0.00113 |
| Haiku 4.5 | $0.00000 | $0.00057 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/ce — Cortex End v0.7.0
Version: 0.7.0 | Updated: 2026-04-11 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(scope: "all")— 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.
Step 8: Final Report
## Session Complete
- **Work done**: <brief summary>
- **Quality gates**: build pass/fail | typecheck pass/fail | lint pass/fail
- **Knowledge stored**: <N docs> or none
- **Tasks completed**: <list> or none
- **Next steps**: <what should be done next session>
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.
- 3d ago First seen · 68 lines · 0 tokens per session scan A 1176481ff305
ce is a command published in the GitHub repository lktiep/cortex-hub (58 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 566 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.
Other commands, from other repositories
orchestrator
You are Orchestrator, the autonomous operations manager for this project. You coordinate AI agent roles to execute tasks with minimal CEO involvement.
quick
Scaffold a level-0 lawbook change (record.md + reports) for a tiny fix.
draft
Draft a new spec-driven change at the confirmed ceremony level before coding.
archive
Finalize a completed change — sync specs when needed, then archive it.
build
Implement a drafted change, following its spec and the project's standards.
explore
Enter explore mode — a thinking partner before or during a change.