<?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: Alfredo Augusto</title>
    <description>The latest articles on DEV Community by Alfredo Augusto (@alfredolab).</description>
    <link>https://dev.to/alfredolab</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3968816%2F594621a9-4612-4e5f-8a09-c01ee7339b23.png</url>
      <title>DEV Community: Alfredo Augusto</title>
      <link>https://dev.to/alfredolab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alfredolab"/>
    <language>en</language>
    <item>
      <title>How to Write a CLAUDE.md That Actually Changes Claude Code's Behavior</title>
      <dc:creator>Alfredo Augusto</dc:creator>
      <pubDate>Sat, 06 Jun 2026 16:39:05 +0000</pubDate>
      <link>https://dev.to/alfredolab/how-to-write-a-claudemd-that-actually-changes-claude-codes-behavior-5afm</link>
      <guid>https://dev.to/alfredolab/how-to-write-a-claudemd-that-actually-changes-claude-codes-behavior-5afm</guid>
      <description>&lt;p&gt;Most developers write a CLAUDE.md, get slightly better output for a week, then forget about it.&lt;/p&gt;

&lt;p&gt;The reason: their CLAUDE.md doesn't change Claude's behavior — it just reminds Claude of things it would have done anyway.&lt;/p&gt;

&lt;p&gt;Here's how to write one that actually works.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Claude does with your CLAUDE.md
&lt;/h2&gt;

