claude-code-extensions
v0.2.18
Published
Modular, opt-in patches for @anthropic-ai/claude-code applied at runtime via AST transformation
Maintainers
Readme
cx — Claude Code Extensions
The missing feature flags for Claude Code. Run cx instead of claude to get a real message queue, always-visible context usage, auto-named chats, quiet mode, and 25+ other toggles. Your claude install stays untouched.
Why cx?
Claude Code is great. But some things can't be configured with settings alone:
- Real message queue — Claude Code's default Enter steers mid-response, injecting your message into the current turn.
Ctrl+Qinstead buffers it as a true queued message that runs only after the current turn finishes. - Persistent max effort — Claude resets effort level every session. cx saves "max" to settings so you don't have to
/modelit back every time. - See your pasted text — Voice dictation and large pastes get collapsed into
[Pasted text #N]which hides what you actually said.cxshows it inline so you can verify what was sent. - No attribution — No more
Co-authored-by: Claudein your commits and PRs. - Swap Enter / Option+Enter — Enter inserts a newline, Option+Enter submits. Essential if you're on SSH, a non-English keyboard, or just prefer multiline-first input.
- Context usage, always visible — Percentage in the footer from message one, not just when you're about to run out.
- Auto-named chats — Your first message gets turned into a real title, so
/resumeand your terminal tab show something useful instead of a wall of "Untitled". No/renamerequired. - Remote control on by default — Every new window joins Remote Control automatically. No more realizing ten minutes in that you forgot to toggle it on.
- Auto theme — First-run default is
autoinstead of dark, so Claude matches your terminal background out of the box. Flip to light at 9am and the TUI follows (#2990). - Delete sessions from
/resume—Opt+Don a focused session stages a confirm; secondOpt+Dwipes the transcript and its sidecar state. No more dropping to the shell to prune old sessions (#13514). - Quiet mode — No spinner tips, no feedback surveys, no npm-to-native-installer nag.
19 patches total, 17 enabled by default. Toggle any combination on or off.
Install
npm install -g claude-code-extensionsRequires Claude Code installed globally (npm i -g @anthropic-ai/claude-code).
Quick start
cx # launch patched Claude Code
cx-setup # interactive TUI to toggle patches on/offOn first run, cx opens the setup TUI automatically. After that, just run cx — it caches the patched bundle and only re-transforms when patches change or Claude Code updates.
All claude arguments pass through: cx --model sonnet -p "hello" works exactly like claude --model sonnet -p "hello".
Patches
| Patch | Description | Default |
|---|---|:---:|
| queue | Ctrl+Q true message queue — buffer instructions to run after the current turn (vs. Enter, which steers mid-response) | on |
| always-show-thinking | Show thinking block content inline | on |
| show-file-in-collapsed-read | Show file paths in collapsed tool display | on |
| disable-paste-collapse | Show pasted text inline instead of collapsing | on |
| persist-max-effort | Save "max" effort to settings so it survives restarts | on |
| reload | Ctrl+X Ctrl+R hot reload — re-applies patches, keeps conversation | on |
| no-tips | Hide spinner tips | on |
| no-feedback | Remove feedback survey prompts | on |
| no-npm-warning | Suppress the npm-to-native-installer nag | on |
| no-attribution | Strip Claude Code attribution from commits and PRs | on |
| disable-telemetry | Strip Datadog and analytics calls | on |
| random-clawd | Randomize the Clawd mascot color on startup | on |
| cx-badge | Show a persistent "cx" indicator in the prompt footer | on |
| cx-resume-commands | Show cx instead of claude in resume hints | on |
| cd-command | /cd <path> — change working directory for bash commands | on |
| auto-detect-theme | Default theme to auto so it matches your terminal background on first run | on |
| delete-sessions | Opt+D in /resume deletes the focused session (second Opt+D confirms) | on |
| swap-enter-submit | Enter inserts newline, Option+Enter submits | off |
| simple-spinner | Replace spinner verb cycling with static "working" | off |
Hot reload
While Claude is running, type:
! cx reloador press Ctrl+X Ctrl+R. The session restarts with fresh patches applied and your conversation resumes via --continue.
How it works
cxlocates your global@anthropic-ai/claude-code/cli.js- Parses the ~4MB minified bundle into an AST with acorn
- Each enabled patch finds its target via structural queries and splices in changes
- The patched source is cached, so subsequent launches are instant
cxspawns Node on the cached bundle with your original arguments
Patches are pure AST transforms. They don't monkey-patch at runtime, don't wrap modules, and don't touch the original file on disk.
Contributing
See CONTRIBUTING.md for development setup, patch authoring guide, and project structure.
