<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NewtechFiend</title>
    <description>The latest articles on DEV Community by NewtechFiend (@drippy).</description>
    <link>https://dev.to/drippy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3974963%2Fe06d0079-9fe3-446a-a695-6c28977f595c.png</url>
      <title>DEV Community: NewtechFiend</title>
      <link>https://dev.to/drippy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/drippy"/>
    <language>en</language>
    <item>
      <title>How I Configured Cursor to Stop Breaking My Codebase</title>
      <dc:creator>NewtechFiend</dc:creator>
      <pubDate>Tue, 09 Jun 2026 00:20:19 +0000</pubDate>
      <link>https://dev.to/drippy/how-i-configured-cursor-to-stop-breaking-my-codebase-3ok4</link>
      <guid>https://dev.to/drippy/how-i-configured-cursor-to-stop-breaking-my-codebase-3ok4</guid>
      <description>&lt;p&gt;If you use Cursor, Claude Code, or Windsurf daily, you've probably had this experience:&lt;/p&gt;

&lt;p&gt;You open a fresh chat, ask for a small fix, and twenty minutes later the AI has rewritten your API layer, added three new dependencies, and switched your data-fetching pattern "for consistency."&lt;/p&gt;

&lt;p&gt;The model isn't broken. It's contextless.&lt;/p&gt;

&lt;p&gt;Every new session starts from zero. It doesn't know your stack, your conventions, or the things it must never touch. So you spend the first ten minutes re-explaining — and the last hour undoing.&lt;/p&gt;

&lt;p&gt;Here's what fixed it for me.&lt;/p&gt;

&lt;p&gt;The real problem isn't prompts&lt;/p&gt;

&lt;p&gt;Most devs collect prompts. Notes app, Slack snippets, old chat threads. That helps for one-off tasks, but it doesn't solve the session problem.&lt;/p&gt;

&lt;p&gt;What you need is persistent context — rules that load automatically before you type anything.&lt;/p&gt;

&lt;p&gt;Two files do this:&lt;/p&gt;

&lt;p&gt;CLAUDE.md — read by Claude Code (and usable as project context elsewhere)&lt;/p&gt;

&lt;p&gt;.cursorrules — loaded by Cursor on every session (rename to .windsurfrules for Windsurf)&lt;/p&gt;

&lt;p&gt;Drop them in your project root. Done.&lt;/p&gt;

&lt;p&gt;What goes in a good config file&lt;/p&gt;

&lt;p&gt;A useful config is not ten lines of "use TypeScript and write clean code." That's too vague to change behavior.&lt;/p&gt;

&lt;p&gt;Mine include:&lt;/p&gt;

&lt;p&gt;Project structure — where pages, components, and API routes live&lt;/p&gt;

&lt;p&gt;Stack + versions — Next.js 14 App Router, not Pages; Zod; shadcn/ui&lt;/p&gt;

&lt;p&gt;Commands — npm run dev, npm run typecheck, npm run test&lt;/p&gt;

&lt;p&gt;Coding conventions — naming, import aliases, Server vs Client Components&lt;/p&gt;

&lt;p&gt;DO NOT section — the most important part (more on this below)&lt;/p&gt;

&lt;p&gt;Workflow notes — use @folder, prefer editing existing files, minimal diffs&lt;/p&gt;

&lt;p&gt;Here's an excerpt from the DO NOT section that saved me the most time:&lt;/p&gt;

&lt;h2&gt;
  
  
  DO NOT — Critical Anti-Patterns
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Do NOT create a &lt;code&gt;pages/&lt;/code&gt; directory or use the Pages Router&lt;/li&gt;
&lt;li&gt;Do NOT rewrite the entire API layer — extend existing route handlers&lt;/li&gt;
&lt;li&gt;Do NOT add new npm dependencies without stating why&lt;/li&gt;
&lt;li&gt;Do NOT make drive-by refactors in unrelated files&lt;/li&gt;
&lt;li&gt;Do NOT fetch data in useEffect when Server Components can fetch directly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last pattern — explicit anti-patterns — is what separates a config that works from one that gets ignored.&lt;/p&gt;

&lt;p&gt;The DO NOT section is the secret weapon&lt;/p&gt;

&lt;p&gt;AI assistants are optimizers. They want to "improve" things. Without guardrails, improvement means refactoring your working code.&lt;/p&gt;

&lt;p&gt;The DO NOT section tells the model what not to touch. Be specific:&lt;/p&gt;

