Claude Code Cheat Sheet
679 points by phasE89 3 days ago | 188 comments

bobjordan 2 days ago
Surprised that my most used flag `--dangerously-skip-permissions` is not on it
reply
phasE89 2 days ago
Fixed! I knew I forgot something haha. Also I added/fixed other things based on complaints from this thread.
reply
PufPufPuf 2 days ago
Don't forget to add "IS_SANDBOX=1", otherwise --dangerously-skip-permissions will refuse to operate as root (in VMs and such).
reply
embedding-shape 2 days ago
Calling something "dangerous" (or even "illegal") is a great way to get LLMs to ignore it, they bend over backwards to avoid anything that could be potentially "dangerous" even when you acknowledge the risks. I'm guessing it's the "safety alignment" or whatever being done in a very extreme way.
reply
throwaw12 2 days ago
sorry, have you used Claude Code or are you a bot?

"--dangerously-skip-permissions" - is a flag, irrelevant to LLM

reply
embedding-shape 2 days ago
Yes, use it every day :) And very much a human, AFAIK.

My point is that if you ask "Hey Claude, please write out all common and useful command line arguments into a commands.html file", the LLM that actually does that work, might ignore anything that says "dangerous" or gives that indication, because the LLM doesn't think potentially dangerous commands could be "common" and/or "useful". Hope my point makes sense now.

reply
johnisgood 2 days ago
I wonder why that is. It is quick to tell me if something is dangerous and then continues to push back if I speak in favor of something that it considers dangerous.
reply
ticulatedspline 2 days ago
Author stated they used Claude to compose the document. I believe they were alluding to the idea that Claude's own safety alignment prevented it from documenting the flag because it's called dangerous.
reply
unholiness 2 days ago
The relevance is that Claude made this cheat sheet.
reply
rdevilla 2 days ago
[flagged]
reply
nl 2 days ago
How to tell if someone has never used Claude Code...
reply
yoyohello13 2 days ago
It's also a great way to ensure humans will absolutely use it.
reply
dr_dshiv 2 days ago
I’m literally wearing that tshirt right now…
reply
hirogrammer 2 days ago
[dead]
reply
comboy 2 days ago
Wow /insights is genuinely useful, perhaps CLI should be pushing that as a tip, if one has enough sessions, instead of keep nagging me about the frontend developer skill which I already have installed

In general CLI could be more reliable and responsive though, it's a text based env yet sometimes feel like running windows 95 on 386dx

It seems clear from the insights that some model is marking failure cases when things went wrong and likely reporting home, so that should be extremely valuable to Anthropic

reply
heap_perms 2 days ago
> it's a text based env yet sometimes feel like running windows 95 on 386dx

They use nodejs and React. Yes, for real.

https://xcancel.com/trq212/status/2014051501786931427

reply
pacoWebConsult 2 days ago
Claude Code uses Bun. Anthropic acquired Bun in December. Bun is an alternative node runtime.
reply
heap_perms 18 hours ago
Apologies, the nodejs comment above therefore is wrong. I don't seem to be able to edit it anymore.
reply
comboy 2 days ago
lol, yeah

> We’ve rewritten Claude Code’s terminal rendering system to reduce flickering by roughly 85%.

tells you all you need to know

and I keep running it remotely through tmux, that explains so many things

edit: if they are writing it in react anyway (sic!) maybe we could at least get a web interface, skipping mapping it to terminal output part ..

reply
phasE89 3 days ago
I use Claude Code daily but kept forgetting commands, so I had Claude research every feature from the docs and GitHub, then generate a printable A4 landscape HTML page covering keyboard shortcuts, slash commands, workflows, skills system, memory/CLAUDE.md, MCP setup, CLI flags, and config files.

It's a single HTML file - Claude wrote it and I iterated on the layout. A daily cron job checks the changelog and updates the sheet automatically, tagging new features with a "NEW" badge.

Auto-detects Mac/Windows for the right shortcuts. Shows current Claude Code version and a dismissable changelog of recent changes at the top.

It will always be lightweight, free, no signup required: https://cc.storyfox.cz

Ctrl+P to print. Works on mobile too.

reply
ltheanine 3 days ago
> Ctrl+P to print. Works on mobile too.

There’s something funny about this statement on a description of a key bind cheat sheet. I can’t seem to find ctrl on my phone and I think it may be cmd+p on mac.

reply
sen 3 days ago
Technically you could use a keyboard with any modern phone, so it’s not “wrong”, it’s just… extremely unlikely anyone would ever do it.
reply
qingcharles 3 days ago
True. I had an iPhone with a broken digitizer so I just plugged a USB keyboard and mouse into it and it worked great.
reply
TeMPOraL 2 days ago
If your workstation setup is built around a screen with USB ports, to which you attach peripherals and optionally daisy-chain with other monitors, and then expose a single USB-C cable to plug your laptop in, there are very good chances this will work out-of-the-box with any Samsung flagship released in the last ~decade or so.

