cs

A session-start workflow for the Cortex project that recalls earlier context, checks for recent changes and conflicts, and picks up available tasks before development work begins. It uses the project's stored session and memory records.

In plain words
What is it for?
Use it at the beginning of a development session to restore context, check repository changes, identify conflicts, and resume tasks.
Why use it?
It reduces the chance of losing prior decisions, overwriting other work, or starting from an outdated project state. The workflow requires its listed startup steps to finish before user work continues.

Command for Claude Code

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 commands/lktiep/cortex-hub/cs
Clone the repo
git clone --depth 1 https://github.com/lktiep/cortex-hub

Made for: Claude Code.

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 924 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.00000 $0.00924
Opus 5 $0.00000 $0.00462
Sonnet 5 $0.00000 $0.00185
Haiku 4.5 $0.00000 $0.00092

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

Security

Grade A, and why

cs 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 2d 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/cs.md · 95 lines

How it starts

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

/cs — Cortex Start v0.7.0

Version: 0.7.0 | Updated: 2026-04-11 Changelog: v0.7.0 — unified versioning, removed STATE.md, streamlined tool guidance, auto-memory safety net Changelog: v2.1 — added plan quality gate before implementation Changelog: v2.0 — added task pickup, detect changes, recipe health, workflow recipes, versioning

Run ALL steps IN ORDER. Do NOT proceed to user work until Step 7 completes.

Step 1: Session Start

Call cortex_session_start:

repo: "https://github.com/lktiep/cortex-hub.git"
mode: "development"
agentId: "claude-code"
ide: "<your IDE>"
branch: "<current git branch>"

Save session_id and projectId from the response. If recentChanges.count > 0 → warn user and git pull before any edits.

Step 2: Recall Context (parallel)

Call BOTH in parallel:

  • cortex_knowledge_search(query: "session summary progress next session")
  • cortex_memory_search(query: "session context decisions lessons", agentId: "claude-code")

These return what was done last session, key decisions, and next steps.

Step 3: Conflict Check

cortex_changes(agentId: "claude-code", projectId: "<from step 1>")

Step 4: Task Pickup (Optional)

If cortex_task_pickup tool is available: cortex_task_pickup() — check for Conductor tasks assigned to you. If tasks exist → list them. Ask user which to work on, or continue with their request. If the tool is not available (e.g. in solo dev mode), skip this step.

Step 5: Working State Check

Run git status. If uncommitted changes:

  • cortex_detect_changes(scope: "all") — analyze risk level
  • Report affected symbols and blast radius

Step 6: Situational Summary

Print a concise report:

## Session Init Complete
- **Last session**: <what was done, from memory/knowledge recall>
- **Pending tasks**: <N tasks> or none
- **Unseen changes**: <from other agents> or clean
- **Working state**: clean / <N uncommitted files, risk level>
- **Key context**: <relevant decisions or lessons>
- Ready to start work.

Read the full file on GitHub · 95 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. 2d ago First seen · 95 lines · 0 tokens per session scan A 4bc850db1ff1

Subscribe to this mod's changes

cs 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 924 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.