Claude Modsunofficial directory

Context & memory·terminal·MIT

cs

Rotate and wrap keys above the prompt from 40% context, forced rotation at 80%. Needs cs.

Generic Claude Mods cover for the cs mod, a mod that ships without screenshots

The cs mod puts a 1: rotate this conversation button above the Claude Code prompt once the context window passes 40%, and from 80% presses it for you. It ships with cs, a session manager for Claude Code that gives each task a persistent, self-documenting workspace and lets a heavy conversation hand off to a fresh one. Until release 2026.10.1 it was called cs-rotate; it now lives in mods/cs of the repository. Outside a cs session it draws nothing.

What it does

  • Rotate key. From 40% context, 1 runs /rotate, the cs skill that writes a handoff with the parent conversation id, the purpose and a continuation plan to .cs/handoffs/ and arms it. Once a handoff is armed the band reads 1: /clear and continue from the handoff and the press runs the /clear itself; cs’s SessionStart hook then starts the fresh conversation from the handoff without loading the old transcript. CS_ROTATE_BUTTON_CTX=60 moves the threshold.
  • Wrap key. Beside it, 2: wrap up this session runs /wrap, the end-of-session pass that distills memory and replaces the summary. It costs two Opus passes, so 2 opens a confirmation dialog first, and the key hides once a wrap has finished until the next turn you start.
  • Forced rotation. When a turn ends at or past 80% context the mod runs /rotate on its own, once per conversation, then counts down 20 seconds to the /clear: 1 goes now, any prompt stops it. The first countdown of a session also opens a Handoff pane beside the band with the handoff’s next step, so the twenty seconds are spent reading what the new conversation will do. CS_ROTATE_FORCE_CTX=<percent> moves the threshold and CS_ROTATE_FORCE_CTX=off turns it off.
  • /queue. /queue <task> adds a task to the session’s walk-away queue even mid-turn; /queue alone lists it and offers to start, defer or compact first.

cs already nudges you to rotate at 65% through a Stop hook. The button appears earlier so you pick the moment, and the forced rotation sits above the nudge and below Claude Code’s own auto-compact, so the handoff is written while the conversation is still whole.

Install

Needs Claude Code 2.1.287 or later and cs, which runs on macOS and Linux (Windows only inside WSL2). The author does not state a minimum Claude Code version.

bash -c "$(curl -fsSL https://raw.githubusercontent.com/hex/claude-sessions/main/install.sh)"

The installer deploys the mod to ~/.claude/skills/cs/ together with the cs hooks and skills, and a second mod, cs-update, which opens the release notes of a pending cs update in a pane once per launch. There is no marketplace and nothing to install separately. Launch a session with cs <name> and the band is armed. CS_NO_FUNCTION_HOOKS=1 launches without both mods.

How it works

The module hooks ui.render for the band and turn.start, turn.complete and prompt.submit to know when a turn runs, when one ended past the threshold and when a prompt should stop a countdown. On each render it reads the context percentage from the engine’s session usage and draws the keys past the threshold, unless a turn is running or a survey owns the band. It also checks that the session id matches the claude_session_id recorded in .cs/local/state, so only the conversation cs launched gets the keys, not a teammate or a second Claude opened in the same folder. When the plugin loads it writes a timestamp to .cs/local/cs.heartbeat, which cs -doctor reads to report whether the mod ran.

The forced rotation is one attempt per conversation, recorded in .cs/local/cs.forced; a conversation born of a /clear that already sits past the threshold is never forced, so a large CLAUDE.md cannot start a rotation loop. /queue runs the cs binary through the engine’s process call, by the path the launch exports in CS_BIN. No network calls and no tokens of its own: the keys run slash commands, and the only prompt the mod ever submits is the one that starts a queue you asked it to start.

Limitations

  • Nothing appears without cs: the mod needs a .cs/local directory in the working directory, and .cs/local/disabled opts that directory out.
  • The countdown is module state: a plugin reload drops a running count, and the conversation the mod meets after a reload or a /resume is not judged against the loop guard.
  • The Handoff pane needs a terminal of 144 columns, 110 once you have opened a pane yourself; narrower, the band’s count is all there is.
  • Terminal only. cs does not support native Windows or Git Bash.

Similar Claude Mods

The whole directory →