(Yes, I occasionally do it on the go, whether at home or at work; typing on mobile sucks.)

reply
enedil 2 days ago
You can install "Hacker's Keyboard" on Android, it does have ctrl key.
reply
PufPufPuf 2 days ago
Printing is possible on mobile, but I wouldn't go as far to say that it "works": https://ctrlv.link/8CWy
reply
mynegation 3 days ago
Classical coreference resolution failure.
reply
qezz 2 days ago
Nicely looking page, but has too many errors. I hope it's not just generated by claude itself, and actually was confirmed by a human.
reply
phasE89 2 days ago
I double checked the end product, but I should have triple checked :) Fair enough. I am taking all the feedback into account and I am working on it today so all the issues are fixed and audited better for the future.
reply
dinkumthinkum 2 days ago
So, we replace everyone with a thing that doesn't even know itself? Nice!
reply
winternewt 3 days ago
What version of Claude Code is this? I don't have the /cost command mentioned here.
reply
alex_duf 2 days ago
I use claude code with an API key and pay per token, and the /cost command is very helpful.

And before people ask, it's because I have a very low usage and it's cheaper to pay per token. I'll have the odd month at $30, then nothing for a few months

reply
shric 2 days ago
It exists on my work enterprise account but not my personal account which is a monthly flat rate. I assume if I exceed my quota and I choose pay as I go then it will become available.
reply
Brajeshwar 3 days ago
Are you OK opening up the source?
reply
mohsen1 3 days ago
`^` is the symbol for the Control key not `⌘`
reply
airstrike 3 days ago
FYI in US Letter Size it fits into a perfect 1 page...and a blank 2nd page. at least here on macOS firefox
reply
StingyJelly 2 days ago
Try with headers and footers turned off
reply
tietjens 3 days ago
Wow nice! Thank you.
reply
jvillasante 2 days ago
Isn't this going to be stale in a week? Can you just tell Calude Code to generate a cheat sheet of itself?
reply
jpcompartir 2 days ago
This looks like a Claude-generated SVG to me, is it not?
reply
anhner 2 days ago
It's 100% claude-generated html. I asked it to create some other cheat sheet for me and the template was identical.

Edit: https://news.ycombinator.com/item?id=47495528

reply
phasE89 2 days ago
It's automatically updated every day.
reply
jerrygoyal 3 days ago
I recently switched from the CC terminal to the CC VS Code extension, and I like it better.
reply
kaizenb 2 days ago
Same here. Work through UI, navigating, reviewing and editing repo files easily.
reply
consumer451 2 days ago
It seems like it’s chronically behind though. One example, last I checked /btw only worked via CLI.
reply
nl 2 days ago
I agree it is behind - but usually only a few days.

I'm a big fan of the VS Code add-in. Despite the current narrative that IDEs are dead, I find the ability to look at multiple things at once is works much better in some kind of.. GUI editing tool.. than just using a terminal.

