cs

Reviewed at commit 3ecf53b

cs's in-session mod: the rotate band above the prompt, forced rotation past CS_ROTATE_FORCE_CTX, and the wrap key

Made by
cs
What we checked

Adds keys in sessions started by the cs tool: rotate the conversation, wrap up the session, start the task queue, or clear and continue from a handoff. When a turn ends past 80% context (adjustable or off) it runs /rotate itself and counts down 20 seconds before running /clear; sending a prompt cancels it. Also adds /queue, /cs navigation between your prompts, and progress toasts for /finish.

Review details

Static review of the source at the pinned commit; not run. Delta review of the changes since 14a403c; the rest carries over from the review at that commit. Registers session.start (registers /queue and /cs, writes a heartbeat file in the project's .cs/local when the folder is a cs session), command.run for queue, cs and clear, turn.start, turn.complete, prompt.submit (only cancels the countdown), skill.prompt for finish, ui.render for UserMessage, AbovePrompt, SessionMode, PromptHint and AskUserQuestion, and ui.focus. It acts only in a verified cs session (sessions root check, lead conversation id in .cs/local/state, cs -vet-session). Programs run through $.process.run: the cs binary named by CS_BIN (-queue add/list/start, -features --porcelain, -config list --porcelain, -vet-session, and -config set CS_FILTER_CHAT when the filter-chat key is pressed), tail -c on the conversation transcript when it exceeds 4 MiB, kill -0 <pid> to check a /finish process, and in this version /bin/sh -c 'echo $PPID' (up to 3 times a load) to learn Claude Code's own pid. $.command.run issues /rotate, /clear, /wrap, /finish and /color; $.prompt.submit sends a fixed queue-start line; $.session.compact is used only after a Compact answer. What changed: the keys (rotate, wrap, filter chat, clear countdown) now draw in the footer under the prompt, or inline in the permission notice row, with the band above the prompt keeping the rest; the layout is chosen from the screen width and a status-line width record that cs's status line writes to .cs/local/statusline-width (read through $.fs.read, matched on conversation id and pid, polled every 2 seconds only while it can move the keys). The prompt-bar settings moved from plugin.json userConfig to CS_BAND_PROMPTS, CS_BAND_PROMPT and CS_BAND_BARS (cs settings files or environment), and the config.set hook was removed. The transcript path now also honours CLAUDE_CONFIG_DIR and checks for the session's own .cs/claude-config with $.fs.stat. The rotate, wrap and clear keys and presses now do nothing, with a toast, while a turn runs, and the automatic /clear at zero now waits for no turn, question dialog or survey. Wrap and queue starts still ask for confirmation first; the automatic /rotate and /clear is the announced purpose. Writes are limited to marker files in the project's .cs/local (heartbeat, forced, pressed, wrapped). Environment variables read: CS_BIN, CS_* settings, CS_SESSIONS_ROOT, CS_TRANSCRIPTS_DIR, HOME, XDG_CONFIG_HOME, CLAUDE_CONFIG_DIR. Transcript content stays local. No network calls, no model calls, no eval or dynamic code. The cs program and tips.json (static tip texts, not loaded by code) were not reviewed.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: no
  • Blocks or changes tool calls: no
  • Reads or writes files: yes
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Screenshot of cs
Made this mod? Add a badge to your README

modsforClaude badge for cs

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/cs.svg)](https://modsforclaude.com/mods/cs/)

← All mods