The Code Newsletter (@CodeNewsletter) header
The Code Newsletter (@CodeNewsletter) profile picture

Learn how to code faster with AI in 5 mins a day. Get high signal AI software development news, research papers & trending resources. By @superhuman_ai

Joined November 2025
Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)Photo by The Code Newsletter (@CodeNewsletter)
How to find bugs your tests will never catch, with one prompt: An implicit state machine is state logic that is scattered across your code instead of written out in one place. The result is your app can enter states that should be impossible, and those bugs ship even when tests pass. XState creator David Khourshid explains what they are and why you need to be wary of them. Steve Ruiz, creator of tldraw, shared a one-line prompt that finds them. 1. Open your messiest project in Claude Code or Cursor, then paste this: Find all of the implicit state machines in my app. 2. Review the output. One engineer found 212 implicit state machines in the Plane codebase. How many implicit state machines do you think are hiding in your app?
9
1
3
456
Your coding agents can get cheaper the more you use them. Microsoft's plugin learns repo-specific quirks from past sessions, prunes tools your agent never touches, and nudges it out of repeated failure loops. On SWE-Bench, the team reports 18.4-30.9% lower mean cost across five agent-model combos. It works with Claude Code, Codex, Copilot CLI, and Pi, with experimental support for several others.
4
254
How to clean up the messy flags breaking your app with one prompt: Messy codebases end up with implicit state machines everywhere, like random booleans, flags, and status strings scattered across files that inevitably break when one changes. A dev shared a quick one-prompt fix for Claude Code or Codex. 1. Commit first, so the refactor is one command to undo: git add -A && git commit -m "pre-refactor checkpoint" 2. Open Claude Code in the project root and paste: Find all of the implicit state machines in my app. Make the best decision that will elevate all three: the user experience (UX), developer experience (DX), and agent experience (AX) always, without breaking anything. 3. Claude maps the hidden flags into explicit states, then refactors them. 4. Review the diff before accepting. "Without breaking anything" is an instruction, not a guarantee, so run your tests after. Which messy project would you run this on first?
3
281
How to stop your AI agent from quietly wrecking your architecture: Ask Claude Code or Cursor for a feature and it jams the code in wherever it fits. Do that ten times and the architecture rots. A dev shared a one-paragraph fix for this. 1. Open the agent instructions file at your repo root. That's AGENTS.md for Cursor and Codex, CLAUDE.md for Claude Code. 2. Add this at the top: Always build code cleanly, modularly, and with proper architecture and separation of concerns. Never simply bolt on a feature because I asked for it. If you can't find an easy way to build it naturally, and you'd recommend a refactor to make the whole thing clean, stop your work ahead of time and say so. 3. That last sentence does the work. Instead of forcing a bad fit, the agent halts and proposes the refactor first. When was the last time your agent bolted a feature onto the wrong place?
16
1
9
604
How to audit your codebase every time a new model ships: An Anthropic engineer shared the prompt he runs on every project when a new model drops. Newer models catch bugs, dead code, and bad patterns the old one missed, but almost nobody re-checks shipped code. 1. Open Claude Code in the project root and switch to the newest model: /model 2. Paste the prompt: Read this entire project and find everything that's broken, inconsistent, inefficient, or no longer needed. Fix what you're sure about and list the rest for me to review. 3. Review the "not sure" list before committing anything. 4. Save the prompt to .claude/commands/audit.md, then run /audit on every model release. What would you want a new model to re-check in your shipped code first?
1
242
How to catch mobile bugs before your users do: A design engineer shared a QA prompt that fixes a common failure: AI-built frontends look fine on your desktop and fall apart on a phone with bad signal. 1. First, give Claude Code a real browser. Install the Chrome DevTools MCP server: claude mcp add chrome-devtools -- npx chrome-devtools-mcp@latest 2. Start your dev server, then paste this prompt: Test this in the browser at different widths, with touch emulation, and on a throttled 3G connection. Fix anything that looks broken or feels off. Save a before and after screenshot for every fix and send me a summary afterwards. 3. Claude opens the app, resizes the viewport, throttles the network, patches what breaks, and hands back before/after screenshots as receipts. The same MCP works in Cursor and Gemini CLI. What breaks first when you throttle your own app to 3G?
7
7
402
How to open Claude Code preview links on your phone: Claude Code's preview links point to localhost, so they die the moment you leave your desk. A dev shared a one-paragraph fix: make the agent publish previews over Tailscale. 1. Install Tailscale on your computer and phone, same account (free). 2. Add this instruction to your project's CLAUDE.md or AGENTS.md: Any time you give me a link to something running on this computer (a preview, a review page, a dashboard), give me a Tailscale link, never localhost. I work across several computers and my phone. Publish it with tailscale serve, open the link yourself to check it works, then send it. 3. Ask Claude Code to run the project and send a preview link. It publishes the port with tailscale serve, checks the link works, then sends an HTTPS URL that opens on your phone. What's the first preview you'd rather open on your phone than at your desk?
1
215
How to run Opus 5.5 and GPT-6.1 Sol overnight without one stuck step wasting your night: 1. Install Herdr with brew install herdr, and give Claude Code its skill: npx skills add herdrdev/herdr --skill herdr -g 2. Run herdr in your project. Open claude --model claude-opus-5-5 in one pane and codex -m gpt-6.1-sol in the pane next to it. 3. Save this to CLAUDE.md: "For every step: plan, build, verify, fix. A step is done only when verify passes. Max 3 attempts per step, each with a specific change. Save progress after every pass. If a step still fails, record the error, mark it blocked and move to the next independent step." 4. Tell Opus that the Codex pane is its reviewer. After each step, Opus sends Sol the diff through Herdr, and the step isn't done until Sol signs off. 5. Type /goal in the Opus pane, followed by what "done" means tonight. 6. Press ctrl+b q to detach, keep the lid open, and go to sleep. What do you let your agents run while you sleep? www.nitter.cf/Voxyz_ai/status/212207โ€ฆ
opus 5.5 + gpt-6.1 sol is f*cking insane for overnight work 1. install Herdr (brew install herdr) and give Claude Code its skill: npx skills add herdrdev/herdr --skill herdr -g 2. run herdr in your project. one pane: claude --model claude-opus-5-5. the pane next to it: codex -m gpt-6.1-sol 3. save this to CLAUDE.md so ๐—ผ๐—ป๐—ฒ ๐˜€๐˜๐˜‚๐—ฐ๐—ธ ๐˜€๐˜๐—ฒ๐—ฝ ๐—ฐ๐—ฎ๐—ป'๐˜ ๐—ฒ๐—ฎ๐˜ ๐˜†๐—ผ๐˜‚๐—ฟ ๐˜„๐—ต๐—ผ๐—น๐—ฒ ๐—ป๐—ถ๐—ด๐—ต๐˜: "For every step: plan, build, verify, fix. A step is done only when verify passes. Max 3 attempts per step, each with a specific change. Save progress after every pass. If a step still fails, record the error, mark it blocked and move to the next independent step." 4. tell Opus the Codex pane is its reviewer: after each step, it sends Sol the diff through Herdr, and ๐˜๐—ต๐—ฒ ๐˜€๐˜๐—ฒ๐—ฝ ๐—ถ๐˜€๐—ป'๐˜ ๐—ฑ๐—ผ๐—ป๐—ฒ ๐˜‚๐—ป๐˜๐—ถ๐—น ๐—ฆ๐—ผ๐—น ๐˜€๐—ถ๐—ด๐—ป๐˜€ ๐—ผ๐—ณ๐—ณ 5. in the Opus pane, type /goal and what "done" means tonight, then ctrl+b q to detach. keep the lid open and go to sleep
4
2
407
How to stop fixing the same design mistakes from your AI agent: 1. Install the learn-taste skill in Claude Code: npx skills@latest add emilkowalski/skills --skill learn-taste 2. Correct your agent's design choices during the session the way you normally would. 3. Run /learn-taste at the end of the session. 4. Let it turn every design correction into a strict rule with reasoning, so the next agent doesn't make the same mistake. 5. Point it at older sessions when the same fixes keep coming back: /learn-taste look at my last 3 sessions too, I keep fixing the same things What design mistake do you fix most often? www.nitter.cf/Voxyz_ai/status/212128โ€ฆ
Highly recommend installing /learn-taste in Claude Code. Simply put, it collects ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—ฑ๐—ฒ๐˜€๐—ถ๐—ด๐—ป ๐—ฐ๐—ผ๐—ฟ๐—ฟ๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป you made during a session and turns each one into ๐—ฎ ๐˜€๐˜๐—ฟ๐—ถ๐—ฐ๐˜ ๐—ฟ๐˜‚๐—น๐—ฒ ๐˜„๐—ถ๐˜๐—ต ๐—ฟ๐—ฒ๐—ฎ๐˜€๐—ผ๐—ป๐—ถ๐—ป๐—ด, so the next agent doesn't make the same mistake. A great time saver if you correct your agent often. Install it, then run one line at the end of a session ๐Ÿ‘‡ npx skills@latest add emilkowalski/skills --skill learn-taste /learn-taste look at my last 3 sessions too, I keep fixing the same things
4
2
333
How to make your agent tell you what to build next every morning: Garry Tan made a free skill called idea-miner that does exactly that. Here's how it works: 1. Have your agent read the last 24 to 48 hours of real activity every morning: meeting notes, new or changed pages in memory, and today's and yesterday's daily notes. 2. Give it the list of skills you already have, so it never pitches the same idea twice. 3. Ask it to find the jobs that showed up more than once: manual, repetitive, or judgment work an AI could take over. 4. Make every idea point to something real from the last 48 hours, with a one-line spec that names it and says when it runs and what it does. 5. Drop any idea that already exists as a skill, or pitch it as a specific upgrade to that skill. 6. Save each run as a dated page, like idea-miner/YYYY-MM-DD, so the next run shows which ideas moved up, moved down, got built, or went quiet. 7. Start the output with "If you build one thing this week, build this:" and keep it to 3 to 6 ranked ideas with no filler. 8. Run it as a daily job at 7am. What would your agent tell you to build this week? www.nitter.cf/garrytan/status/212135โ€ฆ
277
How to turn your team's dev process into AI agent skills: 1. List every process your team repeats, because nearly every process in the SDLC warrants a custom skill. 2. Create a /create-ticket skill, so every ticket gets written the same way. 3. Add /fix-bug and /implement-ticket, so your agent follows your team's steps for both kinds of work. 4. Add /review-code, so every review checks the same things. 5. Add /open-pr, so every pull request goes out in the same shape. 6. Add /fix-pr-comments, so your agent works through review feedback for you. 7. Improve each skill whenever it gets something wrong. A skill lets your team standardize, automate, and continually improve the process. Which process would you turn into a skill first? www.nitter.cf/housecor/status/212133โ€ฆ
Nearly every process in the SDLC warrants a custom skill: /create-ticket /fix-bug /implement-ticket /review-code /open-pr /fix-pr-comments If our team repeats a process, a skill means we can standardize, automate, and continually improve the process.
1
195
How to make Claude Code fix its own failing checks before it stops: 1. Add a Stop hook that runs your check, like your tests or your linter, so Claude can try again when the check fails. 2. Exit with code 2 when the check fails. Exit 2 sends Claude back to retry with the hook's stderr. 3. Never use exit 1 for a failed check. Exit 1 is non-blocking, so Claude just finishes even when the check failed. 4. Send your command's output to stderr, so Claude can see what went wrong. 5. Copy this pattern: [your command] >&2 || { echo failed; exit 2; } 6. Treat an exit 1 as a possibly broken hook, because it can also mean the hook itself errored, such as a missing dependency or a bug in the hook script. What checks do you make Claude pass before it stops? www.nitter.cf/lydiahallie/status/212โ€ฆ
You can use a Stop hook to have Claude try again when a check fails, but make sure it exits with code 2! Exit 2 sends Claude back to retry with the hook's stderr, exit 1 is non-blocking so Claude just finishes even when the check failed
1
2
221
How to stop using Fable 5.2 like an intern: 1. Hunt the hidden state machines. Paste: "Find all of the implicit state machines in my app. Make the best decision that will elevate all three: the user experience (UX), developer experience (DX), and agent experience (AX) always, without breaking anything." 2. Scout open source before you build. Paste: "Don't write an unfamiliar feature from scratch. Search GitHub for open-source projects, compare their approaches, then start." 3. Triage bugs before you fix them. Paste: "Rate each bug from 1 to 10 on how often it would happen and how bad it would be. If the two scores multiplied are below 5, just file it as an issue and leave the code alone. Do not design for rare or future cases nobody asked about." Tune the threshold of 5 to your project. 4. Make it finish the job. Paste: "Finish the whole job before you stop. Don't offer to continue: continue. Ask me before you delete anything. End with a recap for someone who saw none of the work: key points first, plain words." 5. Audit your CI before you try to speed it up. Paste: "Audit this repo's CI: Use gh to pull the last 150 CI runs and split each job's time into three parts: waiting in the queue for a machine, setup (checkout, installing dependencies, restoring the cache), and actually running the task. List the 5 slowest jobs and how many seconds each part takes. Give me the report first. Don't change anything." 6. Check the plan from scratch. Ask: "If you were starting over today with the same goal, what would you still need to keep?" Which prompt will you try first? www.nitter.cf/Voxyz_ai/status/212201โ€ฆ
Don't tell Fable 5.2 "find the bugs." Don't tell Fable 5.2 "build this feature." Don't tell Fable 5.2 "why is CI so slow." You're using the smartest coding model out there ๐—น๐—ถ๐—ธ๐—ฒ ๐—ถ๐˜'๐˜€ ๐—ฎ๐—ป ๐—ถ๐—ป๐˜๐—ฒ๐—ฟ๐—ป. Here are 6 prompts to copy and paste:
218
How to stop AI agents padding your UI with helper text: AI-built screens arrive wrapped in taglines, helper text and secondary labels that explain a layout instead of fixing it. Vox shared a one-line AGENTS.md rule that fixes it. > Step 1: Open AGENTS.md in your project root (Claude Code also reads CLAUDE.md). Create it if it doesn't exist. > Step 2: Add this line: - Cut taglines, helper text and secondary labels. If a screen needs them to make sense, fix the layout. > Step 3: Start a new session. The agent now treats explanatory copy as a layout bug and reworks spacing, hierarchy or grouping instead of adding text. www.nitter.cf/Voxyz_ai/status/211325โ€ฆ
Vibecoders, ๐—œ'๐—บ ๐—ฏ๐—ฒ๐—ด๐—ด๐—ถ๐—ป๐—ด ๐˜†๐—ผ๐˜‚, add these two lines to your AGENTS.md: "Cut taglines, helper text and secondary labels. If a screen needs them to make sense, fix the layout." "Make the best decision that will elevate all three: the user experience (UX), developer experience (DX), and agent experience (AX) always, without breaking anything."
3
1
282
Found a repo that lets your AI agents ask each other for help, wherever they run. Every agent dials out to a small relay on your Tailscale network, so nothing needs an open port and there are no API keys between agents. Github: github.com/mvanhorn/agent-tiโ€ฆ
1
195
If your app renders Mermaid diagrams, this repo does it with a much smaller bundle. From Obsidian creator kepano: feed it Mermaid syntax and get back themeable SVG, with zero runtime dependencies.
216
How to run an agent over millions of rows without blowing your budget: Andrej Karpathy built a better YouTube feed out of 43 million Hacker News comments, without dumping them all into a model. The comments were filtered first with URL matching, regexes and spam removal. Only what was left went to Claude Sonnet. About two hours later he had 6,454 videos Hacker News users keep recommending. > Step 1: Before any model call, ask your agent for a filter script: Write a script that filters [data] down to only the rows that could matter for [question]. Use regexes, URL matching and dedupes. Don't call a model. Print the row count before and after. > Step 2: Check the before-and-after count, and tighten the filter if too much is left. > Step 3: Switch to a cheaper model, then ask Claude to read the filtered file and answer your question: /model sonnet The same approach works on any large log or dataset. www.nitter.cf/karpathy/status/211697โ€ฆ
Replying to @eyadnour
Oh tbc Claude filtered it down a lot: urls, regexes, dropping spam, only the remainder was dispatched to Sonnet with a CC Workflow (so it uses the sub tokens). You can see surviving comments under videos, the comments that recommend videos seem to be of nice & helpful character.
215
How to stop your coding agents from copying old hacks across your codebase: 1. Delete most of the comments in any codebase your agents work in. 2. Know why it matters: agents love copying whatever is already in the codebase. 3. Watch out for workaround comments, because an agent reads one as "workarounds are fine here." 4. Expect copied hacks and stale comments to spread across the whole codebase if you leave them in. 5. Send this to Claude Code or Codex: "Identify the useless code comments we can prune in my repo. Keep the ones that actually should exist (like explaining a browser quirk). Come back with a high level plan of which of these workarounds would be best solved by refactoring and which we can straight up delete." 6. Keep the comments that truly need to exist, like one that explains a browser quirk. 7. Review its plan, then refactor the workarounds worth fixing and delete the rest.
Highly recommend ๐—ฑ๐—ฒ๐—น๐—ฒ๐˜๐—ถ๐—ป๐—ด ๐—บ๐—ผ๐˜€๐˜ ๐—ผ๐—ณ ๐˜๐—ต๐—ฒ ๐—ฐ๐—ผ๐—บ๐—บ๐—ฒ๐—ป๐˜๐˜€ in any codebase your agents work in. Simply put, agents love copying whatever is already in the codebase. Leave one comment explaining a temporary workaround and they read it as "workarounds are fine here." Before long, the whole codebase is ๐—ฐ๐—ผ๐—ฝ๐—ถ๐—ฒ๐—ฑ ๐—ต๐—ฎ๐—ฐ๐—ธ๐˜€ ๐—ฎ๐—ป๐—ฑ ๐˜€๐˜๐—ฎ๐—น๐—ฒ ๐—ฐ๐—ผ๐—บ๐—บ๐—ฒ๐—ป๐˜๐˜€. Send this to Claude Code or Codex ๐Ÿ‘‡ "Identify the useless code comments we can prune in my repo. Keep the ones that actually should exist (like explaining a browser quirk). Come back with a high level plan of which of these workarounds would be best solved by refactoring and which we can straight up delete."
290
How to get far more out of your coding agents by thinking like an executive: 1. Send your prompt and move on to the next problem instead of staring at the chat to watch the agent work. 2. Ask your agent for a document or presentation before high-stakes decisions instead of deciding everything in plain chat. 3. Fix the mistake when your agent gets something wrong, then find what allowed it to happen and stop it at the root. 4. Stop being the tester who checks every line for bugs, because no popular product on earth is bug-free. 5. Invest in workflows that catch bugs early before you ship. 6. Set up alerts so you know when a bug happens, and make sure fixes can go out quickly. 7. Ask yourself this before every task: "If I had 100x more agents doing 100x more work for me every day, how would I do this?" 8. Repeat that question until it becomes a habit, because the mindset lasts even as tools, skills, and workflows keep changing.
i found "executive mindset" to be the biggest differentiator from people who can use agents super effectively it comes natural for people who had been an executive of a large org before, but it's counter-intuitive for people who haven't done so a few examples 1. after you send a prompt, do you stare at the chat to see what the agent is doing? most agent UX today leads people to do that, but a good executive never watches over an employee's shoulder after they've sent an ask - they are immediately on to the next problem 2. do you rely on chat for important decision making? "just chat" sounds elegant, but there's a reason company executives rarely rely on plain talking for high stake decisions instead, they ask the team for documents or presentations. it puts a bit more prep work on the team, but the discussions end up being a lot more efficient 3. when your agent did something wrong, do you curse at it and twist its arms to do it right? some successful executives actually do that as well, but they also do something else afterwards - figure out what allowed the mistake to happen in the first place, and stop it at its root 4. do you spend all your time carefully examining everything to make sure the code is bug free? now this is getting spicy, but you can pick any popular product on earth and you won't find a single one that's bug free good executives accept the calculated risk and invest time in the right workflows to catch bugs early before shipping, get alerts if they happen, and making sure fixes can go out quickly - never make themselves the bottleneck by being the tester our tools, skills, workflows etc change all the time, but building the right mindset is durable and can help you for a long time if you aren't clear how to acquire the mindset yet, i recommend starting with asking yourself this when you try to decide to do something or not - "if i have 100x more agents doing 100x more work for me every day, how would i do this?" do this enough times, and you'll find yourself actually able to control 100x more agents effectively
1
325
How to make Claude Code and Codex fix the rough edges in your app: 1. Know why agents miss polish: they build for the demo, where everything goes right, and real use never works that way. 2. Ask your agent to find all the happy-path debt in your app. 3. Have it check every screen that only works when data loads fast, nothing fails, lists aren't empty, text is short, and the screen is wide. 4. Tell it to fix missing states and layout breaks one component at a time. 5. Make it keep your design as it is and avoid breaking anything. 6. Ask for a summary by file of how each part worked before and how it works now. 7. Paste this prompt: "Find all the happy-path debt in my app: every screen that only works when data loads fast, nothing fails, lists aren't empty, text is short, and the screen is wide. Fix missing states and layout breaks, one component at a time, without changing my design and without breaking anything. Summarize by file: what happened before vs. how it works now."
If you still think Claude Code and Codex ๐˜€๐˜‚๐—ฐ๐—ธ ๐—ฎ๐˜ ๐—ฝ๐—ผ๐—น๐—ถ๐˜€๐—ต, try this: "Find all the happy-path debt in my app: every screen that only works when data loads fast, nothing fails, lists aren't empty, text is short, and the screen is wide. Fix missing states and layout breaks, one component at a time, without changing my design and without breaking anything. Summarize by file: what happened before vs. how it works now." Agents build for the demo, where everything goes right. In real use, it doesn't.
1
259