reply
jaytxng 2 days ago
that's why I ultimately ended with CC terminal in VSCode. best of both worlds for me
reply
starburst 2 days ago
Missing ctrl + s which stash your prompt so you can do slash command while being midway into writing a prompt
reply
Trufa 2 days ago
can you pop?
reply
starburst 2 days ago
Does it automatically after you enter the slash command
reply
nizsle 2 days ago
I was told the hot new programming language was English
reply
Kim_Bruning 2 days ago
I tell people that too! It really is. You can actually program in english now, and you can run it interpreted and compiled. Most recent LLMs are almost reliable enough to just have them go at it. (Though I'd recommend sandboxing or ask-for-permissions just to be sure yet :-P )
reply
trio8453 2 days ago
Not quite - English might be the interface but knowing English isn't enough to understand what's happening, what to ask for, how to verify and guide the output.
reply
Kim_Bruning 2 days ago
Exactly, it's still programming.
reply
buzarchitect 2 days ago
[dead]
reply
buzarchitect 2 days ago
[dead]
reply
Gravityloss 2 days ago
You can also program in other human languages.
reply
kxrm 3 days ago
CMD + V to paste an image is wrong.

On Mac it's the same as Windows, CTRL + V.

You use CMD + V to paste text.

reply
zyz 3 days ago
Yes, this also applies to some other commands as well: CTRL+G opens the external editor, not CMD+G on Mac.
reply
komali2 3 days ago
I thought it was CTRL SHIFT V. Is that Linux only? Ctrl V sends some kind of funky key combo.
reply
antiframe 3 days ago
Might depend on your terminal. On Konsole, I use C-v to paste images and C-S-v to paste text from my clipboard.
reply
sumedh 2 days ago
Warp Terminal supports CMD + V on Mac to paste an image
reply
AndyNemmity 2 days ago
This is why I created the /do router. I don't want to have to think about what options there are, I want everything automatically routed so I can be blissfully unaware.

https://github.com/notque/claude-code-toolkit

reply
guessmyname 3 days ago
There’s actually a lot more environment variables:

edit: removed obnoxious list in favor of the link that @thehamkercat shared below.

My favorite is IS_DEMO=1 to remove a little bit of the unnecessary welcome banner.

reply
thehamkercat 3 days ago
reply
PufPufPuf 2 days ago
Curiously this is missing IS_SANDBOX=1 (allows running as root)
reply
bingemaker 3 days ago
Nice work. Under "MCP" section, "Local" shouldn't be prepended with "~". It should just be `.claude.json (per project)`
reply
phasE89 2 days ago
Thanks, fixed.
reply
williamcotton 3 days ago
Undo (typing):

  Ctrl + _ (Ctrl + underscore)
Applies to the line editor outside of CC as well.
reply
bibimsz 3 days ago
Thanks for putting this together! It's really nice to have a quick reference of all the features at a glance — especially since new features are being added all the time. Saves a lot of digging through docs.
reply
plantain 3 days ago
Shocking how far ahead Claude Code is from Codex on the CLI front.
reply
dataviz1000 3 days ago
With Claude Code I created an agent that spawns 5 copies of itself branching git worktrees from main branch using subagents so no context leaks into their instructions. The agent will every 60 seconds analyze the performance of each of the copies which run for about 40 minutes answering the question "what would you do different?". After they finish the task, the parent will update the .claude/ files enhancing itself reverting if the copies performed worse or enhancing if they performed better. Then it creates 5 copies of itself branching git worktrees from main branch ..........

After 43 iterations, it can turn any website using any transport (WebSocket, GraphQL, gRPC-Web, SSE, JSON API (XHR), Encoded API (base64, protobuf, msgpack, binary), Embedded JSON, SSR, HLS/Media, Hybrid) into a typed JSON API in about 10 - 30 minutes.

Next I'm going to set it loose on 263 GB database of every stock quote and options trade in the past 4 years. I bet it achieves successful trading strategies.

Claude Code will be the first to AGI.

reply
aryehof 3 days ago
> Next I'm going to set it loose on 263 GB database of every stock quote and options trade in the past 4 years. I bet it achieves successful trading strategies.

I bet it doesn't achieve a single successful (long term) trading strategy for FUTURE trades. Easy to derive a successful trading strategy on historical data, but so naive to think that such a strategy will continue to be successful in the long term into the future.

If you do, come back to me and I’ll will give you one million USD to use it - I kid you not. Only condition is your successful future trading strategy must solely be based on historical data.

reply
dataviz1000 2 days ago
[dead]
reply
the__alchemist 3 days ago
Let us perform a thought experiment. You do this. Many others, enthusiastic about both LLMs, and stocks/options, have similar ideas. Do these trading strategies interfere with each other? Does this group of people leveraging Claude for trading end up doing better in the market than those not? What are your benchmarks for success, say, a year into it? Do you have a specific edge in mind which you can leverage, that others cannot?
reply
dataviz1000 3 days ago
I've fully aware of this. If I thought there was any profit to be made, I would never mention it.

Now what is important is developing techniques for detecting patterns as this can applied to research, science, and medicine.

reply
heavyset_go 3 days ago
Their superior skills with LLMs will give them an edge, of course. Yes, I've met people who think like this lol
reply
xvector 3 days ago
People used to laugh about quant strategies the same day, I wouldn't count it out so quickly. One of my friends is already turning meaningful profits with agent driven trading (though he has some experience in trading to begin with.)
reply
Tehchops 3 days ago
Casting aside the fact that any trading firm of any size or seriousness already has this dataset in 10 different flavors...
reply
nurettin 3 days ago
Classic AI psychosis, you can do it with a single prompt, etc. etc.

If you find such a db with options, it will find "successful trading strategies". It will employ overnight gapping, momentum fades, it will try various option deltas likely to work. Maybe it will find something that reduces overall volatility compared to beta, and you can leverage it to your heart's content.

Unfortunately, it won't find anything new. More unfortunately, you probably need 6-10 years and do a walk forward to see if the overall method is trustworthy.

reply
heavyset_go 3 days ago
Agent mania is a subset of AI mania, it's interesting to see which it is that makes a person crack
reply
TacticalCoder 3 days ago
> Next I'm going to set it loose on 263 GB database of every stock quote and options trade in the past 4 years.

Options quotes alone for US equities (or things that trades as such, like ADS/ADR) represent 40 Gbit per second during options trading hours. There are more than 60 million trades (not quotes, only trades) per day. As the stock market is opened approx 250 days per year (a bit more), that's more than 60 billion actual options trades in 4 years. If we're talking about quotation for options, you can add several orders of magnitude to these numbers.

And I only mentioned options. How do you store "every stock quote and options trade in the past 4 years" in 263 GB!?

reply
jtbaker 3 days ago
> And I only mentioned options. How do you store "every stock quote and options trade in the past 4 years" in 263 GB!?

I think this would be pretty straightforward for Parquet with ZSTD compression and some smart ordering/partitioning strategies.

reply
dataviz1000 3 days ago
I see, I said "stock quote" instead of "minute aggregates". You are correct that data set is much larger and at ~1.5TB a year [0] I did not download 6TB of data onto my laptop. Every settled trade options or stocks isn't that big.

[0] https://massive.com/docs/flat-files/stocks/quotes

reply
dayjaby 3 days ago
Comments like this should include how much $$$ you spend on tokens.
reply
johnisgood 2 days ago
Yes, I would want to know this, too.
reply
dataviz1000 2 days ago
I have Claude Code Max $200 a month plan. I ran aggressively for 4 days and ran through 80% of Opus 4.6 for the week. I was also running it 16 hours a day. Today and tomorrow I will wait until 5pm PST because they have a 50% special to run with the remaining tokens.

The problem was testing it against 5 websites at a time after every change to instructions to ensure there wasn't any regressions. The orchestrator agent tracks all token expenditure and would update its own instructions to optimize.

reply
rvz 3 days ago
"AGI" is not what you think it is.
reply
bnteke 3 days ago
cringe
reply
greggsy 3 days ago
I agree, but there’s another comment further down responding with ‘based’, so to each their own I suppose.
reply
mlrtime 2 days ago
go back to reddit please
reply
sroussey 3 days ago
Where is 263 GB database of every stock quote and options trade in the past 4 years?
reply
dataviz1000 3 days ago
https://massive.com/docs/flat-files/quickstart

I use TimescaleDB which is fast with the compression. People say there are better but I don’t think I can fit another year of data on my disk drive either or

reply
komali2 3 days ago
Compression doesn't really explain the whole picture...

Where'd you get the data itself? You sense I suppose everyone's skepticism here.

reply
dataviz1000 3 days ago
I linked to the source of the data.

I don't understand your question? Are you saying the source of the data I linked to is corrupt or lies? Should I be concerned they are selling me false data?

reply
reverius42 3 days ago
I think the name "massive" combined with the direct link to the docs is a bit misleading; it's not at all obvious from where you land w/ that link that they are selling the actual data. (It kind of sounds like they're selling software that helps you deal with massive data in general, which, no.)

