tweakcc-fixed 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -116
- package/dist/{config-BPk-tgR5.mjs → config-9kWDJob2.mjs} +16 -14
- package/dist/{content-Cykld6sg.mjs → content-BptvQWVc.mjs} +1 -1
- package/dist/index.mjs +12 -12
- package/dist/lib/index.d.mts +3 -2
- package/dist/lib/index.mjs +1 -1
- package/dist/{nativeInstallation-C1g_t-UT.mjs → nativeInstallation-CX93n6j5.mjs} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,166 +1,137 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# ⚡ tweakcc-fixed
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
> **This fork is a superset of upstream and no longer merges from it (2026-06-04).** Upstream's `tweakcc` gates system-prompt overrides **off** for native installs and doesn't have this fork's override mechanisms (inline-blob, system-reminders) or extended extractor; we add those and apply system prompts to native installs too. Our extractor names 1007 prompts for CC 2.1.187 under our own per-model override conventions, capturing every model-facing string below the old 500-char floor — including 572 ids absent from Piebald's published extract. A merge would only bring a version label and prompt data we already supersede, so we keep the `upstream` remote as a **fetch-only comparison signal** and extract our own prompts.
|
|
5
|
+
### Customize Claude Code far past its settings menu — themes, prompts, thinking, toolsets, and behavior — patched straight into the installed binary.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| **Target CC versions** | 2.0.98 through **2.1.187** |
|
|
13
|
-
| **Install** | `npx tweakcc-fixed@latest` — published on npm from this repo ([Install](#install)) |
|
|
14
|
-
| **Pairs with** | [skrabe/lobotomized-claude-code](https://github.com/skrabe/lobotomized-claude-code) (per-model overrides) |
|
|
15
|
-
| **Agent guide** | [`skills/showtime/`](./skills/showtime/) — bug-class diagnostics, patch authoring, the version-bump pipeline |
|
|
7
|
+
[](https://www.npmjs.com/package/tweakcc-fixed)
|
|
8
|
+
[](https://www.npmjs.com/package/tweakcc-fixed)
|
|
9
|
+
[](https://github.com/anthropics/claude-code)
|
|
10
|
+
[](#credit--license)
|
|
16
11
|
|
|
17
|
-
|
|
12
|
+
**[Install](#install) · [Customize](#what-you-can-customize) · [The fork](#what-this-fork-adds) · [How it works](#how-it-works)**
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
</div>
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
---
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
Claude Code only exposes so much through its settings. tweakcc reaches the rest: it patches the installed binary directly — the `cli.js`, and the JavaScript baked into the native Bun build — so you can restyle the interface, rewrite the prompts Claude actually runs on, and change how it behaves. You pick what you want from a terminal UI, apply it in one command, and roll it back whenever you like.
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
- **Custom body** → pristine content replaced.
|
|
27
|
-
- **`{{placeholder}}` tokens** → whitelisted JS expressions substituted at apply time.
|
|
20
|
+
This is **tweakcc-fixed**, a fork of [Piebald's tweakcc](https://github.com/Piebald-AI/tweakcc) that keeps everything the original does and pushes further — roughly twice the prompt coverage, a deeper set of patches, and overrides that reach the native install where upstream stops. More on that [below](#what-this-fork-adds).
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
```console
|
|
23
|
+
$ npx -y tweakcc-fixed@latest --apply
|
|
24
|
+
✓ Theme, spinner, thinking verbs, statusline
|
|
25
|
+
✓ System Prompt: Doing tasks (override) 92 fewer chars
|
|
26
|
+
✓ Tool Description: Bash (override) 4 fewer chars
|
|
27
|
+
✓ Toolset + subagent model selection
|
|
28
|
+
… patches applied · backup written
|
|
29
|
+
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
## Install
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
```bash
|
|
34
|
+
npx -y tweakcc-fixed@latest # interactive TUI — toggle patches, edit prompts
|
|
35
|
+
npx -y tweakcc-fixed@latest --apply # apply everything you've enabled
|
|
36
|
+
npx -y tweakcc-fixed@latest --restore # revert from the backup
|
|
37
|
+
```
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
Nothing to clone or build. Prompt data is pulled from this repo at runtime, so a new Claude Code release works the moment its version bump lands here. Updating Claude Code overwrites the patches, so you just re-run `--apply` — your configuration in `~/.tweakcc/config.json` is untouched either way.
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
> Versions ≤ 1.0.5 on npm came from a different, unmaintained fork. 2.0.0 onward is this one.
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
## What you can customize
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
Everything lives behind one terminal UI: toggle a patch, edit a prompt, apply.
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
The surface is wide. You can restyle the **look** — themes, the wording of the thinking verbs, the spinner's symbols and speed, the input border, the statusline, table rendering, session titles. You can rewrite the **prompts** — every system prompt, tool description, and `<system-reminder>` is plain markdown you can edit, so you change what Claude is told, not just how it's dressed. You can retune the **tooling** — toolsets, subagent model selection, input-pattern highlighters, file-read limits, MCP startup. And you can adjust **behavior** — reasoning-effort defaults, memory handling, session naming, and a good deal more.
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
It works the same on npm and native (Bun-compiled) installs, every change is a toggle, and `--restore` puts the original binary back.
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
## What this fork adds
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
tweakcc-fixed is a strict superset of the original: everything above still applies, on the same latest Claude Code target. What it adds is reach.
|
|
50
54
|
|
|
51
|
-
|
|
55
|
+
The biggest difference is coverage. Its extractor pulls roughly twice the prompt surface upstream does — every model-facing string, including the short ones the base skips — which is what makes serious prompt editing possible in the first place.
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
| | tweakcc-fixed | upstream |
|
|
58
|
+
| ---------------------------- | :-----------: | :-------: |
|
|
59
|
+
| Prompt sites (CC 2.1.190) | **1,106** | 527 |
|
|
60
|
+
| Unique prompt IDs | **1,031** | 527 |
|
|
61
|
+
| Patches | **58** | 45 |
|
|
62
|
+
| Overrides on native installs | **yes** | gated off |
|
|
54
63
|
|
|
55
|
-
|
|
64
|
+
That reach shows up in a few mechanisms the base doesn't have. The `<system-reminder>` injections that fire per turn — and never surface as named prompts — become editable: blank one out to drop it, or rewrite it. Each connected MCP server's instruction block can be dropped or rewritten the same way. And where upstream gates system-prompt overrides off for native installs, this fork applies them. It pairs with [lobotomized-claude-code](https://github.com/skrabe/lobotomized-claude-code), a set of per-model override packs tuned against exactly this extraction.
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
The extra patches cluster around a few themes: **memory** (a dream-mode consolidation pass, leaner memory types), **reasoning** (Opus defaulting to max effort, plus the experimental complexity router), **search** (the experimental fff backend), and a run of **correctness fixes** — an honest rewind-summary header, a "summarize from here" that actually starts at the rewind point, quieter empty system-reminders, and more.
|
|
58
67
|
|
|
59
|
-
|
|
60
|
-
| ------------------------------------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
61
|
-
| [#601](https://github.com/Piebald-AI/tweakcc/pull/601) | [@signadou](https://github.com/signadou) | Handle `WASMagic` import errors gracefully during native-installation detection |
|
|
62
|
-
| [#646](https://github.com/Piebald-AI/tweakcc/pull/646) | [@sla-te](https://github.com/sla-te) | Support React Compiler output / async refactoring introduced in CC 2.1.85–2.1.88 |
|
|
63
|
-
| [#655](https://github.com/Piebald-AI/tweakcc/pull/655) | [@LeonFedotov](https://github.com/LeonFedotov) | Fall back to npm source when Bun-bytecode extraction yields non-patchable JS; thread `clearBytecode` through repack |
|
|
64
|
-
| [#664](https://github.com/Piebald-AI/tweakcc/pull/664) | [@mike1858](https://github.com/mike1858) | Fix two patches that broke `cli.js` on literal `\"` sequences in prompt content (#660) |
|
|
68
|
+
Two of those are worth calling out, and both ship off by default. **fff-first Bash search** routes Claude's grep, find, and rg through [fff](https://github.com/dmtrKovalenko/fff) and a warm-index daemon, so results come back ranked; it serves a query only when the result is provably identical to the real tool and falls back to the embedded ripgrep/ugrep on anything it can't match exactly, so correctness never rides on it. **The complexity router** reads how hard each task is and routes reasoning effort to match — routine work runs low, the hardest runs max — without switching models or churning the prompt cache, and an explicit `/effort` or `CLAUDE_CODE_EFFORT_LEVEL` always wins.
|
|
65
69
|
|
|
66
|
-
|
|
70
|
+
<details>
|
|
71
|
+
<summary>Every patch the fork adds</summary>
|
|
67
72
|
|
|
68
|
-
|
|
73
|
+
<br>
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
**Memory & context**
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
- `dream-mode` — `/dream` plus automatic memory consolidation
|
|
78
|
+
- `lean-memory-types` — a trimmed memory-type taxonomy
|
|
79
|
+
- `claudemd-context-once-per-conversation` — inject CLAUDE.md and context once per conversation, not every turn
|
|
73
80
|
|
|
74
|
-
|
|
81
|
+
**Reasoning**
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
- `max-effort-default` — Opus defaults to max reasoning effort
|
|
84
|
+
- `complexity-router` — route reasoning effort by task difficulty _(experimental)_
|
|
77
85
|
|
|
78
|
-
|
|
86
|
+
**Search**
|
|
79
87
|
|
|
80
|
-
|
|
88
|
+
- `swap-ripgrep-for-fff` — fff-backed grep, find, and rg _(experimental)_
|
|
81
89
|
|
|
82
|
-
|
|
83
|
-
npx tweakcc-fixed@latest # interactive UI
|
|
84
|
-
npx tweakcc-fixed@latest --apply # apply customizations from ~/.tweakcc/config.json
|
|
85
|
-
```
|
|
90
|
+
**Correctness & noise**
|
|
86
91
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
- `fix-rewind-summary-header` — an honest rewind / compaction summary header
|
|
93
|
+
- `fix-summarize-from-here` — "summarize from here" starts at the rewind point, not the top
|
|
94
|
+
- `strip-empty-system-reminders` — drop the empty `<system-reminder>` blocks left after empty tool output
|
|
95
|
+
- `read-default-lines` — an env-gated cap on the default `Read` line count
|
|
96
|
+
- `suppress-deferred-tools` — drop the deferred-tools announcement
|
|
91
97
|
|
|
92
|
-
|
|
93
|
-
> Package versions **≤ 1.0.5** were published from BenIsLegit's earlier,
|
|
94
|
-
> now-unmaintained fork; **2.0.0+** is published from this repo and supersedes
|
|
95
|
-
> them. (`npx tweakcc` is upstream Piebald, which doesn't apply system-prompt
|
|
96
|
-
> overrides to native installs.)
|
|
98
|
+
**Models & prompts**
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
- `autonomous-operation-all-models` — apply the Fable/Mythos autonomous prompt set to every model
|
|
101
|
+
- `auto-mode-classifier-model` — pin the auto-mode safety classifier to a cheaper model
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
git clone https://github.com/skrabe/tweakcc-fixed ~/dev/tweakcc-fixed
|
|
102
|
-
cd ~/dev/tweakcc-fixed && pnpm install && pnpm build
|
|
103
|
-
node dist/index.mjs --apply
|
|
104
|
-
```
|
|
103
|
+
</details>
|
|
105
104
|
|
|
106
105
|
## How it works
|
|
107
106
|
|
|
108
|
-
|
|
107
|
+
Two kinds of edit, both driven by your config in `~/.tweakcc/config.json`:
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
helpers,
|
|
123
|
-
} from 'tweakcc-fixed';
|
|
124
|
-
|
|
125
|
-
// Find Claude Code (npm or native Bun install)
|
|
126
|
-
const installation = await tryDetectInstallation();
|
|
127
|
-
|
|
128
|
-
// Back up before touching anything
|
|
129
|
-
await backupFile(installation.path, './cli.js.bak');
|
|
130
|
-
|
|
131
|
-
// Read the JS (extracted from the native binary when needed)
|
|
132
|
-
const { content, clearBytecode } = await readContent(installation);
|
|
133
|
-
|
|
134
|
-
// Patch it — `helpers` finds minified identifiers in the bundle
|
|
135
|
-
const reactVar = helpers.getReactVar(content);
|
|
136
|
-
const patched = content.replace(/…/, '…');
|
|
137
|
-
|
|
138
|
-
// Write it back. For native installs this repacks the binary; `clearBytecode`
|
|
139
|
-
// MUST be threaded through from readContent so a stale Bun bytecode cache
|
|
140
|
-
// doesn't keep running the old code.
|
|
141
|
-
await writeContent(installation, patched, clearBytecode);
|
|
109
|
+
```
|
|
110
|
+
┌──────────────────────┐ ┌────────────────────────────┐
|
|
111
|
+
│ 1. code patches │ │ 2. prompt overrides │
|
|
112
|
+
│ regex-anchored │ │ swap embedded prompt text │
|
|
113
|
+
│ splices of JS │ │ for your markdown │
|
|
114
|
+
└──────────┬───────────┘ └─────────────┬──────────────┘
|
|
115
|
+
└────────────┬────────────────────┘
|
|
116
|
+
▼
|
|
117
|
+
npm cli.js ──or── native Bun binary
|
|
118
|
+
(patched in place) (JS extracted → patched → repacked)
|
|
119
|
+
▼
|
|
120
|
+
backup written · `--restore` anytime
|
|
142
121
|
```
|
|
143
122
|
|
|
144
|
-
|
|
145
|
-
`showInteractiveInstallationPicker` (detection), `readContent` / `writeContent`
|
|
146
|
-
(JS I/O across npm + native), `backupFile` / `restoreBackup`, `readTweakccConfig`
|
|
147
|
-
plus the config-path helpers, the `helpers` toolkit (minified-identifier finders
|
|
123
|
+
A code patch finds a minified shape with a regex and splices in modified JS; a prompt override swaps the embedded prompt text for your markdown. npm installs are patched in place, while native installs have their JS pulled out of the Bun binary with [node-lief](https://github.com/Piebald-AI/node-lief), patched, and repacked with stale bytecode cleared. The same building blocks ship as a library — `tryDetectInstallation`, `readContent`/`writeContent`, `backupFile`, and the minified-identifier `helpers` — if you'd rather script your own patches.
|
|
148
124
|
|
|
149
|
-
|
|
150
|
-
`DetectInstallationOptions` types.
|
|
125
|
+
## Staying current
|
|
151
126
|
|
|
152
|
-
|
|
127
|
+
When Claude Code ships a new version, the [showtime skill](./skills/showtime/) runs the whole upgrade: pull the new `cli.js`, re-extract the prompts, realign anything that drifted, and verify it landed clean. Say "it's showtime," or run `node skills/showtime/driver.mjs check`.
|
|
153
128
|
|
|
154
|
-
|
|
129
|
+
## Credit & license
|
|
155
130
|
|
|
156
|
-
|
|
157
|
-
| -------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
158
|
-
| `SKILL.md` | the runbook — the phases, the gates, when to ask vs act |
|
|
159
|
-
| `REFERENCE.md` | the self-contained "why" — the bug-class catalog, the quote-context rule, the realignment recipe, the gotchas |
|
|
160
|
-
| `driver.mjs` | the mechanical harness — `versions` / `extract` / `report` / `check` (resolves the repo itself; honors `TWEAKCC_REPO`) |
|
|
131
|
+
A fork of [Piebald-AI/tweakcc](https://github.com/Piebald-AI/tweakcc) (© [Piebald LLC](https://piebald.ai)) — all of the core customization is its work, carried here with fixes from upstream PRs [#601](https://github.com/Piebald-AI/tweakcc/pull/601), [#646](https://github.com/Piebald-AI/tweakcc/pull/646), [#655](https://github.com/Piebald-AI/tweakcc/pull/655), and [#664](https://github.com/Piebald-AI/tweakcc/pull/664) on top of the fork-only additions. [MIT](https://github.com/Piebald-AI/tweakcc/blob/main/LICENSE).
|
|
161
132
|
|
|
162
|
-
|
|
133
|
+
<div align="center">
|
|
163
134
|
|
|
164
|
-
|
|
135
|
+
If it made your Claude Code better, a ⭐ helps others find it.
|
|
165
136
|
|
|
166
|
-
|
|
137
|
+
</div>
|