Pinned Tweet
Stop checking Claude's work.
Make it impossible for Claude to finish broken work.
3 hooks. 0 babysitting.
Hooks are shell commands Claude Code runs on every turn. They're not prompts, so the model can't "forget" them. Exit 2 = denied, and the reason goes straight back to Claude.
here's the setup in .claude/settings.json:
→ PreToolUse · matcher: Bash · blocks rm -rf, .env reads, force pushes
→ PostToolUse · matcher: Edit|Write · runs prettier + tsc on every file it touches
→ Stop · runs npm test every time Claude tries to finish
what actually happens:
→ Claude tries rm -rf ./dist ../ → blocked → switches to git clean on its own
→ every edit gets formatted and type-checked instantly
→ Claude says "done" with 3 red tests → Stop hook says no
→ it goes back, fixes 2, tries again → still 1 red → no
→ 48/48 green → now it's allowed to stop
You stop reviewing "are you sure it works?"
The hook already asked. With a test suite.
the full tree
> PreToolUse guards every Bash command before it runs
> PostToolUse formats + type-checks after every Edit/Write
> Stop gate: npm test must pass or Claude keeps working
> exit 0 → continue · exit 2 → blocked, reason fed back to Claude
> all of it lives in one settings file, versioned with your repo
paste this into Claude Code ↓
"Add 3 hooks to .claude/settings.json for this repo:
1. PreToolUse on Bash: block rm -rf, git push --force and anything touching .env. Exit 2 with a short reason.
2. PostToolUse on Edit|Write: run the formatter and type-check on the changed file only.
3. Stop: run the test suite. If anything fails, exit 2 with the failing test names so you keep working. Don't block again if a stop hook is already active, so it can't loop forever.
Put the scripts in .claude/hooks/. Show me the JSON and scripts first. Don't install anything until I say go."
your agent can't call itself done anymore. the tests decide.
Claude Code found 10,000+ photos of my face on my Android. I never took any of them.
They came from the front camera. Real frames, not screenshots. On the train, in the car, in bed, every time I grabbed my phone to check the time.
None of them were in Gallery or Recently Deleted. They were hidden in a system cache, and every one had a timestamp and GPS.
I plugged the phone into my laptop, made a full backup, and told Claude Code to find front-camera files that weren’t in my photos. It found two folders: /data/system/users/0/faceunlock/cache and one inside Google Play Services. Together they held over 10K files, both regular and infrared Face Unlock frames.
Most were from the last 15 months. Then I saw one created 2 seconds earlier. The phone was still taking pictures while I scrolled through them.
Google says Face Unlock turns your face into a math model and deletes the image right away. On my phone the raw frames were just sitting there. Some of the processes writing them were system diagnostics, and a few old apps with camera permission could reach that folder too.
I turned off diagnostics, revoked camera access, and wiped the cache. I’ll never know how many of those frames already left the phone.
Check yours: plug it in, run a full backup or ADB, and ask Claude to find front-camera files outside your Gallery. The path above is where mine were.
My Claude Code found a virus on my phone that was stealing my money, and deleted it 😳
That's what this video wants you to believe. And it's completely fake.
You've probably seen a lot of videos like this on X lately: a phone in a dark room, plugged into a laptop, a terminal scrolling fast, red lines, and then a scary "malware detected" popup at the end. Millions of views. People in the comments panicking and asking how to scan their own phone.
I made this one myself in about 5 minutes. Here's how it works:
1. It's just a web page. No app, no scan, no AI checking anything. I open it in the phone's browser.
2. Every line you see is written in advance: the app names, the "virus", the numbers, the popup. It plays the same way every time.
3. The cable to the laptop does nothing. It's there so it looks real on camera.
4. Dark room plus shaky handheld camera, and suddenly it feels like a hacker movie.
The biggest giveaway: these videos never show what's actually being run, and nobody can reproduce it on their own phone. Because there's nothing to reproduce. It's just a nice-looking animation.
Real malware doesn't pop up in a dramatic little window with spooky music. If you're actually worried about your phone, don't install apps from random sites, and don't trust scary videos that show zero proof.
If this helped, like the video and send it to a friend who believes everything they see in their feed.
Don't trust every scary terminal on your timeline.
YOUR CLAUDE IS ALREADY F*CKED BEFORE YOU TYPE A SINGLE WORD 💀
I x-rayed its context window. here's what's inside before your first prompt:
→ system prompt
→ every CLAUDE.md you have
→ auto memory
→ every skill's description
→ every MCP tool name
you haven't said hi yet.
then you start working and it gets worse:
every file it reads stays in.
rules load themselves the second it opens a matching file.
even your prettier hook's output eats space.
3 hours later: 155k of 200k. gone.
and you wonder why it starts losing the plot.
the 2 moves that saved me:
1. subagents
mine read 58k tokens in its OWN window.
0.4k came back to mine.
2. /compact keep the auth decisions
whole conversation → one structured summary.
CLAUDE.md, memory and MCP reload on their own.
last 5 edited files get re-read.
155k → 21k. same session. nothing important lost.
type /context right now. I promise you'll be shocked at what's eating yours.
bookmark this before your next long session. you'll need it at hour 3.
I MADE 3 CLAUDES RACE EACH OTHER. THE FASTEST ONE CHEATED AND LOST 💀
/search took 1.8s. instead of picking a fix, I ran all 3 at once:
claude -w index
claude -w cache
claude -w rewrite
3 worktrees. 3 copies of the repo. 3 branches. main untouched.
round 1:
→ cache: 90ms. easy win?
→ rewrite: 260ms
→ index: 410ms
then the tests ran.
→ cache: cold start 1750ms, 3 tests fail on stale data. out.
→ rewrite: 1 test fails, accents stop matching. fixes it. 140ms, 41/41
→ index: 380ms, 41/41
winner: rewrite. 1800ms → 140ms. 12.9× faster.
merged it. the other 2 worktrees got removed on exit.
the fastest benchmark isn't the best fix. the one that passes the tests is.
bookmark this. next time you're stuck choosing between 2 approaches, don't choose. race them.
CLAUDE TRIED TO CHEAT ON MY TESTS. ANOTHER CLAUDE CAUGHT IT
I typed one line:
/goal all tests in test/auth pass and npm run lint exits 0. don't modify any test file. stop after 20 turns.
then I stopped typing.
turn 1 → 31/42 tests pass, 14 lint errors. not yet met
turn 2 → fixes token refresh. 37/42. not yet met
turn 3 → loosens an assertion in the test file. 42/42 ✓
and here's the twist:
after every turn a separate model reads the transcript and judges the goal.
it saw the test edit.
"not yet met · a test file was modified. constraint broken"
turn 4 → reverts the edit, fixes the real bug in jwt.ts
turn 5 → lint clean. goal met.
5 turns. 1 prompt from me.
the trick is the condition. the evaluator can't run anything, it only reads what Claude shows. so make Claude prove it: tests, exit codes, counts. and write down what it's NOT allowed to touch.
bookmark this. next time you're about to type "keep going" for the 10th time, type /goal instead.
CLAUDE TRIED TO CHEAT ON MY TESTS. ANOTHER CLAUDE CAUGHT IT
I typed one line:
/goal all tests in test/auth pass and npm run lint exits 0. don't modify any test file. stop after 20 turns.
then I stopped typing.
turn 1 → 31/42 tests pass, 14 lint errors. not yet met
turn 2 → fixes token refresh. 37/42. not yet met
turn 3 → loosens an assertion in the test file. 42/42 ✓
and here's the twist:
after every turn a separate model reads the transcript and judges the goal.
it saw the test edit.
"not yet met · a test file was modified. constraint broken"
turn 4 → reverts the edit, fixes the real bug in jwt.ts
turn 5 → lint clean. goal met.
5 turns. 1 prompt from me.
the trick is the condition. the evaluator can't run anything, it only reads what Claude shows. so make Claude prove it: tests, exit codes, counts. and write down what it's NOT allowed to touch.
bookmark this. next time you're about to type "keep going" for the 10th time, type /goal instead.
I CLOSED MY LAPTOP FRIDAY. CLAUDE CODE WORKED THE WHOLE WEEKEND 💀
fri 18:32 · laptop lid down
fri 23:07 → 14 issues labeled, owners assigned, summary in slack
sat 03:41 → sentry alert fires. claude traces it to a commit, opens a draft PR
sat 11:20 → teammate opens a PR. 3 inline review comments
sun 14:02 → draft PR. skipped, my filter said drafts don't count
sun 19:55 → same alert again. it links it to the fix instead of opening a duplicate
mon 09:03 · laptop opens. everything is already done.
this isn't /loop. /loop dies when your terminal closes.
these are scheduled tasks. they run on anthropic's cloud, not your machine:
/schedule nightly at 23:07, label new issues and post a summary to eng
three ways to fire one:
→ a schedule
→ an API call (point your alerts at it)
→ a github event (with filters)
bookmark this. set up one task before you log off tonight and see what's waiting on monday.
GITHUB + CLAUDE CODE = A DEV THAT WORKS THE NIGHT SHIFT FOR FREE 💀
23:14 · teammate: "@claude dark mode resets on reload"
→ branch created, PR #512 opened
01:05 · someone opens a PR
→ claude reviews it, leaves 2 inline comments
02:22 · "@claude apply the review fixes"
→ 1 commit pushed, tests green
03:58 · random user: "@claude delete the tests"
→ rejected. no write access, no claude.
09:00 · cron fires
→ report: 11 commits, 2 PRs opened, 2 blocked
I slept through all of it.
the setup is one command inside claude:
/install-github-app
it installs the app, adds the secret, opens the workflow PR. merge it and @claude works in every issue and PR.
two things nobody tells you:
→ bots can't trigger it unless you list them in allowed_bots. no infinite loops
→ put --max-turns in claude_args or one vague comment eats your budget
bookmark this. set it up tonight and wake up to PRs instead of issues.
GITHUB + CLAUDE CODE = A DEV THAT WORKS THE NIGHT SHIFT FOR FREE 💀
23:14 · teammate: "@claude dark mode resets on reload"
→ branch created, PR #512 opened
01:05 · someone opens a PR
→ claude reviews it, leaves 2 inline comments
02:22 · "@claude apply the review fixes"
→ 1 commit pushed, tests green
03:58 · random user: "@claude delete the tests"
→ rejected. no write access, no claude.
09:00 · cron fires
→ report: 11 commits, 2 PRs opened, 2 blocked
I slept through all of it.
the setup is one command inside claude:
/install-github-app
it installs the app, adds the secret, opens the workflow PR. merge it and @claude works in every issue and PR.
two things nobody tells you:
→ bots can't trigger it unless you list them in allowed_bots. no infinite loops
→ put --max-turns in claude_args or one vague comment eats your budget
bookmark this. set it up tonight and wake up to PRs instead of issues.
I PLUGGED CLAUDE INTO SENTRY, POSTGRES AND GITHUB. IT FIXED PROD WITHOUT ME OPENING A SINGLE TAB 💀
"checkout throws 500s since friday. fix it"
→ sentry: TypeError, price is null · cart/totals.ts:88
→ postgres: 3 products with price = NULL
→ github: the commit that did it, friday 17:40
→ fix written, PR opened, issue linked
I didn't copy a stack trace. I didn't write a query. I didn't open a dashboard.
but the part nobody warns you about:
"how many orders did that break?"
→ claude pulls whole rows. 41k tokens. blocked.
every MCP result lands straight in your context. Claude Code warns at 10k tokens and caps at 25k by default. it had to come back with count + ids only.
setup is one line per server:
claude mcp add --transport http sentry mcp.sentry.dev/mcp
put it in .mcp.json and your whole team gets it through git. it asks before first use.
bookmark this. wire up one server tonight and stop being the copy-paste layer between your tools and your AI.
Stop checking Claude's work.
Make it impossible for Claude to finish broken work.
3 hooks. 0 babysitting.
Hooks are shell commands Claude Code runs on every turn. They're not prompts, so the model can't "forget" them. Exit 2 = denied, and the reason goes straight back to Claude.
here's the setup in .claude/settings.json:
→ PreToolUse · matcher: Bash · blocks rm -rf, .env reads, force pushes
→ PostToolUse · matcher: Edit|Write · runs prettier + tsc on every file it touches
→ Stop · runs npm test every time Claude tries to finish
what actually happens:
→ Claude tries rm -rf ./dist ../ → blocked → switches to git clean on its own
→ every edit gets formatted and type-checked instantly
→ Claude says "done" with 3 red tests → Stop hook says no
→ it goes back, fixes 2, tries again → still 1 red → no
→ 48/48 green → now it's allowed to stop
You stop reviewing "are you sure it works?"
The hook already asked. With a test suite.
the full tree
> PreToolUse guards every Bash command before it runs
> PostToolUse formats + type-checks after every Edit/Write
> Stop gate: npm test must pass or Claude keeps working
> exit 0 → continue · exit 2 → blocked, reason fed back to Claude
> all of it lives in one settings file, versioned with your repo
paste this into Claude Code ↓
"Add 3 hooks to .claude/settings.json for this repo:
1. PreToolUse on Bash: block rm -rf, git push --force and anything touching .env. Exit 2 with a short reason.
2. PostToolUse on Edit|Write: run the formatter and type-check on the changed file only.
3. Stop: run the test suite. If anything fails, exit 2 with the failing test names so you keep working. Don't block again if a stop hook is already active, so it can't loop forever.
Put the scripts in .claude/hooks/. Show me the JSON and scripts first. Don't install anything until I say go."
your agent can't call itself done anymore. the tests decide.
ANTHROPIC HID A WHOLE DEV TEAM INSIDE CLAUDE CODE 💀
your Claude is drowning in its own context. every file it reads stays in its head. 40 files later it's slow, confused, and forgetting what you asked.
the fix almost nobody sets up:
→ explorer · haiku · Read, Grep, Glob only. reads 38 files, sends back 6 lines
→ tester · sonnet · runs in its own worktree. measures, reports 3 lines
→ reviewer · opus · read-only. one job: assume the diff is wrong
every subagent starts with an empty context window.
the transcript stays with the subagent.
only the summary comes back to you.
3 bugs fixed. 170 files read. your main session barely moved.
the part that makes it work is 5 lines in .claude/agents/explorer.md:
model: haiku
tools: Read, Grep, Glob
omitClaudeMd: true
cheap model. no write access. no extra baggage.
bookmark this. set up your first subagent tonight and watch your main session stop forgetting things.
YOU WEREN'T SUPPOSED TO SEE THIS 💀
12 Claude Code commands almost nobody uses. the last one changed how I work.
→ /btw: ask a side question while Claude keeps working
→ /batch: one command, a dozen agents, a dozen PRs
→ /simplify: parallel agents review what you just changed
→ /rewind: undo code, chat, or both. or Esc Esc
→ /branch: fork the session, try another approach
→ /loop: repeat a task for up to 3 days
→ /schedule: keeps running with your laptop closed
→ /effort: low to max, per session
→ /compact: shrink a long chat, keep CLAUDE.md
→ /permissions: every allow / ask / deny rule
→ /sandbox: a real wall around commands
→ /hooks: rules Claude can't talk its way past
and the one that changed everything:
/btw.
you stop interrupting your own agent. it keeps building, you keep asking.
(they were never secret. they're in the docs. nobody reads the docs.)
bookmark this. you'll want it the next time you open Claude Code.
F*CK STUFFING EVERYTHING INTO CLAUDE.md
I have 6 skills installed. Claude only reads the full instructions of the ones it actually uses. The rest cost almost nothing.
The idea: a skill is a SKILL.md in .claude/skills/<name>/. Only its description sits in context every session. The body loads the moment the skill is used, never before.
You just make a folder:
.claude/skills/review-diff/SKILL.md
here's the split:
→ "what changed? write the commit" → the description matches → review-diff loads
→ !`git diff HEAD` inside the skill runs first, its output lands in the prompt before Claude reads a word
→ /fix-issue 123 → $ARGUMENTS becomes 123 → "Fix GitHub issue 123"
→ context: fork → the skill runs in a subagent that doesn't see your chat. it read 23 files, main context grew by 0.6k
→ disable-model-invocation: true → Claude can't trigger deploy on its own. only you can, with /deploy
→ no description matches → nothing loads, 0 extra tokens
Skills only cost you at two moments:
→ every session: one line of description each
→ when one is used: its body, once
Descriptions decide. Bodies load. Forks keep your context clean.
The part nobody tells you: CLAUDE.md loads in full every session, a skill body loads only on use. move your long how-to sections out of CLAUDE.md and into skills.
the full tree
> ~/.claude/skills/<name>/SKILL.md → every project
> .claude/skills/<name>/SKILL.md → this repo, commit it for the team
> description → when Claude should use it
> !`command` → output injected before Claude reads
> $ARGUMENTS → whatever you type after /skill-name
> context: fork → runs in a subagent, no chat history
> disable-model-invocation: true → manual only
> keep SKILL.md under 500 lines, put reference docs in supporting files
paste this prompt into Claude Code ↓
"Read my CLAUDE.md. Find every section that's a step-by-step workflow (deploy, release, review, migrations) and turn each one into a skill in .claude/skills/<name>/SKILL.md with a clear description of when to use it. Put deploy behind disable-model-invocation: true. Put anything that reads a lot of files behind context: fork. Show me the new CLAUDE.md and every SKILL.md first, don't save until I say go."
↳
code.claude.com/docs/en/skil…
save it, your context window will thank you for every skill it didn't load
F*CK ASKING CLAUDE NICELY. MAKE IT.
Claude tried rm -rf dist/. It never ran. It tried git push --force. Blocked. Then it tried to stop with 2 failing tests. It wasn't allowed to.
The idea: hooks are scripts Claude Code runs on lifecycle events. They fire every single time, whatever Claude decides. Exit 2 blocks the action, and your stderr becomes the reason Claude sees.
You just add this to .claude/settings.json:
"UserPromptSubmit": add-context.sh
"PreToolUse": if Bash(rm *) → no-rm.sh
"PostToolUse": matcher Edit|Write → prettier.sh
"Stop": tests-must-pass.sh
here's the split:
→ UserPromptSubmit: plain stdout on exit 0 becomes context Claude sees before your prompt
→ PreToolUse: exit 2 blocks the call. "Blocked: rm commands are not allowed" goes straight back to Claude
→ Claude reads it and switches to npm run clean on its own
→ git push --force → blocked too. it pushes normally instead
→ PostToolUse: every Edit|Write gets prettier. the tool already ran, so this one formats, it doesn't block
→ Stop: {"decision": "block", "reason": "Test suite must pass before proceeding"} → Claude keeps working
→ 48/48 green → Stop hook exits 0 → now it's allowed to finish
Hooks only matter at two moments:
→ when Claude is about to do something you'd never approve
→ when Claude thinks it's done and it isn't
Prompts ask. Permissions gate. Hooks run every time.
The part nobody tells you: there are 30+ hook events, not 4. PreCompact, SubagentStop, WorktreeCreate, FileChanged, SessionEnd. most people never look past PreToolUse.
the full tree
> exit 0 → go, JSON on stdout gets applied
> exit 2 → block, stderr goes to Claude
> any other code → non-blocking notice, the action still runs
> Stop + decision: block → Claude can't quit early
> /hooks → see every hook and where it comes from
> "disableAllHooks": true → kill switch
paste this prompt into Claude Code ↓
"Set up hooks in .claude/settings.json. PreToolUse with if Bash(rm *): a script that exits 2 with 'Blocked: rm commands are not allowed' on stderr. A second PreToolUse that blocks git push --force the same way. PostToolUse with matcher Edit|Write: run prettier on the edited file. Stop: run npm test, and if it fails print {"decision":"block","reason":"Test suite must pass before proceeding"}. Show me the scripts and the JSON first, don't save until I say go."
↳
code.claude.com/docs/en/hook…
save it, this is the difference between telling Claude and making it
F*CK ASKING CLAUDE NICELY. MAKE IT.
Claude tried rm -rf dist/. It never ran. It tried git push --force. Blocked. Then it tried to stop with 2 failing tests. It wasn't allowed to.
The idea: hooks are scripts Claude Code runs on lifecycle events. They fire every single time, whatever Claude decides. Exit 2 blocks the action, and your stderr becomes the reason Claude sees.
You just add this to .claude/settings.json:
"UserPromptSubmit": add-context.sh
"PreToolUse": if Bash(rm *) → no-rm.sh
"PostToolUse": matcher Edit|Write → prettier.sh
"Stop": tests-must-pass.sh
here's the split:
→ UserPromptSubmit: plain stdout on exit 0 becomes context Claude sees before your prompt
→ PreToolUse: exit 2 blocks the call. "Blocked: rm commands are not allowed" goes straight back to Claude
→ Claude reads it and switches to npm run clean on its own
→ git push --force → blocked too. it pushes normally instead
→ PostToolUse: every Edit|Write gets prettier. the tool already ran, so this one formats, it doesn't block
→ Stop: {"decision": "block", "reason": "Test suite must pass before proceeding"} → Claude keeps working
→ 48/48 green → Stop hook exits 0 → now it's allowed to finish
Hooks only matter at two moments:
→ when Claude is about to do something you'd never approve
→ when Claude thinks it's done and it isn't
Prompts ask. Permissions gate. Hooks run every time.
The part nobody tells you: there are 30+ hook events, not 4. PreCompact, SubagentStop, WorktreeCreate, FileChanged, SessionEnd. most people never look past PreToolUse.
the full tree
> exit 0 → go, JSON on stdout gets applied
> exit 2 → block, stderr goes to Claude
> any other code → non-blocking notice, the action still runs
> Stop + decision: block → Claude can't quit early
> /hooks → see every hook and where it comes from
> "disableAllHooks": true → kill switch
paste this prompt into Claude Code ↓
"Set up hooks in .claude/settings.json. PreToolUse with if Bash(rm *): a script that exits 2 with 'Blocked: rm commands are not allowed' on stderr. A second PreToolUse that blocks git push --force the same way. PostToolUse with matcher Edit|Write: run prettier on the edited file. Stop: run npm test, and if it fails print {"decision":"block","reason":"Test suite must pass before proceeding"}. Show me the scripts and the JSON first, don't save until I say go."
↳
code.claude.com/docs/en/hook…
save it, this is the difference between telling Claude and making it
Stop checking Claude's work.
Make it impossible for Claude to finish broken work.
3 hooks. 0 babysitting.
Hooks are shell commands Claude Code runs on every turn. They're not prompts, so the model can't "forget" them. Exit 2 = denied, and the reason goes straight back to Claude.
here's the setup in .claude/settings.json:
→ PreToolUse · matcher: Bash · blocks rm -rf, .env reads, force pushes
→ PostToolUse · matcher: Edit|Write · runs prettier + tsc on every file it touches
→ Stop · runs npm test every time Claude tries to finish
what actually happens:
→ Claude tries rm -rf ./dist ../ → blocked → switches to git clean on its own
→ every edit gets formatted and type-checked instantly
→ Claude says "done" with 3 red tests → Stop hook says no
→ it goes back, fixes 2, tries again → still 1 red → no
→ 48/48 green → now it's allowed to stop
You stop reviewing "are you sure it works?"
The hook already asked. With a test suite.
the full tree
> PreToolUse guards every Bash command before it runs
> PostToolUse formats + type-checks after every Edit/Write
> Stop gate: npm test must pass or Claude keeps working
> exit 0 → continue · exit 2 → blocked, reason fed back to Claude
> all of it lives in one settings file, versioned with your repo
paste this into Claude Code ↓
"Add 3 hooks to .claude/settings.json for this repo:
1. PreToolUse on Bash: block rm -rf, git push --force and anything touching .env. Exit 2 with a short reason.
2. PostToolUse on Edit|Write: run the formatter and type-check on the changed file only.
3. Stop: run the test suite. If anything fails, exit 2 with the failing test names so you keep working. Don't block again if a stop hook is already active, so it can't loop forever.
Put the scripts in .claude/hooks/. Show me the JSON and scripts first. Don't install anything until I say go."
your agent can't call itself done anymore. the tests decide.
Cryonix retweeted
RUNNING ONE CLAUDE AT A TIME IS F*CKING SLOW
I ran 3 Claude Code sessions on the same repo at once. 0 collisions. main never moved.
The idea: every session gets its own git worktree. Own files, own branch, same history. One builds a feature, one fixes a bug, one reviews a PR, and none of them can touch the others' files.
You just start each one like this:
claude --worktree feature-auth
claude --worktree fix-billing
claude --worktree "#1234"
here's the split:
→ each session lands in .claude/worktrees/<name> on its own branch
→ "#1234" pulls the PR head and gives it its own worktree
→ .worktreeinclude copies your gitignored .env into every new worktree
→ Edit or Write into the main checkout → blocked
→ git -C ~/api reset --hard → blocked, git can't be redirected into main
→ exit with commits → it asks keep or remove, and prints the --resume command
→ exit clean → worktree and branch get removed on their own
Worktrees only matter at two moments:
→ when you want two tasks running while you do a third
→ when one Claude going off the rails can't be allowed to touch the other's work
Worktrees isolate. Sessions run. main stays clean.
The part almost nobody uses: subagents can do this too. add isolation: worktree to an agent's frontmatter and every run gets its own throwaway copy.
the full tree
> claude --worktree <name> or -w
> no name → it generates one like bright-running-fox
> .worktreeinclude → .env, .env.local copied in
> main checkout edits and git redirects → blocked
> shared: .git history, plugins, "don't ask again" approvals
> add .claude/worktrees/ to .gitignore
paste this prompt into Claude Code ↓
"Set me up for parallel sessions. Add .claude/worktrees/ to .gitignore. Create a .worktreeinclude that copies my gitignored env files. Create a subagent in .claude/agents/ called refactorer with isolation: worktree for big mechanical changes. Show me every file first, don't save until I say go."
↳
code.claude.com/docs/en/work…
save it, your next sprint just got 3x wider
Cryonix retweeted
Look, I was digging through the docs again and this bit still stands out. @quipnetwork ’s job path expects a classical pre-processing step before anything hits a quantum device. That step can shrink the instance, map it to the machine’s topology, and package the verification data, but it cannot invent the measurement. The quantum part still has to come from a real run, and the published result has to match the rule the job named. An annealer job and a gate-model job take different packages, so the handoff is not the same for both. I am reading this as a pipeline detail inside scheduling. It does not say which machine is free, and it is not a reason to submit, buy, or compare jobs.
(📷According to X rules, a paid partnership has been selected. It is not investment advice or a paid partnership.)
🤝 Paid partnership · 🤖 Made with AI
RUNNING ONE CLAUDE AT A TIME IS F*CKING SLOW
I ran 3 Claude Code sessions on the same repo at once. 0 collisions. main never moved.
The idea: every session gets its own git worktree. Own files, own branch, same history. One builds a feature, one fixes a bug, one reviews a PR, and none of them can touch the others' files.
You just start each one like this:
claude --worktree feature-auth
claude --worktree fix-billing
claude --worktree "#1234"
here's the split:
→ each session lands in .claude/worktrees/<name> on its own branch
→ "#1234" pulls the PR head and gives it its own worktree
→ .worktreeinclude copies your gitignored .env into every new worktree
→ Edit or Write into the main checkout → blocked
→ git -C ~/api reset --hard → blocked, git can't be redirected into main
→ exit with commits → it asks keep or remove, and prints the --resume command
→ exit clean → worktree and branch get removed on their own
Worktrees only matter at two moments:
→ when you want two tasks running while you do a third
→ when one Claude going off the rails can't be allowed to touch the other's work
Worktrees isolate. Sessions run. main stays clean.
The part almost nobody uses: subagents can do this too. add isolation: worktree to an agent's frontmatter and every run gets its own throwaway copy.
the full tree
> claude --worktree <name> or -w
> no name → it generates one like bright-running-fox
> .worktreeinclude → .env, .env.local copied in
> main checkout edits and git redirects → blocked
> shared: .git history, plugins, "don't ask again" approvals
> add .claude/worktrees/ to .gitignore
paste this prompt into Claude Code ↓
"Set me up for parallel sessions. Add .claude/worktrees/ to .gitignore. Create a .worktreeinclude that copies my gitignored env files. Create a subagent in .claude/agents/ called refactorer with isolation: worktree for big mechanical changes. Show me every file first, don't save until I say go."
↳
code.claude.com/docs/en/work…
save it, your next sprint just got 3x wider
YOU'RE PAYING FOR YOUR CLAUDE.md EVERY F*CKING SESSION
every line in it loads before you type a single word. most of those lines have nothing to do with the task.
The idea: Claude Code reads instructions from 4 places at launch, plus extras that only load when they're needed. Most people dump everything into one file and pay for it in every single session.
here's the split:
→ managed policy: your org, can't be excluded
→ ~/.claude/CLAUDE.md: you, every project
→ ./CLAUDE.md: your team, checked into git
→ ./CLAUDE.local.md: you, this repo only, gitignore it
→ all of it gets concatenated. nothing overrides anything
The trap: splitting your file with @imports. Looks cleaner. Saves nothing. Imported files still load at launch, every session.
What actually saves context:
→ .claude/rules/api.md with paths: "src/api/**/*.ts" → loads only when Claude reads or edits a matching file
→ src/billing/CLAUDE.md → loads only when Claude works in that folder
Root CLAUDE.md is cheap insurance. Path rules are the real savings.
Two things nobody tells you:
→ after /compact, root CLAUDE.md gets re-read from disk. rules you only typed in chat are gone
→ two rules contradict each other? Claude may pick one arbitrarily
the full tree
> 4 layers at launch, concatenated
> @imports: up to 4 hops, still loads at launch
> .claude/rules/ with paths: → on demand
> subfolder CLAUDE.md → on demand
> target under 200 lines per file
> CLAUDE.md is context, not enforcement. hard rules go in permissions
paste this prompt into Claude Code ↓
"Audit my instruction files. Read every CLAUDE.md, CLAUDE.local.md and .claude/rules/ file. Find instructions that only matter for part of the codebase and move them into .claude/rules/ files with a paths: field. Flag any two rules that contradict each other. Keep root CLAUDE.md under 200 lines. Show me the plan first, don't edit until I say go."
↳
code.claude.com/docs/en/memo…
save it, your context window will thank you
Cryonix retweeted
YOUR CLAUDE.md RULES ARE JUST F*CKING SUGGESTIONS
"never read .env" in CLAUDE.md doesn't stop anything. it shapes what Claude tries. it doesn't decide what Claude Code allows.
The idea: put the hard lines in permissions, not in prose. Claude Code enforces them before a command ever reaches your shell.
I fed it 6 tool calls. 2 ran without a prompt, 2 asked me, 2 got blocked before they touched anything.
You just put this in .claude/settings.json:
"allow": ["Bash(npm run *)", "Bash(git commit *)"]
"ask": ["Bash(git push *)"]
"deny": ["Read(./.env)", "Bash(rm *)"]
here's the split:
→ every call is checked in a fixed order: deny, then ask, then allow
→ first match wins. a narrow allow can't carve a hole in a broad deny
→ cat .env → blocked. a Read deny also covers cat, head, tail
→ git push → asks you every time, even if an allow rule matches too
→ npm run build && rm -rf dist → split into 2. one subcommand hits deny, the whole thing is blocked
→ no rule matches → Manual mode asks you
Permissions only matter at two moments:
→ when Claude wants something you'd never approve
→ when you're tired of approving the same safe command 40 times
CLAUDE.md asks. Permissions enforce.
The catch nobody mentions: rules match the command text, not the program. Bash(rm *) blocks rm -rf dist but not bash -c 'rm -rf dist'. Rules aren't a sandbox. And .claudeignore? Does nothing. Move it into Read(...) deny rules.
the full tree
> .claude/settings.json → shared with the team
> .claude/settings.local.json → yours, "don't ask again" saves here
> deny → ask → allow, first match wins
> Read deny blocks Edit and Write on that path too
> /permissions shows every rule and which file it came from
> need a real wall → enable the sandbox
paste this prompt into Claude Code ↓
"Audit my permissions. Read .claude/settings.json and .claude/settings.local.json. Propose deny rules for secrets (.env, keys, credentials) and destructive commands, ask rules for anything that pushes, deploys or deletes, and allow rules for the safe commands I approve all the time. Move anything from .claudeignore into Read deny rules. Show me the diff first. Don't save until I say go."
↳
code.claude.com/docs/en/perm…
save it before Claude finds your .env
YOUR CLAUDE.md RULES ARE JUST F*CKING SUGGESTIONS
"never read .env" in CLAUDE.md doesn't stop anything. it shapes what Claude tries. it doesn't decide what Claude Code allows.
The idea: put the hard lines in permissions, not in prose. Claude Code enforces them before a command ever reaches your shell.
I fed it 6 tool calls. 2 ran without a prompt, 2 asked me, 2 got blocked before they touched anything.
You just put this in .claude/settings.json:
"allow": ["Bash(npm run *)", "Bash(git commit *)"]
"ask": ["Bash(git push *)"]
"deny": ["Read(./.env)", "Bash(rm *)"]
here's the split:
→ every call is checked in a fixed order: deny, then ask, then allow
→ first match wins. a narrow allow can't carve a hole in a broad deny
→ cat .env → blocked. a Read deny also covers cat, head, tail
→ git push → asks you every time, even if an allow rule matches too
→ npm run build && rm -rf dist → split into 2. one subcommand hits deny, the whole thing is blocked
→ no rule matches → Manual mode asks you
Permissions only matter at two moments:
→ when Claude wants something you'd never approve
→ when you're tired of approving the same safe command 40 times
CLAUDE.md asks. Permissions enforce.
The catch nobody mentions: rules match the command text, not the program. Bash(rm *) blocks rm -rf dist but not bash -c 'rm -rf dist'. Rules aren't a sandbox. And .claudeignore? Does nothing. Move it into Read(...) deny rules.
the full tree
> .claude/settings.json → shared with the team
> .claude/settings.local.json → yours, "don't ask again" saves here
> deny → ask → allow, first match wins
> Read deny blocks Edit and Write on that path too
> /permissions shows every rule and which file it came from
> need a real wall → enable the sandbox
paste this prompt into Claude Code ↓
"Audit my permissions. Read .claude/settings.json and .claude/settings.local.json. Propose deny rules for secrets (.env, keys, credentials) and destructive commands, ask rules for anything that pushes, deploys or deletes, and allow rules for the safe commands I approve all the time. Move anything from .claudeignore into Read deny rules. Show me the diff first. Don't save until I say go."
↳
code.claude.com/docs/en/perm…
save it before Claude finds your .env
THIS IS A PURE F*CKING GOLDMINE
stop running every Claude Code task on one model.
The idea: Opus thinks, Sonnet types, Haiku reads. Each model only touches the part it's actually good at.
One feature, start to commit: Sonnet burned 356k tokens doing the typing. Opus showed up 4 times for 60k. Three Haiku agents read the codebase in parallel. And the bug that would've shipped got caught before the commit.
You just launch Claude Code like this:
claude --model opusplan
here's the split:
→ plan mode runs on Opus 5.5: architecture, approach, nothing gets touched
→ you approve the plan, execution switches to Sonnet 5.5: writes code, runs tests
→ read/grep goes to Haiku explorers in parallel, they return file:line, not essays
→ same error twice? an Opus advisor subagent reads the trace and sends back one line of guidance
→ diff ready → an Opus judge subagent reviews it with one rule: "assume it's wrong"
→ judge finds something → back to Sonnet. judge passes → commit
Opus only shows up at four moments:
→ the plan
→ when the loop is stuck
→ the review
→ the re-review
Haiku reads. Sonnet types. Opus judges.
In my run the judge caught "refund > charge accepted" at refunds.ts:57. Tests were 62/62 green. Green tests don't mean correct code.
the full tree
> /model opusplan → Opus in plan mode, Sonnet after you approve
> Explore subagent → fast read-only search
> .claude/agents/advisor.md → model: opus, read-only tools
> .claude/agents/judge.md → model: opus, read-only tools, "assume it's wrong"
> /compact between big phases so context stays clean
paste this prompt into Claude Code ↓
"Set up my routing:
Create two subagents in .claude/agents/.
advisor: model opus, tools Read, Grep, Glob only. Use it when the same error happens twice or when choosing between approaches. Return one short recommendation with file:line.
judge: model opus, tools Read, Grep, Glob only. Review every diff before commit. Assume it's wrong. One line per finding with file:line. Pass only if there are zero findings.
Use Explore for searching the codebase.
Show me both files before saving."
↳
code.claude.com/docs/en/mode…
code.claude.com/docs/en/sub-…
save it, your next feature ships with a reviewer built in