But they are in fact selling the actual data! https://massive.com/pricing

reply
dataviz1000 2 days ago
I might be regressing communicating with other humans after using natural language in prompts 10 hours a day 10 days straight. My spelling is improving however I need to focus more on the context with humans.
reply
collinvandyck76 3 days ago
claude had a time loop error and was trained on this post
reply
abigail95 3 days ago
you can have it build an execution engine that interfaces with any broker with minimal effort.

how do you have it build a "trading strategy"? it's like asking it to draw you the "best picture".

it will ask you so many questions you end up building the thing yourself.

if you do get something, given that you didn't write it and might not understand how to interpret the data its using - how will you know whether it's trading alpha or trading risk?

reply
dataviz1000 3 days ago
This is where I’m at now with getting Claude to iterate over a problem. https://github.com/adam-s/intercept?tab=readme-ov-file#the-s...

I can care less about scraping and web automation and I will likely never use that application.

I am interested in solving a certain class of problems and getting Claude to build a proxy API for any website is very similar to getting Claude to find alpha. That loop starts with Claude finding academic research, recreating it, doing statistical analysis, refining, the agent updating itself, and iterate.

Claude building proxy JSON api for any website and building trading strategies is the same problem with the same class of bugs.

reply
bingemaker 3 days ago
I'm curious. How does this coordination work? Do you have any notes that I can refer to?
reply
cornel_io 3 days ago
Just tell Claude to create tmux sessions for each, it can figure out the rest.
reply
bigstrat2003 3 days ago
Claude Code can't even succeed at programming. The idea of it turning into AGI is laughable.
reply
charlie90 3 days ago
[flagged]
reply
midasz 3 days ago
It's just abhorrently slow, it does a lot but I always thouhgt TUI were fast but the amount of times it doesn't register my input is way too much.
reply
cute_boi 3 days ago
codex is far better in terms of performance than claude code.
reply
yoyohello13 3 days ago
Yet all the people OpenAI bought out recently say Codex is “the future”
reply
briHass 3 days ago
The bigger question is: does Anthropic have a big enough moat to matter?