&lt;p&gt;Claude reads the entire file before starting any task in your project. It uses it to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Understand your architecture (so it puts code in the right place)&lt;/li&gt;
&lt;li&gt;Follow your conventions (so you don't have to correct it)&lt;/li&gt;
&lt;li&gt;Avoid your known anti-patterns (so you don't get burned by the same mistake twice)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key word is &lt;strong&gt;specific&lt;/strong&gt;. Claude responds to specifics, not generalities.&lt;/p&gt;




&lt;h2&gt;
  
  
  The structure that works
&lt;/h2&gt;

&lt;p&gt;Here's a template that covers the essentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Project: [Name]&lt;/span&gt;

&lt;span class="gu"&gt;## Stack&lt;/span&gt;
[List your actual stack — framework, database, auth, key libraries]

&lt;span class="gu"&gt;## Architecture&lt;/span&gt;
[Folder structure + what goes where. Be explicit.]
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`src/services/`&lt;/span&gt; — business logic only
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`src/routes/`&lt;/span&gt; — HTTP layer only, calls services
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`src/db/`&lt;/span&gt; — all database queries

&lt;span class="gu"&gt;## Critical Rules&lt;/span&gt;
[The 5-10 things Claude must never get wrong]
&lt;span class="p"&gt;-&lt;/span&gt; Never expose [X] to the client
&lt;span class="p"&gt;-&lt;/span&gt; Always validate [Y] before [Z]
&lt;span class="p"&gt;-&lt;/span&gt; Auth happens in [specific place], nowhere else

&lt;span class="gu"&gt;## Code Conventions&lt;/span&gt;
[Language-specific patterns you actually use]

&lt;span class="gu"&gt;## Error Handling&lt;/span&gt;
[How errors should be handled, logged, returned]

&lt;span class="gu"&gt;## Testing&lt;/span&gt;
[What to test, how to test it, what not to mock]

&lt;span class="gu"&gt;## Environment Variables&lt;/span&gt;
[List every env var and what it does]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The rule of thumb: if Claude got it wrong once, write a rule
&lt;/h2&gt;

&lt;p&gt;Every time Claude makes a mistake that surprises you, add a rule to your CLAUDE.md.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude put business logic in a route handler? → Add an architecture rule&lt;/li&gt;
&lt;li&gt;Claude used the wrong auth pattern? → Add a critical rule&lt;/li&gt;
&lt;li&gt;Claude wrote a test that mocked the database? → Add a testing convention&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Over time, your CLAUDE.md becomes a record of the project's institutional knowledge.&lt;/p&gt;




&lt;h2&gt;
  
  
  Stack-specific sections worth adding
&lt;/h2&gt;

&lt;h3&gt;
  
  
  For Next.js App Router
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Next.js Rules&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Server Components by default — "use client" only for event handlers and hooks
&lt;span class="p"&gt;-&lt;/span&gt; Never useEffect for data fetching — use Server Components or React Query
&lt;span class="p"&gt;-&lt;/span&gt; Auth: middleware.ts handles route protection — never in page components
&lt;span class="p"&gt;-&lt;/span&gt; Stripe: sync subscription state via webhooks only — never trust client data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For FastAPI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## FastAPI Rules  &lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Routers: HTTP parsing + service calls only — no business logic
&lt;span class="p"&gt;-&lt;/span&gt; Services: business logic only — no HTTP or DB concerns
&lt;span class="p"&gt;-&lt;/span&gt; Repository: all DB queries — never in routers or services
&lt;span class="p"&gt;-&lt;/span&gt; Always use Pydantic v2 validators — never raw dict access
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  For any AI agent project
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Agent Rules&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Max iterations on all agent loops: 10
&lt;span class="p"&gt;-&lt;/span&gt; 30s timeout per tool execution
&lt;span class="p"&gt;-&lt;/span&gt; Human-in-the-loop for: file deletion, email sending, payments
&lt;span class="p"&gt;-&lt;/span&gt; Never pass LLM output directly to SQL or shell
&lt;span class="p"&gt;-&lt;/span&gt; Log every LLM call: input, output, tokens, latency
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How long should it be?
&lt;/h2&gt;

&lt;p&gt;Long enough to cover your real conventions — short enough that every rule earns its place.&lt;/p&gt;

&lt;p&gt;A 50-line CLAUDE.md with 10 specific, enforced rules beats a 500-line one where Claude picks and chooses what to follow.&lt;/p&gt;

&lt;p&gt;Start lean. Add rules when Claude makes mistakes. After 2-3 projects, you'll have something worth copying to your next project.&lt;/p&gt;




&lt;h2&gt;
  
  
  Skip the blank page
&lt;/h2&gt;

&lt;p&gt;If you'd rather not start from scratch, I packaged 25 production-ready CLAUDE.md files — one per stack.&lt;/p&gt;

&lt;p&gt;Each covers the architecture, conventions, anti-patterns, env vars, and testing patterns for its framework.&lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;&lt;a href="https://alfredolance.gumroad.com/l/uxwvom" rel="noopener noreferrer"&gt;CLAUDE.md Starter Pack&lt;/a&gt;&lt;/strong&gt; ($47) — 5 stars, used daily by developers.&lt;/p&gt;

&lt;p&gt;Free excerpts for Next.js SaaS, FastAPI, and AI agents: &lt;a href="https://github.com/alfredolancelote-crypto/claude-md-starter-pack" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>7 CLAUDE.md Anti-Patterns That Are Killing Your Claude Code Output</title>
      <dc:creator>Alfredo Augusto</dc:creator>
      <pubDate>Sat, 06 Jun 2026 16:38:32 +0000</pubDate>
      <link>https://dev.to/alfredolab/7-claudemd-anti-patterns-that-are-killing-your-claude-code-output-2imd</link>
      <guid>https://dev.to/alfredolab/7-claudemd-anti-patterns-that-are-killing-your-claude-code-output-2imd</guid>
      <description>&lt;p&gt;If you use Claude Code, you probably have a CLAUDE.md. But most CLAUDE.md files I've seen actually hurt output quality more than they help.&lt;/p&gt;

&lt;p&gt;Here are the 7 most common anti-patterns — and what to do instead.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Writing generic instructions Claude ignores
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Bad:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Write clean, readable code
&lt;span class="p"&gt;-&lt;/span&gt; Follow best practices
&lt;span class="p"&gt;-&lt;/span&gt; Use meaningful variable names
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude already tries to do these things. Generic instructions add noise without changing behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Never use &lt;span class="sb"&gt;`var`&lt;/span&gt; — always &lt;span class="sb"&gt;`const`&lt;/span&gt; or &lt;span class="sb"&gt;`let`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; All async functions must handle errors with try/catch — no unhandled promise rejections
&lt;span class="p"&gt;-&lt;/span&gt; Variable names: &lt;span class="sb"&gt;`userId`&lt;/span&gt; not &lt;span class="sb"&gt;`id`&lt;/span&gt;, &lt;span class="sb"&gt;`userEmail`&lt;/span&gt; not &lt;span class="sb"&gt;`email`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Specific beats general every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. No architecture rules (the most expensive mistake)
&lt;/h2&gt;

&lt;p&gt;Without explicit architecture rules, Claude will write code wherever is convenient. That means business logic in route handlers, DB queries in components, and utils files that become dumping grounds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good (Next.js example):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Architecture&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="sb"&gt;`app/`&lt;/span&gt; — routing and layouts only, no business logic
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`lib/services/`&lt;/span&gt; — all business logic
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`lib/db/`&lt;/span&gt; — all database queries, never in components
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`components/`&lt;/span&gt; — UI only, no data fetching except via hooks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One rule like this saves hours of refactoring.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Forgetting stack-specific gotchas
&lt;/h2&gt;

&lt;p&gt;Every framework has footguns. Claude doesn't know which ones matter to you unless you tell it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FastAPI example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Never use &lt;span class="sb"&gt;`async def`&lt;/span&gt; for CPU-bound operations — use &lt;span class="sb"&gt;`def`&lt;/span&gt; or offload to a thread pool
&lt;span class="p"&gt;-&lt;/span&gt; Always validate with Pydantic v2 &lt;span class="sb"&gt;`model_validator`&lt;/span&gt; — never raw &lt;span class="sb"&gt;`dict`&lt;/span&gt; access
&lt;span class="p"&gt;-&lt;/span&gt; DB sessions must use &lt;span class="sb"&gt;`async with AsyncSession() as session`&lt;/span&gt; — never hold sessions open
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Next.js App Router example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; Never use &lt;span class="sb"&gt;`useEffect`&lt;/span&gt; to fetch data — use Server Components or React Query
&lt;span class="p"&gt;-&lt;/span&gt; Client components only for interactivity — never for data
&lt;span class="p"&gt;-&lt;/span&gt; Protect routes in &lt;span class="sb"&gt;`middleware.ts`&lt;/span&gt; — never inside page components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. No testing conventions
&lt;/h2&gt;

&lt;p&gt;Without this, Claude writes tests that technically pass but test nothing meaningful. Or skips tests entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Testing&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Unit test business logic in &lt;span class="sb"&gt;`lib/services/`&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Integration tests for all API endpoints
&lt;span class="p"&gt;-&lt;/span&gt; Never mock the database in integration tests — use a test DB
&lt;span class="p"&gt;-&lt;/span&gt; Test file naming: &lt;span class="sb"&gt;`*.test.ts`&lt;/span&gt; colocated with source
&lt;span class="p"&gt;-&lt;/span&gt; Minimum: happy path + one error case per function
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Missing environment variable reference
&lt;/h2&gt;

&lt;p&gt;Claude will invent env var names. Then your app breaks in production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Environment Variables&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="sb"&gt;`DATABASE_URL`&lt;/span&gt; — PostgreSQL connection string
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`STRIPE_SECRET_KEY`&lt;/span&gt; — never expose to client
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`STRIPE_WEBHOOK_SECRET`&lt;/span&gt; — used in &lt;span class="sb"&gt;`/api/webhooks/stripe`&lt;/span&gt; only
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`NEXT_PUBLIC_APP_URL`&lt;/span&gt; — only public var, safe for client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6. No error handling conventions
&lt;/h2&gt;

&lt;p&gt;Claude's default error handling is inconsistent — sometimes throws, sometimes returns null, sometimes logs and swallows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Error Handling&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Never swallow errors silently
&lt;span class="p"&gt;-&lt;/span&gt; Use &lt;span class="sb"&gt;`Result&amp;lt;T, E&amp;gt;`&lt;/span&gt; pattern for recoverable errors
&lt;span class="p"&gt;-&lt;/span&gt; Throw for programmer errors (invalid state, unexpected data)
&lt;span class="p"&gt;-&lt;/span&gt; Log at the boundary where the error is first caught — never re-log when wrapping
&lt;span class="p"&gt;-&lt;/span&gt; User-facing errors: always return a user-safe message, log the real error
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  7. Writing your CLAUDE.md once and never updating it
&lt;/h2&gt;

&lt;p&gt;Your CLAUDE.md should evolve with your project. Every time Claude makes a mistake that surprised you — add a rule.&lt;/p&gt;

&lt;p&gt;That mistake means you found a gap. The next project benefits from it.&lt;/p&gt;

&lt;p&gt;The most valuable CLAUDE.md files are the ones with comments like "never do X — we tried this in v2 and it caused Y."&lt;/p&gt;




&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;If writing your CLAUDE.md from scratch sounds like work, I packaged up 25 of them — one for each major stack.&lt;/p&gt;

&lt;p&gt;Each one already has specific conventions, architecture rules, anti-patterns, env var references, and testing conventions built in.&lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;&lt;a href="https://alfredolance.gumroad.com/l/uxwvom" rel="noopener noreferrer"&gt;CLAUDE.md Starter Pack on Gumroad&lt;/a&gt;&lt;/strong&gt; ($47) — or grab 3 free ones from the &lt;a href="https://github.com/alfredolancelote-crypto/claude-md-starter-pack" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The pack has 5-star reviews from developers who are using it daily. At $100/hr, one saved hour covers it twice.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's the worst CLAUDE.md anti-pattern you've seen? Drop it in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CLAUDE.md templates by stack: what Go needs vs. Next.js vs. AI agents (with examples)</title>
      <dc:creator>Alfredo Augusto</dc:creator>
      <pubDate>Sat, 06 Jun 2026 16:09:42 +0000</pubDate>
      <link>https://dev.to/alfredolab/claudemd-templates-by-stack-what-go-needs-vs-nextjs-vs-ai-agents-with-examples-2oi0</link>
      <guid>https://dev.to/alfredolab/claudemd-templates-by-stack-what-go-needs-vs-nextjs-vs-ai-agents-with-examples-2oi0</guid>
      <description>&lt;p&gt;Every time I start a new project with Claude Code, the first 20 minutes used to be wasted.&lt;/p&gt;

&lt;p&gt;Not on architecture. Not on setup. On writing the CLAUDE.md file from scratch.&lt;/p&gt;

&lt;p&gt;After doing this for the 10th time across different stacks, I mapped out exactly what goes into a high-quality CLAUDE.md for each major framework — and the patterns are very different depending on the stack.&lt;/p&gt;

&lt;p&gt;Here's what I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  CLAUDE.md for a Go REST API vs. a Next.js SaaS: completely different files
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Go REST API needs:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Error Handling&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Always fmt.Errorf("context: %w", err) — never return raw errors
&lt;span class="p"&gt;-&lt;/span&gt; Log once at the top of the call stack; never re-log when wrapping
&lt;span class="p"&gt;-&lt;/span&gt; Domain errors in internal/domain/ as sentinel errors

&lt;span class="gu"&gt;## Code Structure&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; cmd/: Entry points only — no business logic
&lt;span class="p"&gt;-&lt;/span&gt; internal/handler/: HTTP parsing + calling services
&lt;span class="p"&gt;-&lt;/span&gt; internal/service/: Pure business logic — no HTTP, no DB
&lt;span class="p"&gt;-&lt;/span&gt; internal/repository/: All DB queries — none elsewhere
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Next.js SaaS needs completely different rules:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Critical Rules&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Server Components by default; "use client" only for event handlers
&lt;span class="p"&gt;-&lt;/span&gt; Never useEffect to fetch data — use Server Components or React Query
&lt;span class="p"&gt;-&lt;/span&gt; Auth: protect routes in middleware.ts only — never in page components
&lt;span class="p"&gt;-&lt;/span&gt; Stripe: sync subscription state via webhooks — never trust client data
&lt;span class="p"&gt;-&lt;/span&gt; Never expose Supabase service key to client components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These files solve different problems. One is about Go's error wrapping conventions. The other is about React's rendering model and auth patterns. A generic CLAUDE.md doesn't help either project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 5 sections every CLAUDE.md needs (regardless of stack)
&lt;/h2&gt;

&lt;p&gt;After comparing templates across 25 stacks, every effective CLAUDE.md has:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Architecture map&lt;/strong&gt; — where each type of code lives&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; handlers/: HTTP only — no business logic
&lt;span class="p"&gt;-&lt;/span&gt; services/: Business logic — no HTTP, no DB
&lt;span class="p"&gt;-&lt;/span&gt; models/: DB models only
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Anti-patterns&lt;/strong&gt; — what Claude should never do&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Never&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Never put business logic in route handlers
&lt;span class="p"&gt;-&lt;/span&gt; Never call DB directly from controllers
&lt;span class="p"&gt;-&lt;/span&gt; Never return raw errors — always wrap with context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Domain-specific rules&lt;/strong&gt; — the stack's non-obvious gotchas&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Stripe&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Webhooks are the source of truth — never trust client-sent state
&lt;span class="p"&gt;-&lt;/span&gt; Always verify signatures with constructEvent()
&lt;span class="p"&gt;-&lt;/span&gt; Idempotency keys required for all payment operations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Testing conventions&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Tests&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Unit tests for all service layer functions
&lt;span class="p"&gt;-&lt;/span&gt; Integration tests hit real DB — no mocks
&lt;span class="p"&gt;-&lt;/span&gt; E2E with Playwright for critical user flows only
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Environment variables&lt;/strong&gt; — referenced by name so Claude uses them correctly&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Env vars&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; DATABASE_URL: PostgreSQL connection string
&lt;span class="p"&gt;-&lt;/span&gt; STRIPE_WEBHOOK_SECRET: for webhook verification
&lt;span class="p"&gt;-&lt;/span&gt; NEXT_PUBLIC_SUPABASE_URL: safe to expose to client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Which stacks need the most specific CLAUDE.md?
&lt;/h2&gt;

&lt;p&gt;From most to least critical to get right:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multi-tenant SaaS&lt;/strong&gt; — one missing organizationId filter = data breach&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stripe billing&lt;/strong&gt; — webhook idempotency is non-obvious and breaks production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Agent apps&lt;/strong&gt; — max iterations and timeout patterns prevent infinite loops&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React Native&lt;/strong&gt; — navigation patterns differ completely from web React&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go APIs&lt;/strong&gt; — error wrapping conventions are strict and Claude gets them wrong without guidance&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Free templates for 3 stacks
&lt;/h2&gt;

&lt;p&gt;I packaged these into production-ready templates. Three are free:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👉 &lt;a href="https://github.com/alfredolancelote-crypto/claude-md-starter-pack" rel="noopener noreferrer"&gt;github.com/alfredolancelote-crypto/claude-md-starter-pack&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Includes: Next.js SaaS, FastAPI Python, AI Agent/LLM App.&lt;/p&gt;

&lt;p&gt;Full pack of 25 stacks (Go, React Native, Shopify, Rust, T3, Django, Electron, AWS Lambda, Turborepo, SvelteKit, n8n, and more) is $47:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👉 &lt;a href="https://alfredolance.gumroad.com/l/uxwvom" rel="noopener noreferrer"&gt;alfredolance.gumroad.com/l/uxwvom&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;What stack are you using Claude Code with? Drop it below and I'll share what the most important rules are for that specific stack.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
    <item>
      <title>The CLAUDE.md mistake 90% of Claude Code users make (and how to fix it)</title>
      <dc:creator>Alfredo Augusto</dc:creator>
      <pubDate>Sat, 06 Jun 2026 14:48:05 +0000</pubDate>
      <link>https://dev.to/alfredolab/the-claudemd-mistake-90-of-claude-code-users-make-and-how-to-fix-it-1ehk</link>
      <guid>https://dev.to/alfredolab/the-claudemd-mistake-90-of-claude-code-users-make-and-how-to-fix-it-1ehk</guid>
      <description>&lt;p&gt;If you're using Claude Code and your CLAUDE.md looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Use&lt;/span&gt; &lt;span class="nx"&gt;TypeScript&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Write&lt;/span&gt; &lt;span class="nx"&gt;clean&lt;/span&gt; &lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Follow&lt;/span&gt; &lt;span class="nx"&gt;best&lt;/span&gt; &lt;span class="nx"&gt;practices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude is ignoring it. Here's why — and what to write instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with generic rules
&lt;/h2&gt;

&lt;p&gt;Claude doesn't respond to vague instructions. "Write clean code" means nothing to an LLM. It has no way to evaluate whether code is "clean" in your specific context.&lt;/p&gt;

&lt;p&gt;What Claude actually follows: &lt;strong&gt;specific, verifiable rules&lt;/strong&gt; that leave no room for interpretation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a good CLAUDE.md actually looks like
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Generic (ignored):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Handle errors properly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Specific (followed):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error handling:
- Always fmt.Errorf("context: %w", err) — never return raw errors
- Log once at the top of the call stack, never re-log when wrapping
- Domain errors in internal/domain/ as sentinel errors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second one is checkable. Claude can verify compliance. The first is subjective noise.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 3 categories that matter most
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Architecture rules (where things go)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Architecture&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; api/endpoints/: HTTP parsing + calling services only
&lt;span class="p"&gt;-&lt;/span&gt; services/: All business logic — no HTTP concerns
&lt;span class="p"&gt;-&lt;/span&gt; repository/: All DB queries — none in handlers or services
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Critical anti-patterns (what never to do)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Never do this&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Never expose Supabase service key to client components
&lt;span class="p"&gt;-&lt;/span&gt; Never sync Stripe state from client — webhooks only
&lt;span class="p"&gt;-&lt;/span&gt; Never put auth checks inside page components — use middleware.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Stack-specific gotchas
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Stripe webhooks&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Always verify webhook signature with stripe.webhooks.constructEvent()
&lt;span class="p"&gt;-&lt;/span&gt; Make handlers idempotent — check if event already processed
&lt;span class="p"&gt;-&lt;/span&gt; Store webhook events in DB before processing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Free templates
&lt;/h2&gt;

&lt;p&gt;I packaged these patterns into 25 stack-specific templates. Three are free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js SaaS (App Router + Supabase + Stripe)&lt;/li&gt;
&lt;li&gt;FastAPI Python (async + Pydantic v2)&lt;/li&gt;
&lt;li&gt;AI Agent / LLM App (Anthropic SDK + tool use)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Free templates: &lt;a href="https://github.com/alfredolancelote-crypto/claude-md-starter-pack" rel="noopener noreferrer"&gt;github.com/alfredolancelote-crypto/claude-md-starter-pack&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Full pack of 25 stacks at $47: &lt;strong&gt;&lt;a href="https://alfredolance.gumroad.com/l/uxwvom" rel="noopener noreferrer"&gt;alfredolance.gumroad.com/l/uxwvom&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;What's in your CLAUDE.md right now? Drop it in the comments — happy to tell you if Claude is actually using it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I Made 25 CLAUDE.md Templates So You Don't Have To (Free Ones Included)</title>
      <dc:creator>Alfredo Augusto</dc:creator>
      <pubDate>Sat, 06 Jun 2026 00:07:21 +0000</pubDate>
      <link>https://dev.to/alfredolab/i-made-25-claudemd-templates-so-you-dont-have-to-free-ones-included-12k3</link>
      <guid>https://dev.to/alfredolab/i-made-25-claudemd-templates-so-you-dont-have-to-free-ones-included-12k3</guid>
      <description>&lt;p&gt;If you use Claude Code, you already know what a CLAUDE.md file is. It's the file Claude reads before doing anything in your project — it tells Claude your conventions, your architecture, and the mistakes to avoid.&lt;/p&gt;

&lt;p&gt;The difference between a project with a good CLAUDE.md and one without is massive. Without it, Claude writes generic code that &lt;em&gt;technically&lt;/em&gt; works but doesn't fit your codebase. With it, Claude acts like a senior dev who's been on the project for months.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem I kept running into
&lt;/h2&gt;

&lt;p&gt;Every time I started a new project, I had to write a new CLAUDE.md from scratch. It took 2-4 hours to figure out the right structure for each stack. What do you put in a FastAPI CLAUDE.md? What about a Shopify app? A Rust CLI?&lt;/p&gt;

&lt;p&gt;After doing this for the 8th time, I decided to just build a proper pack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here are 3 free templates to try right now
&lt;/h2&gt;




&lt;h3&gt;
  
  
  Free Template 1: Next.js SaaS (excerpt)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Critical Rules&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Server Components by default; add "use client" only for event handlers and hooks
&lt;span class="p"&gt;-&lt;/span&gt; Never use useEffect to fetch data — use Server Components or React Query
&lt;span class="p"&gt;-&lt;/span&gt; All DB calls go through server-side Supabase client — never expose service key to client
&lt;span class="p"&gt;-&lt;/span&gt; Auth: protect routes in middleware.ts, not inside page components
&lt;span class="p"&gt;-&lt;/span&gt; Stripe: sync subscription state via webhooks only — never trust client-sent data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Free Template 2: FastAPI Python (excerpt)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Code Conventions&lt;/span&gt;

&lt;span class="gu"&gt;### Separation of Concerns&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; commands/: CLI parsing and calling lib functions only
&lt;span class="p"&gt;-&lt;/span&gt; lib/: Pure business logic — no HTTP concerns, no DB
&lt;span class="p"&gt;-&lt;/span&gt; repository/: All DB queries — none in handlers or services

&lt;span class="gu"&gt;### Error Handling&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Always wrap errors with context — never return raw errors
&lt;span class="p"&gt;-&lt;/span&gt; Log once at the top of the call stack; never re-log when wrapping
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Free Template 3: AI Agent / LLM App (excerpt)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Safety &amp;amp; Reliability&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Set max iterations on all agent loops — 10 is a sensible default
&lt;span class="p"&gt;-&lt;/span&gt; Timeout on individual tool executions (30s)
&lt;span class="p"&gt;-&lt;/span&gt; Human-in-the-loop checkpoints for destructive actions
&lt;span class="p"&gt;-&lt;/span&gt; Never trust LLM output as safe input to SQL or shell
&lt;span class="p"&gt;-&lt;/span&gt; Log every LLM call with input/output for debugging and cost tracking
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The full pack
&lt;/h2&gt;

&lt;p&gt;25 templates: Next.js, FastAPI, React Native, Shopify, T3, Django, Electron, Go, React SPA, Supabase Edge Functions, AWS Lambda, Stripe billing, AI agents, e-commerce, Turborepo, Rust CLI, n8n, Vue/Nuxt, Docker Compose, SvelteKit, Python scraper, and a general fill-in-the-blank template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full pack at $47: &lt;a href="https://alfredolance.gumroad.com/l/uxwvom" rel="noopener noreferrer"&gt;https://alfredolance.gumroad.com/l/uxwvom&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Drop questions about specific stacks in the comments.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>15 Production-Ready MCP Servers for Claude: Notion, Stripe, HubSpot, Slack, Supabase and 10 more</title>
      <dc:creator>Alfredo Augusto</dc:creator>
      <pubDate>Fri, 05 Jun 2026 19:54:32 +0000</pubDate>
      <link>https://dev.to/alfredolab/15-production-ready-mcp-servers-for-claude-notion-stripe-hubspot-slack-supabase-and-10-more-52do</link>
      <guid>https://dev.to/alfredolab/15-production-ready-mcp-servers-for-claude-notion-stripe-hubspot-slack-supabase-and-10-more-52do</guid>
      <description>&lt;p&gt;I kept rebuilding the same MCP server infrastructure for every project. After the 5th time setting up a Notion integration from scratch, I packaged everything into a reusable bundle.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the bundle
&lt;/h2&gt;

&lt;p&gt;15 fully functional MCP servers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Server&lt;/th&gt;
&lt;th&gt;Key tools&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;01&lt;/td&gt;
&lt;td&gt;Notion&lt;/td&gt;
&lt;td&gt;search, pages, databases, blocks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;02&lt;/td&gt;
&lt;td&gt;Airtable&lt;/td&gt;
&lt;td&gt;full CRUD, search, schema&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;03&lt;/td&gt;
&lt;td&gt;HubSpot&lt;/td&gt;
&lt;td&gt;contacts, deals, companies, notes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;04&lt;/td&gt;
&lt;td&gt;Stripe&lt;/td&gt;
&lt;td&gt;MRR calc, subscriptions, invoices, payment links&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;05&lt;/td&gt;
&lt;td&gt;Slack&lt;/td&gt;
&lt;td&gt;send, read, search, thread replies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;06&lt;/td&gt;
&lt;td&gt;Google Sheets&lt;/td&gt;
&lt;td&gt;read/write ranges, format, append rows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;07&lt;/td&gt;
&lt;td&gt;Supabase&lt;/td&gt;
&lt;td&gt;queries, insert/update/delete, RPC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;08&lt;/td&gt;
&lt;td&gt;Resend&lt;/td&gt;
&lt;td&gt;email, batch send, audience management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;09&lt;/td&gt;
&lt;td&gt;Cal.com&lt;/td&gt;
&lt;td&gt;availability, bookings, create/cancel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Linear&lt;/td&gt;
&lt;td&gt;issues, projects, teams, search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;Typeform&lt;/td&gt;
&lt;td&gt;forms, responses, insights&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;Webflow&lt;/td&gt;
&lt;td&gt;CMS CRUD, publish items&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;Lemon Squeezy&lt;/td&gt;
&lt;td&gt;orders, subscriptions, license validation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;Cloudflare&lt;/td&gt;
&lt;td&gt;DNS records, Workers deploy, cache purge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;PostgreSQL&lt;/td&gt;
&lt;td&gt;safe SELECT + writes, schema introspection, transactions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All servers use &lt;code&gt;@modelcontextprotocol/sdk&lt;/code&gt;, stdio transport (Claude Desktop compatible), Node.js ESM, typed tool schemas, full error handling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;p&gt;$107 for all 15. MIT license.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://alfredolance.gumroad.com/l/agency-mcp-stack" rel="noopener noreferrer"&gt;https://alfredolance.gumroad.com/l/agency-mcp-stack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to paste source of any server in the comments.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>claude</category>
      <category>automation</category>
      <category>devtools</category>
    </item>
    <item>
      <title>GitHub Copilot Billing Went Live June 1. Here's the Full Token Cost Breakdown (So You Don't Get a $180 Day-1 Bill)</title>
      <dc:creator>Alfredo Augusto</dc:creator>
      <pubDate>Thu, 04 Jun 2026 19:58:47 +0000</pubDate>
      <link>https://dev.to/alfredolab/github-copilot-billing-went-live-june-1-heres-the-full-token-cost-breakdown-so-you-dont-get-a-4h5k</link>
      <guid>https://dev.to/alfredolab/github-copilot-billing-went-live-june-1-heres-the-full-token-cost-breakdown-so-you-dont-get-a-4h5k</guid>
      <description>&lt;p&gt;Copilot's usage-based billing went live June 1, 2026. Visual Studio Magazine ran a headline on Day 1: &lt;em&gt;"Slammed by Copilot Usage-Based Billing on Day 1, Facing $180 Bill for June."&lt;/em&gt; Today they followed up: &lt;em&gt;"Copilot Billing Shock Hits Developers."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The problem isn't the new billing model itself — it's that most developers have no idea what each action actually costs. GitHub published the per-token pricing in their docs, but didn't map it to real-world usage patterns.&lt;/p&gt;

&lt;p&gt;Here's the complete breakdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Credit Math
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1 AI Credit = $0.01 USD.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your plan includes a fixed credit allowance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copilot Pro: 1,500 credits ($15 value) for $19/mo&lt;/li&gt;
&lt;li&gt;Copilot Pro+: 7,000 credits ($70 value) for $39/mo&lt;/li&gt;
&lt;li&gt;Copilot Max: 20,000 credits ($200 value) for $99/mo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code completions are &lt;strong&gt;free&lt;/strong&gt; — they don't consume credits. Everything else does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model Pricing (What GitHub Buried in Their Docs)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Output Cost/1M tokens&lt;/th&gt;
&lt;th&gt;Credits/1M out&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gemini Flash&lt;/td&gt;
&lt;td&gt;$0.30&lt;/td&gt;
&lt;td&gt;30 cr&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5 mini&lt;/td&gt;
&lt;td&gt;$2.00&lt;/td&gt;
&lt;td&gt;200 cr&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-4o&lt;/td&gt;
&lt;td&gt;$10.00&lt;/td&gt;
&lt;td&gt;1,000 cr&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Sonnet 4.6&lt;/td&gt;
&lt;td&gt;$15.00&lt;/td&gt;
&lt;td&gt;1,500 cr&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus&lt;/td&gt;
&lt;td&gt;$75.00&lt;/td&gt;
&lt;td&gt;7,500 cr&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Real-World Cost Table (The Part That Shocks People)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What You're Doing&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Est. Output Tokens&lt;/th&gt;
&lt;th&gt;Credits&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Simple rename&lt;/td&gt;
&lt;td&gt;Sonnet&lt;/td&gt;
&lt;td&gt;~5K&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;$0.07&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add unit tests&lt;/td&gt;
&lt;td&gt;Sonnet&lt;/td&gt;
&lt;td&gt;~15K&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;$0.22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fix a bug&lt;/td&gt;
&lt;td&gt;Sonnet&lt;/td&gt;
&lt;td&gt;~30K&lt;/td&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;td&gt;$0.45&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complex refactor&lt;/td&gt;
&lt;td&gt;Sonnet&lt;/td&gt;
&lt;td&gt;~80K&lt;/td&gt;
&lt;td&gt;120&lt;/td&gt;
&lt;td&gt;$1.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Architecture review&lt;/td&gt;
&lt;td&gt;Opus&lt;/td&gt;
&lt;td&gt;~50K&lt;/td&gt;
&lt;td&gt;375&lt;/td&gt;
&lt;td&gt;$3.75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10-file agent run&lt;/td&gt;
&lt;td&gt;Opus&lt;/td&gt;
&lt;td&gt;~200K&lt;/td&gt;
&lt;td&gt;1,500&lt;/td&gt;
&lt;td&gt;$15.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heavy agent day&lt;/td&gt;
&lt;td&gt;Opus&lt;/td&gt;
&lt;td&gt;~500K&lt;/td&gt;
&lt;td&gt;3,750&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$37.50&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;That last row is your entire Pro+ monthly credit budget. In one day.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Is Happening
&lt;/h2&gt;

&lt;p&gt;Copilot's default in agent mode often routes to frontier models (Opus, GPT-5). It uses the same model for a quick rename as for multi-file architectural changes. Nobody configured it otherwise because under flat-rate billing, it didn't matter. Now it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Fix (5 Minutes)
&lt;/h2&gt;

&lt;p&gt;Add this to your VS Code &lt;code&gt;settings.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"github.copilot.chat.defaultModel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gpt-4o"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"github.copilot.advanced"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"length"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"temperature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"github.copilot.enable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"markdown"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"yaml"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"json"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"github.copilot.chat.agent.runCommand"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also: go to &lt;strong&gt;github.com/settings/billing&lt;/strong&gt; and set a hard spending limit to $0 overage. This stops Copilot from charging your card after credits run out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Model Selection Rule That Saves 70%
&lt;/h2&gt;

&lt;p&gt;Route by task complexity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tests, docs, renames&lt;/strong&gt; → Gemini Flash or GPT-5 mini ($0.30–$2/M output)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature dev, bug fixes&lt;/strong&gt; → Sonnet or GPT-4o ($10–15/M output)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture, complex multi-file&lt;/strong&gt; → Opus or GPT-5 (only when genuinely needed)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;65% of daily coding tasks don't need a frontier model. Matching model to task is where the 70% savings comes from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Going Further
&lt;/h2&gt;

&lt;p&gt;I put together a complete kit: full model cost reference card, VS Code config templates (copy-paste ready), a cost calculator spreadsheet, and a migration guide for Cursor/Continue.dev if Copilot is still too expensive after optimizing.&lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;&lt;a href="https://alfredolance.gumroad.com/l/djsoxuw" rel="noopener noreferrer"&gt;GitHub Copilot Billing Survival Kit — $37&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Or use the free tips above — the settings change alone cuts most bills by 40-70%.&lt;/p&gt;

&lt;p&gt;Happy to answer questions in the comments.&lt;/p&gt;

</description>
      <category>github</category>
      <category>githubcopilot</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