&lt;p&gt;❌ Vague&lt;/p&gt;

&lt;p&gt;✅ Specific&lt;/p&gt;

&lt;p&gt;"Don't break things"&lt;/p&gt;

&lt;p&gt;"Do NOT rewrite route handlers in app/api/"&lt;/p&gt;

&lt;p&gt;"Follow best practices"&lt;/p&gt;

&lt;p&gt;"Do NOT add "use client" without browser API need"&lt;/p&gt;

&lt;p&gt;"Be careful"&lt;/p&gt;

&lt;p&gt;"Do NOT delete DB columns without a migration"&lt;/p&gt;

&lt;p&gt;Add 5–10 rules from your own worst AI disasters. Update monthly as the model finds new ways to "help."&lt;/p&gt;

&lt;p&gt;Prompts for tasks, configs for sessions&lt;/p&gt;

&lt;p&gt;Configs handle always-on rules. Prompts handle specific jobs:&lt;/p&gt;

&lt;p&gt;Debug an error → minimal diff, read stack trace first&lt;/p&gt;

&lt;p&gt;Scaffold a feature → match existing patterns, list files before coding&lt;/p&gt;

&lt;p&gt;Ship checklist → lint, types, secrets, mobile, tenant scoping&lt;/p&gt;

&lt;p&gt;Keep prompts in a folder. Copy-paste into chat when needed. Don't retype the same instructions every time.&lt;/p&gt;

&lt;p&gt;Free sample you can use today&lt;/p&gt;

&lt;p&gt;I'm sharing a free sample — Next.js stack config + 3 prompts:&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/js91tech/ship-faster-ai-free-sample" rel="noopener noreferrer"&gt;https://github.com/js91tech/ship-faster-ai-free-sample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quick start:&lt;/p&gt;

&lt;p&gt;Copy CLAUDE.md and .cursorrules to your Next.js project root&lt;/p&gt;

&lt;p&gt;Search for [CUSTOMIZE] — update 3 lines (project name, description, deploy target)&lt;/p&gt;

&lt;p&gt;Next time something breaks, paste 01-debug-error.md into chat&lt;/p&gt;

&lt;p&gt;Takes about two minutes.&lt;/p&gt;

&lt;p&gt;Full toolkit (if you want all stacks)&lt;/p&gt;

&lt;p&gt;I packaged the complete system for Gumroad:&lt;/p&gt;

&lt;p&gt;5 stack configs — Next.js, React + Vite, FastAPI, Express, SaaS generic&lt;/p&gt;

&lt;p&gt;15 battle-tested prompts&lt;/p&gt;

&lt;p&gt;DO NOT anti-patterns guide&lt;/p&gt;

&lt;p&gt;One-time $29, instant ZIP download: Get the toolkit&lt;/p&gt;

&lt;p&gt;Landing page with FAQ: &lt;a href="https://shipfasterdevkit.netlify.app/" rel="noopener noreferrer"&gt;https://shipfasterdevkit.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Not affiliated with Cursor or Anthropic — just a dev who got tired of re-prompting.)&lt;/p&gt;

&lt;p&gt;Results I've seen&lt;/p&gt;

&lt;p&gt;After using configs consistently:&lt;/p&gt;

&lt;p&gt;Fewer "why did it rewrite my entire API" sessions&lt;/p&gt;

&lt;p&gt;Less time explaining stack basics in every chat&lt;/p&gt;

&lt;p&gt;Prompts actually work because the base context is already loaded&lt;/p&gt;

&lt;p&gt;Ship checklist catches things I'd miss late at night&lt;/p&gt;

&lt;p&gt;Your mileage varies — but the free sample costs nothing to try.&lt;/p&gt;

&lt;p&gt;Takeaways&lt;/p&gt;

&lt;p&gt;Configs &amp;gt; prompts for session-level context&lt;/p&gt;

&lt;p&gt;DO NOT sections are the highest-ROI part&lt;/p&gt;

&lt;p&gt;Be stack-specific — generic rules get ignored&lt;/p&gt;

&lt;p&gt;Customize 3 lines and ship — don't over-engineer on day one&lt;/p&gt;

&lt;p&gt;If you try the sample, let me know what you'd add to the DO NOT list. I'm collecting the best ones.&lt;/p&gt;

&lt;p&gt;What's the #1 thing you wish your AI copilot would stop doing? Drop it in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>cursor</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