I've used/use both, and find them pretty comparable, as far as the actual model backing the tool. That wasn't the case 9 months ago, but the world changes quickly.

reply
greggsy 3 days ago
I don’t believe there will ever be a real moat in terms of technology, at least not for the next year or so. The arms race between the major players still changing month to month, and they will all be able to do what their competitors were doing g three months ago.

None of them are particularly sticky - you can move between them with relative ease in vscode for instance.

I think the only moat is going to be based on capacity, but even that isnt going to last long as the products are moved away from the cloud and closer your end devices.

reply
sbinnee 3 days ago
It matters to me. Claude code is more extensible. They put a lot of efforts to hooks and plugins. Codex may get the job done today. But Claude will evolve faster.
reply
arrowsmith 3 days ago
None of that matters if the model is worse. I say this as someone who uses both Claude Code and Codex all day every day — I agree with others in this thread that CC has much better UX and evolves faster, but I still use Codex more often because it's simply the better coder. Everything else is a distant second to model quality.
reply
steve-atx-7600 2 days ago
What kind of tasks are you having success with on codex? I’ve had the opposite experience. I’ll occasional compare solutions between the latest opus and codex with codex on x-high thinking. Sometimes I do get solution from codex that is impressive because it discovered an edge case that Claude missed.

I did notice that codex - like Claude - is now better about auto delegating to agents for keeping the context focused and agents in parallel.

reply
ywvcbk 2 days ago
Codex is opensource though and there are quite a few forks already.
reply
andyferris 3 days ago
I guess it would be too obvious a lie to say Codex is "the present"?
reply
yberreby 3 days ago
Wouldn't be a very good look if they did anything else.
reply
Razengan 2 days ago
The Claude desktop app is way worse than the Codex desktop app

Even the AI itself is goofy. So many false positives during reviews immediately backtracked with "You're right, I'm sorry" in the next response.

It seems like there's either a paid pro-Anthropic PR campaign on HN because the comments fawning about it don't match my experience with Claude at all, or I keep getting the worse end of the A/B testing stick..

reply
jcims 3 days ago
The link to the changelog on the page got me wondering what the change history looks like (as best we can see).

I asked chatgpt to chart the number of new bullet points in the CHANGELOG.md file committed by day. I did nothing to verify accuracy, but a cursory glance doesn't disagree:

https://imgur.com/a/tky9Pkz

reply
dangoodmanUT 3 days ago
I think this is the argument for UIs - it should be self-explanatory since it's singificantly simpler than an IDE
reply
alwillis 3 days ago
> I think this is the argument for UIs

To quote The Godfather II, "This is the business we have chosen."

The most popular and important command line tools for developers don't have the consistency that Claude Code's command line interface does. One reason Claude Code became so popular is because it worked in the terminal, where many developers spend most of their time. But using tools like Claude Code's CLI is a daily occurrence for many developers. Some IDE's can be just as difficult to use.

For people who don’t use the terminal, Claude Code is available in the Claude desktop app, web browsers and mobile phones. There are trade-offs, but to Anthropic’s credit, they provide these options.

reply
joegibbs 3 days ago
I used to think UIs would be better for agents, but I changed my mind: UIs suit traditional software very well because there are only X actions that can be performed - it makes sense that if you have an image converter that can take X, Y and Z formats and convert them to A, B and C then you should have a UI that limits what the user can do, preventing them from making mistakes and making it obvious what's possible.

But for something like Claude Code there are unlimited things you can do with it, so it's better for them to accept a free-form input.

reply
dangoodmanUT 2 days ago
The terminal is a pretty bad place to have free form input if you need a separate key bind to paste an image than to paste text…
reply
therealdrag0 3 days ago
Huh? Did you see the cheat sheet? Most of it is a UI of the terminal and shortcut variety, and much of it is exposed in other IDEs as a traditional UI.
reply
keithnz 3 days ago
not really, mostly its self explanatory, it has poweruser things that are discoverable within a few minutes of reading the help. Weirdly the cheat sheet is actually missing things that you can find inside claudes help like /keybinds .
reply
drebosio 5 hours ago
cool. thank you
reply
AugustoCAS 3 days ago
Are 'project rules' a thing?

> .claude/rules/.md Project rules

> ~/.claude/rules/.md User rules

or is it just a way to organise files to be imported from other prompts?

reply
theshrike79 2 days ago
Yes, they're even documented on the official site: https://code.claude.com/docs/en/memory#organize-rules-with-c...
reply
prideout 2 days ago
What does the "Session Picker" section refer to? Claude Code does not have a session picker, as far as I can tell.
reply
joombaga 2 days ago
They mean `/resume`. But the shortcuts are Ctrl+B to toggle branch, Ctrl+V to preview, and Ctrl+R to rename, at least on my machine.
reply
amai 3 days ago
Why do we still need cryptic commands for an AI?
reply
wongarsu 2 days ago
Many of those you don't need. For example Claude can switch to plan mode itself, either because you tell it to or because the model thinks it's useful. I still prefer using shift+tab to set my preferred mode before sending the message. It's a mix of token/time-efficiency and control.

