Live data from Hacker News

Claude Code Cheat Sheet

cc.storyfox.cz

121–130 of 215 posts

Re: Claude Code Cheat Sheet

#121
post #2

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 t…

What version of Claude Code is this? I don't have the /cost command mentioned here.

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.

Re: Claude Code Cheat Sheet

#124

Earlier quoted context omitted.

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... Re…

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....

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"

Re: Claude Code Cheat Sheet

#125
post #119

Earlier quoted context omitted.

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…

> 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.

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 :/

Re: Claude Code Cheat Sheet

#126
post #6

The fact this needs to exist seems like a UX red flag.

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.

Re: Claude Code Cheat Sheet

#127
post #2

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 t…

What version of Claude Code is this? I don't have the /cost command mentioned here.

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

Re: Claude Code Cheat Sheet

#128
post #42

Earlier quoted context omitted.

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…

cringe

[flagged]

Re: Claude Code Cheat Sheet

#129
post #20

Earlier quoted context omitted.

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.

True. I had an iPhone with a broken digitizer so I just plugged a USB keyboard and mouse into it and it worked great.

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.)

Post reply on HN