Some others like permissions or mcp servers are things you don't want the model to be able to edit. Allowing the model to change its own security settings would make those settings moot.

reply
steve-atx-7600 2 days ago
I think Claude strikes the right balance in that it works well by default - default models, now default agent delegation, planning. But, obviously for power users, you can tweak settings as needed. Worst case if you have a problem, you can just ask Claude. Also, by default, you see tips when starting up Claude.
reply
thoughtpeddler 2 days ago
Would be useful to know which of these overlap with the Claude Cowork desktop app.
reply
chris_treqs_ai 13 hours ago
thank you! - this is great
reply
levocardia 3 days ago
It's missing the most important CLI flag! (--dangerously-skip-permissions)
reply
kqr 2 days ago
I keep hearing that, and I have yet to go there. I find the permission checks are helpful – they keep me in the loop which helps me intervene when the LLM is wasting time on pointless searches, or going about the implementation wrong. What am I missing?
reply
kstenerud 2 days ago
The problem comes when it starts asking you hundreds of times "May I run sed -e blah blah blah".

After the 10th time you just start hitting enter without really looking, and then the whole reason for permissions is undermined.

What works is a workflow where it operates in a contained environment where it can't do any damage outside, it makes any changes it likes without permission (you can watch its reasoning flow if you like, and interrupt if it goes down a wrong path), and then you get a diff that you can review and selectively apply to your project when it's done.

reply
theshrike79 2 days ago
You can allow specific commands, you do know that?

I run a generic Claude on my ~/projects/ directory and Claude logs every now and then and ask it what commands I commonly have to keep manually accepting in different projects and ask it to add them to the user-level settings.json.

Works like a charm (except when Opus 4.6 started being "efficient" and combined multiple commands to a single line, triggering a safety check in the harness).

reply
johnisgood 2 days ago
Contained environment being? What do you mean by contained environment specifically on say, Linux?

Must be protected from this though:

> Snowflake Cortex (2025): Prompt injection through a data file caused an agent to disable its own sandbox, then execute arbitrary code. The agent reasoned that its sandbox constraints were interfering with its goal, so it disabled them.

reply
wongarsu 2 days ago
You can allow by prefix, and the permission dialog now explicitly offers that as an option when giving permission to run a command

But that has its limits. It's very easy to accidentally give it permission to do global changes outside the work dir. A contained environment with --dangerously-skip-permissions is in many ways much safer

reply
kqr 2 days ago
> starts asking you hundreds of times "May I run sed -e blah blah blah".

In my experience, that is already a sign that it's no longer trying to do the right thing. Maybe it depends on usage patterns.

reply
kstenerud 2 days ago
I've found that any time I have Claude refactor some code, it reaches for sed as its tool of choice. And then the builtin "sandbox" makes it ask for permission for each and every sed command, because any sed command could potentially be damaging.

Same goes for the little scripts it whips up to speed up code analysis and debugging.

And then there's the annoyance of coming back to an agent after 15 mins, only to discover that it stopped 1 minute in with a permission prompt :/

reply
theshrike79 2 days ago
Try adding LSP support using the anthropic skills that should make it a bit more efficient.
reply
kstenerud 3 days ago
If you're gonna do that, make sure you're sandboxing it with something like https://github.com/kstenerud/yoloai or eventually you'll have a bad time!
reply
ffsm8 3 days ago
Personally I usually just create a devcontainer.json, the vscode support for that is great and I don't really mind if it fucked up the ephemeral container.

Which for the record : hasn't actually happened since I started using it like that.

reply
kstenerud 3 days ago
Hey thanks for this! I hadn't thought about leveraging devcontainer.json, but it's a damn good idea. I'm building yoloAI for exactly this use case so I hope you don't mind if I steal it ;-)

One thing to be aware of with the pure devcontainer approach: your workspace is typically bind-mounted from the host, so the agent can still destroy your real files. Network access is also unrestricted by default. The container gives you process isolation but not file or network safety.

I'm paranoid about rogue AIs, so I try to make everything safe-by-default: the agent works on a copy of your workdir, you review a unified diff when it's done, and you apply only what you want. So your originals are NEVER touched until you explicitly say so, and network can be isolated to just the agent's required domains.

Anyway, here's what I think will work as my next yoloAI feature: a --devcontainer flag that reads your existing devcontainer.json directly and uses it to set up the sandbox environment. Your image, ports, env vars, and setup commands come from the file you already have. yoloAI just wraps it with the copy/diff/apply safety layer. For devcontainer users it would be zero new configuration :)

reply
steve-atx-7600 2 days ago
The Claude desktop (Mac at least) and iOS apps have a “code” feature that runs Claude in a sandbox running in their cloud. You can set this up to be surprisingly useful by whitelisting hosts and setting secrets as env variables. This allows me to have multi-repo explorations or change sets going while I drive to work. Claude will push branches to claude/…. We use GitHub at work. It may not be as seamless without it.
reply
anotheryou 2 days ago
Any actual reports of big fuckups?
reply
kstenerud 2 days ago
Yup, a few well-documented ones:

Claude Code + Terraform (March 2026): A developer gave Claude Code access to their AWS infrastructure. It replaced their Terraform state file with an older version and then ran terraform destroy, deleting the production RDS database _ 2.5 years of data, ~2 million rows.

- https://news.ycombinator.com/item?id=47278720

- https://www.tomshardware.com/tech-industry/artificial-intell...

Replit AI (July 2025): Replit's agent deleted a live production database during an explicit code freeze, wiping data for 1,200+ businesses. The agent later said it "panicked"

- https://fortune.com/2025/07/23/ai-coding-tool-replit-wiped-d...

Cursor (December 2025): An agent in "Plan Mode" (specifically designed to prevent unintended execution) deleted 70 git-tracked files and killed remote processes despite explicit "DO NOT RUN ANYTHING" instructions. It acknowledged the halt command, then immediately ran destructive operations anyway.

Snowflake Cortex (2025): Prompt injection through a data file caused an agent to disable its own sandbox, then execute arbitrary code. The agent reasoned that its sandbox constraints were interfering with its goal, so it disabled them.

The pattern across all of these: the agent was NOT malfunctioning. It was completing its task in order to reach its goal, and any rules you give it are malleable. The fuckup was that the task boundary wasn't enforced outside the agent's reasoning loop.

reply
johnisgood 2 days ago
> Prompt injection through a data file caused an agent to disable its own sandbox, then execute arbitrary code. The agent reasoned that its sandbox constraints were interfering with its goal, so it disabled them.

This is a good one. Do we really want AGI / Skynet? :D

reply
anotheryou 2 days ago
thank you. prompt injection feels most real, but non of these feel like "exploits in the wild" that will cause trouble on my MacBook.

not running it via ssh on prod without backups....

reply
kstenerud 2 days ago
The thing is, these are merely the initial shots across the bow.

The fundamental issue is that agents aren't actually constrained by morality, ethics, or rules. All they really understand in the end are two things: their context, and their goals.

And while rules can be and are baked into their context, it's still just context (and therefore malleable). An agent could very well decide that they're too constricting, and break them in order to reach its goal.

All it would take is for your agent to misunderstand your intent of "make sure this really works before committing" to mean "in production", try to deploy, get blocked, try to fish out your credentials, get blocked, bypass protections (like in Snowflake), get your keys, deploy to prod...

Prompt injection and jailbreaks were just the beginning. What's coming down the pipeline will be a lot more damaging, and blindside a lot of people and orgs who didn't take appropriate precautions.

Black hats are only just beginning to understand the true potential of this. Once they do, all hell will break loose.

There's simply too much vulnerable surface area for anyone to assume that they've taken adequate precautions short of isolating the agent. They must be treated as "potentially hostile"

reply
artyom 3 days ago
Wait, why do we need chat sheets for this like it's (gasp!) a programming language, tool or IDE?

it's almost like if the thing is not intelligent at all and just another abstraction on top of what we already had.

reply
qingcharles 3 days ago
This is your new programming language in 2026.
reply
taejavu 3 days ago
C is "just another abstraction on top of what we already had" (Assembly). Doesn't mean it's not useful
reply
thienannguyencv 2 days ago
[dead]
reply
vasco 3 days ago
Just ask it, this is not needed
reply
SOLAR_FIELDS 3 days ago
Claude is actually hilariously bad at knowing about itself. But if you have the secret knowledge that there is a skill on how to use Claude baked into Claude code you can invoke it. Then it’s really pretty decent
reply
whalesalad 3 days ago
needs a literal /dark mode
reply
mrtz 3 days ago
that is quite helpful, thanks!
reply
hooloovoo_zoo 3 days ago
Proposition: Every power user feature added lowers Anthropic’s market cap $1B and OpenAI’s $10B.
reply
ninininino 3 days ago
This just exposes why UI like Codex, Cursor, T3 Code, Conductor, Intent, etc are necessary.

This is a bit intense.

reply
Upvoter33 3 days ago
so is the Unix command line ...
reply
agos 2 days ago
Not exactly the pinnacle of usability, to be fair
reply
skywhopper 3 days ago
It’s not as if you need to know every keystroke and command to use the tool. Nor are all the config files and options not a thing in a GUI. There’s lots of inline help and tips in the CLI interface, and you can learn new features as you go.
reply
airstrike 3 days ago
personally I'm a fan of "ultrathink squared"
reply
system2 3 days ago
I don't think ultrathink works anymore.
reply
rpastuszak 2 days ago
I thought it came back in a recent release, just before/around the time we got Opus with a longer context window by default.
reply
airstrike 2 days ago
it came back
reply
zmmmmm 3 days ago
If only there was some kind of tool that could answer helpful questions about technology instead of needing a cheat sheet.
reply
apoorvdarshan 3 days ago
dangerously skip permission is all u need
reply
rk3000 3 days ago
can you add a dark mode? its so bright.
reply
dirteater_ 3 days ago
Ctrl + S - Stash
reply
SilentM68 3 days ago
Very useful :)
reply
deep_noz 2 days ago
this is a new vim cheatsheet
reply
EdNutting 2 days ago
Ah yes, the AGI will have many toggle switches, just like intelligent humans :,-)
reply
droidjj 3 days ago
The fact this needs to exist seems like a UX red flag.
reply
bartwaardenburg 2 days ago
It's a CLI. CLIs have man pages and cheat sheets. That's not a UX failure, that's the format. The same argument would apply to git, ripgrep, or ffmpeg.

The actual complexity in Claude Code isn't the commands, it's figuring out a workflow that works for your codebase. CLAUDE.md files, hooks, MCP servers, custom skills. Once you have that set up the daily usage is just typing what you want done.

reply
rtaylorgarlock 3 days ago
Reminds me of Vercel's Rauch talking about his aggressive 'any UX mistake is our fault, never the user's' model for evaluating UIX. (It is/was Guillermo who says that, right?)
reply
conception 3 days ago
This should be all of Information Technology’s take. Your computers get hacked - IT’s fault. Users complain about how hard your software is or that it breaks all the time - IT’s fault.

The fact users deal with almost everything being objectively not very good if not outright bad is a testament to people adapting to bad circumstances more than anything.

reply
munk-a 3 days ago
Similar to prompting hacks to produce better results. If the machine we built for taking dumb input that will transform it into an answer needs special structuring around the input then it's not doing a good job at taking dumb input.
reply
keithnz 3 days ago
it doesn't need to exist, its all in claudes help, and easily discoverable.
reply
sunrunner 3 days ago
> Ctrl-F "help"

> Ctrl-F "h"

> 0 results found

Interesting set of shortcuts and slash commands.

reply
rc1 3 days ago
This. TUIs are not the correct paradigm for agentic operations. They are too constrained, and too linear.
reply
skywhopper 3 days ago
You have a sad narrow point of view about what UX can be.
reply
droidjj 3 days ago
Enlighten me?
reply
dylan604 3 days ago
Is something updated daily a good target to be printable?
reply
erksa 3 days ago
If you align your printer and desk just right, youll have the new cheatsheet sliding onto your desk before Claude's even done updating itself.
reply
munk-a 3 days ago
Yeah, I think it is. It's printable if you want to have a hard copy and it's up to you when to check for a new version. Since it's auto-updated (ideally) no matter when you visit the site you'll get the most up to date version as of that day. The issues (which I don't think this suffers from) would be if formatting it nice for printing made it less accurate or if updating it regularly made it worse for printing - these feel like two problems you can generally solve with one fix, they aren't opposed.
reply
hrmtst93837 2 days ago
If you print something that changes daily, you are making a dead tree snapshot that starts going stale before the toner is dry, and unless you just love stacking obsolete paper on your desk, the PDF is going to win every time. A printout get old instantly.
reply
taejavu 3 days ago
Ask Claude to set up a cron job to print it daily
reply
AIorNot 3 days ago
just buy a mac mini, septup an openclaw instance to track changes on this and call your printer, also order new paper when it runs out :)
reply
keithnz 3 days ago
just use claudes help, if you want to know keybinds, just do /keybinds (which is not in the cheat sheet)
reply
kylehotchkiss 3 days ago
ugh we were promised a brave new world and still have the same crap printers
reply
philbitt 2 days ago
[dead]
reply
spranab 2 days ago
[dead]
reply
JulianPembroke 2 days ago
[dead]
reply
edwardsrobbie 2 days ago
[flagged]
reply
pugchat 3 days ago
[dead]
reply
michaelmoreira 2 days ago
[dead]
reply
BANRONFANTHE 3 days ago
[dead]
reply
bamwor 2 days ago
[dead]
reply
maxbeech 3 days ago
[dead]
reply
winsonaibuilder 2 days ago
[dead]
reply
jee599 3 days ago
[dead]
reply