<?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: Bruce Banaei</title>
    <description>The latest articles on DEV Community by Bruce Banaei (@behrouzbk).</description>
    <link>https://dev.to/behrouzbk</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%2F903931%2F05492982-75cf-4e56-8d63-311997a2b0fe.jpg</url>
      <title>DEV Community: Bruce Banaei</title>
      <link>https://dev.to/behrouzbk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/behrouzbk"/>
    <language>en</language>
    <item>
      <title>Is My Base44 App Secure? A Plain-English Security Checklist (2026)</title>
      <dc:creator>Bruce Banaei</dc:creator>
      <pubDate>Tue, 10 Nov 2026 21:32:34 +0000</pubDate>
      <link>https://dev.to/behrouzbk/is-my-base44-app-secure-a-plain-english-security-checklist-2026-im</link>
      <guid>https://dev.to/behrouzbk/is-my-base44-app-secure-a-plain-english-security-checklist-2026-im</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://axieo.ca/blog/is-my-base44-app-secure?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=base44" rel="noopener noreferrer"&gt;Axieo blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Base44 builds the whole app for you: pages, data, logins and hosting, all on Base44's own back end. That means fewer moving parts than many AI builders, and fewer places for keys to leak. But the most important security decisions are still yours.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.base44.com/Setting-up-your-app/security-overview" rel="noopener noreferrer"&gt;Base44's security overview&lt;/a&gt; says it directly: "You are responsible for your app's security settings." This checklist, written for founders rather than security experts, covers what to check.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Data permissions (the most important part)
&lt;/h2&gt;

&lt;p&gt;Base44 stores your app's data as entities, a bit like tables, and each one has permissions for who can create, read, update and delete records. Base44 &lt;a href="https://docs.base44.com/Setting-up-your-app/Managing-security-settings" rel="noopener noreferrer"&gt;says&lt;/a&gt; it "automatically sets up data permissions as you build your app", and warns: "If permissions are not set up correctly, the wrong people could view or change data in your app."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the security settings for every entity that holds user data. Look for "All Users" on read, update or delete. Base44 explains that it means anyone can do it, "even without signing in."&lt;/li&gt;
&lt;li&gt;Make sure each person sees only their own records, such as their own orders or messages, unless sharing is intended.&lt;/li&gt;
&lt;li&gt;Check sensitive fields too. Base44 supports field-level rules, so a record can be visible while a private field in it isn't.&lt;/li&gt;
&lt;li&gt;Do the two-account test. Sign up as user A and create something. Log in as user B in another browser and try to see or change A's data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Who can open your app
&lt;/h2&gt;

&lt;p&gt;A Base44 app can be Public (anyone on the internet, no sign-in), Private (only invited people) or limited to your workspace. Base44's &lt;a href="https://docs.base44.com/Setting-up-your-app/Managing-access" rel="noopener noreferrer"&gt;access docs&lt;/a&gt; note that apps that look like public sites, such as landing pages, are set to Public automatically, and that making an app private needs a Starter plan or higher.&lt;/p&gt;

&lt;p&gt;Check the setting matches what the app is for. An internal tool or a client portal shouldn't be open to everyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Logins and roles
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Base44 apps have two built-in roles: Admin and User. Check who has Admin, and that admin-only pages and data are restricted by permissions, not just hidden.&lt;/li&gt;
&lt;li&gt;Pick sign-in options that fit your users, and require multi-factor authentication for admins if your plan allows it (Base44 says requiring MFA needs a Builder plan or higher).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Secrets and backend functions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Store API keys in Base44's secrets, which Base44 says are "only accessible from your app's backend and are never exposed to the people using your app." Never paste a key into page code or a prompt that puts it in the front end.&lt;/li&gt;
&lt;li&gt;Backend functions should check who is calling before doing anything user-specific.&lt;/li&gt;
&lt;li&gt;Be careful with the service role. Base44's &lt;a href="https://docs.base44.com/developers/backend/resources/entities/security" rel="noopener noreferrer"&gt;developer docs&lt;/a&gt; say code using &lt;code&gt;asServiceRole&lt;/code&gt; "bypasses both RLS and FLS entirely", so every function that uses it must do its own checks.&lt;/li&gt;
&lt;li&gt;Rate limits or credit limits on anything that costs you money, like AI calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Payments
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you take payments with Stripe, webhooks must verify the signature (&lt;a href="https://docs.stripe.com/webhooks" rel="noopener noreferrer"&gt;Stripe's docs&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Paid features are unlocked by data the user can't change, checked by permissions or a backend function.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Run Base44's security scan
&lt;/h2&gt;

&lt;p&gt;Base44 has a &lt;a href="https://docs.base44.com/Setting-up-your-app/running-a-security-scan" rel="noopener noreferrer"&gt;built-in security scan&lt;/a&gt; on every plan, including free. It looks at permissions, private fields, exposed secrets, backend functions, dependencies and security headers. Run it before you publish and after big changes.&lt;/p&gt;

&lt;p&gt;Two things to know. First, "the scan doesn't apply fixes automatically, so check what each fix changes first." Second, it can't know your business rules: whether a manager should see another team's records, or whether a field is private. That's what the two-account test and a human review are for.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Platform issues happen too
&lt;/h2&gt;

&lt;p&gt;In July 2025, security firm Wiz &lt;a href="https://www.wiz.io/blog/critical-vulnerability-base44" rel="noopener noreferrer"&gt;reported&lt;/a&gt; a flaw that let anyone register for private Base44 apps using only the app's id. It was fixed in less than 24 hours, and Base44 said that, so far, it had found no evidence that any customer was affected. It's a reminder that security depends on both the platform and your own settings. Wiz suggested app owners review their app's analytics for unusual visits and sign-ups.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Where to start
&lt;/h2&gt;

&lt;p&gt;If you only have an hour: run Base44's security scan, check every entity for "All Users" permissions on private data, and do the two-account test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Want a second pair of eyes?
&lt;/h2&gt;

&lt;p&gt;Axieo Guard is our security audit for AI-built apps, including apps built with Base44. A free mini scan checks five high-impact items. A full audit covers 25 checks, adapted to Base44's back end, with a plain-English report and a recommended fix for every finding. We're a Canadian company, and we only test with your written permission, read-only. &lt;a href="https://axieo.ca/services/axieo-guard?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=base44#request" rel="noopener noreferrer"&gt;Get a free mini scan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>nocode</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>Is My v0 App Secure? A Plain-English Next.js Security Checklist (2026)</title>
      <dc:creator>Bruce Banaei</dc:creator>
      <pubDate>Tue, 10 Nov 2026 21:31:11 +0000</pubDate>
      <link>https://dev.to/behrouzbk/is-my-v0-app-secure-a-plain-english-nextjs-security-checklist-2026-50ao</link>
      <guid>https://dev.to/behrouzbk/is-my-v0-app-secure-a-plain-english-nextjs-security-checklist-2026-50ao</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://axieo.ca/blog/is-my-v0-app-secure?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=v0" rel="noopener noreferrer"&gt;Axieo blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;v0 by Vercel builds Next.js apps and deploys them to Vercel in a few clicks. Next.js is a mature framework with good security tools. But generated code still has to use those tools correctly, and some of the most important checks are easy to leave out.&lt;/p&gt;

&lt;p&gt;This checklist is written for founders, not security experts. Each item explains what to look for in a v0 app and why it matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. How a v0 app is put together
&lt;/h2&gt;

&lt;p&gt;A v0 app is a Next.js app. Some of its code runs in your visitors' browsers and some runs on Vercel's servers: pages rendered on the server, route handlers (your API) and Server Actions (functions the browser can call). Data usually lives in a connected database such as Supabase or Neon, which v0 &lt;a href="https://v0.app/docs/full-stack-apps" rel="noopener noreferrer"&gt;integrates with&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The key question for every piece of code is: does it run on the server or in the browser? Anything in the browser can be read and changed by anyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Secret keys and &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://nextjs.org/docs/app/guides/environment-variables" rel="noopener noreferrer"&gt;Next.js's docs&lt;/a&gt; explain the rule: "By default, environment variables are only available on the server. To expose an environment variable to the browser, it must be prefixed with &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt;."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List every &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; variable. Each one is public. A Stripe secret key, an AI provider key or a database admin key must never have that prefix. &lt;a href="https://v0.app/docs/security" rel="noopener noreferrer"&gt;v0's security docs&lt;/a&gt; say the same: "Never expose sensitive tokens with &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; prefix".&lt;/li&gt;
&lt;li&gt;Store secrets in Vercel's environment variables, and use the Secret type for the most sensitive ones: Vercel says Secret values "are write-only after saving".&lt;/li&gt;
&lt;li&gt;If the project syncs to GitHub, check that no &lt;code&gt;.env&lt;/code&gt; file or key was ever committed. If a secret was ever exposed, rotate it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Server Actions and API routes check the user
&lt;/h2&gt;

&lt;p&gt;This is the most common gap in Next.js apps. &lt;a href="https://nextjs.org/docs/app/guides/authentication" rel="noopener noreferrer"&gt;Next.js's authentication guide&lt;/a&gt; says: "Treat Server Actions with the same security considerations as public-facing API endpoints, and verify if the user is allowed to perform a mutation." The same applies to route handlers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every Server Action and route handler checks the session itself. Next.js's &lt;a href="https://nextjs.org/docs/app/guides/data-security" rel="noopener noreferrer"&gt;data security guide&lt;/a&gt; warns that "a page-level authentication check does not extend to the Server Actions defined within it."&lt;/li&gt;
&lt;li&gt;Don't rely only on proxy (formerly called middleware) for protection. Next.js says it "should not be your only line of defense in protecting your data."&lt;/li&gt;
&lt;li&gt;Check authorization, not just login: is this user allowed to read or change this specific record?&lt;/li&gt;
&lt;li&gt;Admin features check the role on the server, not just in the page layout.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why the warning about middleware? In 2025, a vulnerability (CVE-2025-29927) let attackers skip Next.js middleware on self-hosted apps. Vercel's &lt;a href="https://vercel.com/blog/postmortem-on-next-js-middleware-bypass" rel="noopener noreferrer"&gt;postmortem&lt;/a&gt; says apps hosted on Vercel weren't vulnerable, and fixed versions were released (Next.js 14.2.25 and 15.2.3). Its advice still holds for everyone: "We do not recommend Middleware to be the sole method of protecting routes in your application." Keep Next.js up to date.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Database rules
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If your app uses Supabase from the browser, Row Level Security must be on for every table, with rules that limit each user to their own rows. &lt;a href="https://supabase.com/docs/guides/database/postgres/row-level-security" rel="noopener noreferrer"&gt;Supabase's docs&lt;/a&gt;: "Enable RLS on every table in an exposed schema."&lt;/li&gt;
&lt;li&gt;If your app reaches the database only from server code, each query must filter by the logged-in user.&lt;/li&gt;
&lt;li&gt;Do the two-account test. Sign in as user A and create something. Sign in as user B in another browser and try to see or change it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Deployments and headers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Know what's public. Vercel's Standard &lt;a href="https://vercel.com/docs/deployment-protection" rel="noopener noreferrer"&gt;Deployment Protection&lt;/a&gt; "protects all deployments except production domains". Your production site is public, which is what you want, so anything unfinished must be protected by your own login.&lt;/li&gt;
&lt;li&gt;Add security headers (HSTS, a Content-Security-Policy or &lt;code&gt;frame-ancestors&lt;/code&gt;, &lt;code&gt;X-Content-Type-Options: nosniff&lt;/code&gt;) with &lt;code&gt;headers()&lt;/code&gt; in your Next.js config. &lt;a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" rel="noopener noreferrer"&gt;Next.js's headers docs&lt;/a&gt; have examples.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm audit&lt;/code&gt; for known-vulnerable packages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Payments and abuse
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Stripe webhooks verify the signature (&lt;a href="https://docs.stripe.com/webhooks" rel="noopener noreferrer"&gt;Stripe's docs&lt;/a&gt;), and prices and paid features are checked on the server.&lt;/li&gt;
&lt;li&gt;Rate limits on sign-up, login and AI calls, so one script can't run up your bill.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. What v0 does for you
&lt;/h2&gt;

&lt;p&gt;v0's &lt;a href="https://v0.app/docs/security" rel="noopener noreferrer"&gt;security docs&lt;/a&gt; say it "analyzes &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; usage and warns users about potential security risks". Take those warnings seriously. When v0 is connected to GitHub, it &lt;a href="https://v0.app/docs/github" rel="noopener noreferrer"&gt;opens a pull request&lt;/a&gt; for its changes instead of pushing straight to your base branch, which gives you a natural moment to review what changed, especially in auth and data code.&lt;/p&gt;

&lt;p&gt;What no tool can know is your business rules: who should see which records, and which actions need which role. That's what the server-side checks and the two-account test are for.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Where to start
&lt;/h2&gt;

&lt;p&gt;If you only have an hour: list your &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; variables, open every Server Action and route handler and confirm each one checks the user, and do the two-account test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Want a second pair of eyes?
&lt;/h2&gt;

&lt;p&gt;Axieo Guard is our security audit for AI-built apps, including apps built with v0. A free mini scan checks five high-impact items, including exposed keys and open database tables. A full audit covers 25 checks, with a plain-English report and a recommended fix for every finding. We're a Canadian company, and we only test with your written permission, read-only. &lt;a href="https://axieo.ca/services/axieo-guard?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=v0#request" rel="noopener noreferrer"&gt;Get a free mini scan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>nextjs</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>Is My Replit App Secure? A Plain-English Checklist Before You Launch (2026)</title>
      <dc:creator>Bruce Banaei</dc:creator>
      <pubDate>Tue, 10 Nov 2026 17:28:28 +0000</pubDate>
      <link>https://dev.to/behrouzbk/is-my-replit-app-secure-a-plain-english-checklist-before-you-launch-2026-565i</link>
      <guid>https://dev.to/behrouzbk/is-my-replit-app-secure-a-plain-english-checklist-before-you-launch-2026-565i</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://axieo.ca/blog/is-my-replit-app-secure?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=replit" rel="noopener noreferrer"&gt;Axieo blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Replit Agent can build and publish a full-stack app, with a server, a database and logins, from a conversation. Replit is also unusually clear about who is responsible for what happens next.&lt;/p&gt;

&lt;p&gt;Its &lt;a href="https://docs.replit.com/features/security/shared-responsibility-model" rel="noopener noreferrer"&gt;shared responsibility page&lt;/a&gt; says: "You own the code Agent generates and you're responsible for it." Replit secures the platform. Your app's code, settings and data rules are yours, and the page lists security testing of the app you build as your job.&lt;/p&gt;

&lt;p&gt;This checklist is written for founders, not security experts. Here's what to check before real users arrive.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. How a Replit app is different
&lt;/h2&gt;

&lt;p&gt;Many AI builders put the database directly behind the browser and protect it with database rules. A typical Replit Agent app is different: it has its own server, written in a language like JavaScript or Python, and the server talks to a PostgreSQL database.&lt;/p&gt;

&lt;p&gt;That changes where security lives. There's usually no database rule to fall back on. Every page and API route on your server has to check who is asking and what they're allowed to see.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Check the login on the server, every time
&lt;/h2&gt;

&lt;p&gt;Replit's own guidance for &lt;a href="https://docs.replit.com/features/auth-and-identity/authentication" rel="noopener noreferrer"&gt;Replit Auth&lt;/a&gt; is: "Always validate user authentication server-side before performing sensitive operations."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every API route that reads or changes user data checks the logged-in user first, not just the pages that show the data.&lt;/li&gt;
&lt;li&gt;Queries filter by the logged-in user's id, so user A can't load user B's records by changing a number in the URL.&lt;/li&gt;
&lt;li&gt;Admin routes check the role on the server. Hiding the admin button isn't protection.&lt;/li&gt;
&lt;li&gt;Do the two-account test. Sign in as user A and create something. Sign in as user B in another browser and try to open A's record by its address or id.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Secrets stay on the server
&lt;/h2&gt;

&lt;p&gt;Replit's &lt;a href="https://docs.replit.com/learn/security-checklist" rel="noopener noreferrer"&gt;security checklist&lt;/a&gt; says to "use Replit Secrets to store sensitive information like API keys" and that "API credentials should always remain server-side".&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No keys written directly in the code, especially if the project is ever shared or public.&lt;/li&gt;
&lt;li&gt;No secret reaches the browser. Search your front-end code and the page source of the live app for &lt;code&gt;sk_live&lt;/code&gt;, &lt;code&gt;sk-&lt;/code&gt; and &lt;code&gt;whsec_&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If a key was ever exposed, rotate it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. The production database
&lt;/h2&gt;

&lt;p&gt;Replit gives every app two databases. Its &lt;a href="https://docs.replit.com/features/data-and-storage/development-and-production" rel="noopener noreferrer"&gt;docs&lt;/a&gt; explain: "Your published app gets its own production database, separate from the development database you use while building." That's good: you can test without touching real users' data.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Never copy real customer data into the development database to test something.&lt;/li&gt;
&lt;li&gt;Check how backups work for production, and that you know how to restore one.&lt;/li&gt;
&lt;li&gt;Build queries with parameters, never by pasting user input into SQL text.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Who can open your app
&lt;/h2&gt;

&lt;p&gt;Apps in a personal Replit workspace &lt;a href="https://docs.replit.com/features/publishing/private-deployments" rel="noopener noreferrer"&gt;default to Public&lt;/a&gt;: "Anyone on the internet with the URL can use your app." That's what you want for a launch. It's not what you want for an internal tool or an unfinished admin dashboard, so check the setting.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Payments and abuse
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Stripe webhooks verify the signature (&lt;a href="https://docs.stripe.com/webhooks" rel="noopener noreferrer"&gt;Stripe's docs&lt;/a&gt;), and paid features are checked on the server.&lt;/li&gt;
&lt;li&gt;Rate limits on sign-up, login and anything that costs you money, like AI calls. Without them, one script can run up your bill overnight.&lt;/li&gt;
&lt;li&gt;Basic security headers, and &lt;code&gt;npm audit&lt;/code&gt; (or your language's equivalent) for known-vulnerable packages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Use Replit's own security scans
&lt;/h2&gt;

&lt;p&gt;Replit &lt;a href="https://docs.replit.com/features/security/project-security-center" rel="noopener noreferrer"&gt;scans your dependencies&lt;/a&gt; against public vulnerability records, reviews the files Agent changes "for common insecure patterns and hardcoded secrets", and runs a security scan before publishing. Use all of it.&lt;/p&gt;

&lt;p&gt;Replit also describes these automatic checks as ones that "complement, rather than replace, a full Agent security scan". And no scanner can know your business rules: that a customer shouldn't see another customer's invoices, or that only managers may change prices. That's what the server-side checks and the two-account test are for.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Where to start
&lt;/h2&gt;

&lt;p&gt;If you only have an hour: run Replit's security scan, list every API route and confirm each one checks the logged-in user, and do the two-account test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Want a second pair of eyes?
&lt;/h2&gt;

&lt;p&gt;Axieo Guard is our security audit for AI-built apps, including apps built with Replit. A free mini scan checks five high-impact items, including exposed keys. A full audit covers 25 checks, translated to your server and database, with a plain-English report and a recommended fix for every finding. We're a Canadian company, and we only test with your written permission, read-only. &lt;a href="https://axieo.ca/services/axieo-guard?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=replit#request" rel="noopener noreferrer"&gt;Get a free mini scan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Is My Bolt.new App Secure? A Plain-English Security Checklist (2026)</title>
      <dc:creator>Bruce Banaei</dc:creator>
      <pubDate>Tue, 10 Nov 2026 17:27:19 +0000</pubDate>
      <link>https://dev.to/behrouzbk/is-my-boltnew-app-secure-a-plain-english-security-checklist-2026-1j4j</link>
      <guid>https://dev.to/behrouzbk/is-my-boltnew-app-secure-a-plain-english-security-checklist-2026-1j4j</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://axieo.ca/blog/is-my-bolt-app-secure?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=bolt" rel="noopener noreferrer"&gt;Axieo blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Bolt.new can turn a prompt into a working app with a database, logins and hosting in an afternoon. That speed is the point. But an app that works in the demo isn't automatically safe with real users, and the gaps are usually in the parts you never asked for.&lt;/p&gt;

&lt;p&gt;This checklist is written for founders, not security experts. It covers what Bolt checks for you, what it doesn't, and what to test yourself before you share the link.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. How a Bolt app is put together
&lt;/h2&gt;

&lt;p&gt;Most Bolt apps have a front end that runs in your visitors' browsers and a database behind it. &lt;a href="https://support.bolt.new/bolt-cloud/database" rel="noopener noreferrer"&gt;Bolt's docs&lt;/a&gt; say "every Bolt project can have a built-in database", and on Pro or Teams plans you can choose Supabase instead when you create the project.&lt;/p&gt;

&lt;p&gt;Either way, the database is protected by Row Level Security (RLS): rules that decide who can read and change each row. Bolt's &lt;a href="https://support.bolt.new/bolt-cloud/database/security" rel="noopener noreferrer"&gt;database security page&lt;/a&gt; puts it plainly: "A table without RLS can be read and changed by anyone."&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Database rules (the most important part)
&lt;/h2&gt;

&lt;p&gt;Bolt "turns on RLS for the tables it creates". That's a good start, but turned on isn't the same as correct. Bolt's docs also say that for apps without sign-in, it "might write policies that allow any visitor to view, add, change, and delete the data in your database."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the Security tab and look for the &lt;code&gt;RLS Policy Always True&lt;/code&gt; warning. Bolt says this tab "uses the same database checks as the Security Advisor in Supabase". An always-true rule on user data means anyone can read or change it.&lt;/li&gt;
&lt;li&gt;Check tables you or your team added later, outside Bolt. Every table needs RLS.&lt;/li&gt;
&lt;li&gt;Do the two-account test. Sign up as user A and create something. Log in as user B in another browser and try to see or change A's data. If you can, the rules need to compare the logged-in user with the row's owner.&lt;/li&gt;
&lt;li&gt;Keep private files in private storage. ID scans, invoices and contracts shouldn't be in a public bucket.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Secret keys
&lt;/h2&gt;

&lt;p&gt;Bolt apps are usually built with Vite, and &lt;a href="https://vite.dev/guide/env-and-mode" rel="noopener noreferrer"&gt;Vite's docs&lt;/a&gt; are clear: "&lt;code&gt;VITE_*&lt;/code&gt; variables should not contain sensitive information such as API keys." Every &lt;code&gt;VITE_&lt;/code&gt; value ends up in the browser, where anyone can read it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only public values in &lt;code&gt;VITE_&lt;/code&gt; variables: your database URL and the publishable (anon) key. Never a Stripe secret key, an AI provider key or a database admin key.&lt;/li&gt;
&lt;li&gt;Keep real secrets in Bolt's Secrets settings and use them only in server-side code.&lt;/li&gt;
&lt;li&gt;If your project syncs to GitHub, check that no &lt;code&gt;.env&lt;/code&gt; file or key was ever committed. Deleting it later doesn't remove it from git history. If a secret was ever exposed, rotate it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Logins and admin pages
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Admin pages must be protected by the database and the server, not just hidden in the menu. Anyone can open the browser's developer tools.&lt;/li&gt;
&lt;li&gt;Roles such as "admin" must not live in a field users can edit on their own profile.&lt;/li&gt;
&lt;li&gt;Email confirmation on, sensible password rules, and redirect URLs limited to your own domains.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Payments
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Stripe webhooks must verify the signature, or anyone can send a fake "payment succeeded". See &lt;a href="https://docs.stripe.com/webhooks" rel="noopener noreferrer"&gt;Stripe's webhook docs&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Prices and paid features are checked on the server. If the browser decides what's unlocked, people can unlock it themselves.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Hosting
&lt;/h2&gt;

&lt;p&gt;Bolt can publish your app to an address ending in &lt;code&gt;bolt.host&lt;/code&gt;, or you can deploy elsewhere. If you use Netlify, note that Bolt's &lt;a href="https://support.bolt.new/integrations/netlify" rel="noopener noreferrer"&gt;Netlify page&lt;/a&gt; says it "can't host a database or a traditional backend", so make sure every server-side check still runs somewhere secure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTPS only, plus basic security headers (a Content-Security-Policy and clickjacking protection).&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;npm audit&lt;/code&gt; for known-vulnerable packages.&lt;/li&gt;
&lt;li&gt;Separate test data from real users' data, and know how you'd restore a backup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Use Bolt's own security tools first
&lt;/h2&gt;

&lt;p&gt;Bolt has a database check on all plans and a fuller project security audit on paid plans. &lt;a href="https://support.bolt.new/building/security" rel="noopener noreferrer"&gt;Bolt's security docs&lt;/a&gt; suggest running the audit "at least once before you publish". It checks, among other things, that "private keys and passwords aren't stored in your project's code or sent to visitors' browsers."&lt;/p&gt;

&lt;p&gt;Run it, and review every change it proposes before you accept it. A tool can only check what it was designed to check. It can't know that a table was meant to be private, or that a manager shouldn't see another team's data. That's what the two-account test and a human review are for.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Where to start
&lt;/h2&gt;

&lt;p&gt;If you only have an hour: run Bolt's database check and fix every &lt;code&gt;RLS Policy Always True&lt;/code&gt; warning on user data, search your code for secret keys, and do the two-account test. Our &lt;a href="https://axieo.ca/checklist?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=bolt" rel="noopener noreferrer"&gt;free 10-point security self-check&lt;/a&gt; walks through these for Supabase-style databases, with where to click.&lt;/p&gt;

&lt;h2&gt;
  
  
  Want a second pair of eyes?
&lt;/h2&gt;

&lt;p&gt;Axieo Guard is our security audit for AI-built apps, including apps built with Bolt.new. A free mini scan checks five high-impact items, including exposed keys and open database tables. A full audit covers 25 checks, with a plain-English report and a recommended fix for every finding. We're a Canadian company, and we only test with your written permission, read-only. &lt;a href="https://axieo.ca/services/axieo-guard?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=platform-articles&amp;amp;utm_content=bolt#request" rel="noopener noreferrer"&gt;Get a free mini scan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
    <item>
      <title>tokensaver: see what your LLM prompts really cost, and exactly what to cut</title>
      <dc:creator>Bruce Banaei</dc:creator>
      <pubDate>Fri, 06 Nov 2026 18:09:46 +0000</pubDate>
      <link>https://dev.to/behrouzbk/tokensaver-see-what-your-llm-prompts-really-cost-and-exactly-what-to-cut-52be</link>
      <guid>https://dev.to/behrouzbk/tokensaver-see-what-your-llm-prompts-really-cost-and-exactly-what-to-cut-52be</guid>
      <description>&lt;p&gt;Every call to an LLM API is billed per token. The system prompt, the tool definitions,&lt;br&gt;
the format rules: you pay for all of it on every single request.&lt;/p&gt;

&lt;p&gt;Most prompts carry waste nobody notices. A JSON schema pretty-printed with deep&lt;br&gt;
indentation. A rule written twice in different words. A paragraph pasted twice.&lt;br&gt;
"I would like you to please…" in front of an instruction. Each costs a few tokens, on&lt;br&gt;
every call, forever.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/behrouzbk/tokensaver" rel="noopener noreferrer"&gt;&lt;strong&gt;tokensaver&lt;/strong&gt;&lt;/a&gt; is a free, open-source command-line&lt;br&gt;
tool that finds that waste, tells you what each fix saves in tokens &lt;strong&gt;and dollars&lt;/strong&gt;, and&lt;br&gt;
applies only the changes that can't change what your prompt means.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;prompt-tokensaver
tokensaver optimize prompt.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It runs &lt;strong&gt;fully offline&lt;/strong&gt;. Your prompts never leave your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it can do
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Count tokens and cost: &lt;code&gt;count&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tokensaver count prompt.txt &lt;span class="nt"&gt;--model&lt;/span&gt; gpt-4o
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One number per prompt: tokens, cost per call and cost per 1,000 calls. On the bundled&lt;br&gt;
example, a customer-support system prompt, that's 834 tokens, $2.08 per 1,000 calls on&lt;br&gt;
GPT-4o.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Find the cheapest model: &lt;code&gt;compare&lt;/code&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tokensaver compare prompt.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The same prompt across 20 OpenAI, Anthropic and Google models, cheapest first:&lt;/p&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;Tokens&lt;/th&gt;
&lt;th&gt;$ per 1k calls&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;gpt-4o-mini&lt;/td&gt;
&lt;td&gt;834&lt;/td&gt;
&lt;td&gt;$0.13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gemini-2.5-flash&lt;/td&gt;
&lt;td&gt;~876&lt;/td&gt;
&lt;td&gt;$0.26&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gpt-4o&lt;/td&gt;
&lt;td&gt;834&lt;/td&gt;
&lt;td&gt;$2.08&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;claude-sonnet-5-5&lt;/td&gt;
&lt;td&gt;~1,251&lt;/td&gt;
&lt;td&gt;$2.50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same prompt, a 20× price difference between the cheapest and the most expensive of these&lt;br&gt;
four. Counts are &lt;strong&gt;exact&lt;/strong&gt; for OpenAI models and clearly marked as &lt;strong&gt;estimates&lt;/strong&gt; (&lt;code&gt;~&lt;/code&gt;)&lt;br&gt;
for Claude and Gemini, because there's no offline tokenizer for those.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Get concrete, priced suggestions: &lt;code&gt;optimize&lt;/code&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tokensaver optimize prompt.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This is the heart of tokensaver. Six rules look for waste:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rule&lt;/th&gt;
&lt;th&gt;What it finds&lt;/th&gt;
&lt;th&gt;Risk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Pretty-printed JSON. Minified and re-parsed to prove the data didn't change.&lt;/td&gt;
&lt;td&gt;safe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;whitespace&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Trailing spaces, extra blank lines.&lt;/td&gt;
&lt;td&gt;safe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;duplicates&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Duplicate lines and (near-)duplicate paragraphs.&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;repeated-instructions&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The same rule in different words ("Always respond in JSON" … "Remember to always respond in JSON").&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;filler&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"I would like you to please…", "As an AI language model…", "Thanks in advance!", "in order to" → "to".&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;long-examples&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Few-shot examples over ~150 tokens, or too many of them. Flagged, never edited.&lt;/td&gt;
&lt;td&gt;flag&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every suggestion is &lt;strong&gt;measured&lt;/strong&gt;: tokensaver counts the prompt before and after the&lt;br&gt;
change on your model, so you see the real saving, not a guess.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safe&lt;/strong&gt; changes are applied by default. &lt;strong&gt;Review&lt;/strong&gt; changes are listed with their savings&lt;br&gt;
and applied only when you ask. Your original file is never overwritten.&lt;/p&gt;

&lt;p&gt;On the bundled example prompt:&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;Tokens&lt;/th&gt;
&lt;th&gt;Saved&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Before&lt;/td&gt;
&lt;td&gt;834&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Safe fixes only (default)&lt;/td&gt;
&lt;td&gt;772&lt;/td&gt;
&lt;td&gt;−7.4%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;All fixes (&lt;code&gt;--apply all&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;665&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;−20.3%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's &lt;strong&gt;$422 per million calls&lt;/strong&gt; on GPT-4o, from one prompt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tokensaver optimize prompt.txt &lt;span class="nt"&gt;--apply&lt;/span&gt; all &lt;span class="nt"&gt;-o&lt;/span&gt; prompt.min.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Scan a whole project: &lt;code&gt;scan&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tokensaver scan prompts/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measures every prompt file in a folder and its subfolders: tokens, cost, and what the&lt;br&gt;
safe fixes and all fixes would save, &lt;strong&gt;biggest saving first&lt;/strong&gt;, with a total. It's the&lt;br&gt;
fastest way to find which prompt in a repo is worth fixing first. Nothing is changed.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. See what you pay for on every call: &lt;code&gt;request&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;New in 0.3. A request isn't just the user's message. It also carries the system prompt&lt;br&gt;
and the tool schemas, and those are the same on every call.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tokensaver request &lt;span class="nt"&gt;--system&lt;/span&gt; system.md &lt;span class="nt"&gt;--tools&lt;/span&gt; tools.json &lt;span class="nt"&gt;--user&lt;/span&gt; &lt;span class="s2"&gt;"Where is my order?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;System prompt&lt;/td&gt;
&lt;td&gt;834&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool schemas (2 tools)&lt;/td&gt;
&lt;td&gt;~142&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fixed part&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~976&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User message "Where is my order?"&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The fixed part is &lt;strong&gt;99% of the request&lt;/strong&gt;. Repeat &lt;code&gt;--user&lt;/code&gt; to compare several messages,&lt;br&gt;
for example the same question in different languages: the user part changes, the fixed&lt;br&gt;
part doesn't.&lt;/p&gt;

&lt;p&gt;Shrink the fixed part and every request gets cheaper. On a 431-token support-bot prompt,&lt;br&gt;
&lt;code&gt;optimize --apply all&lt;/code&gt; brought it to 310 tokens, and each request dropped by 21%.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--tools&lt;/code&gt; reads OpenAI or Anthropic tool JSON, or a whole request body.&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Use it in scripts and CI: &lt;code&gt;--json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Every command can print one JSON object instead of tables. For example, fail a CI job&lt;br&gt;
when a prompt picks up easy savings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;saved&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;tokensaver optimize prompts/system.txt &lt;span class="nt"&gt;--json&lt;/span&gt; | jq .tokens_saved&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$saved&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-le&lt;/span&gt; 50 &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Prompt has &lt;/span&gt;&lt;span class="nv"&gt;$saved&lt;/span&gt;&lt;span class="s2"&gt; tokens of easy savings"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit &lt;/span&gt;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Built to be trusted
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Offline by design.&lt;/strong&gt; No network calls, no telemetry. The tokenizer files ship inside
the package and are checked against their published hashes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honest numbers.&lt;/strong&gt; Exact counts are labelled exact; estimates always carry a &lt;code&gt;~&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never changes meaning silently.&lt;/strong&gt; Anything that could change meaning waits for your
review. Few-shot examples and code blocks are never reworded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Works in your language.&lt;/strong&gt; Token counting and the JSON, whitespace and duplicate rules
are tested in CI on &lt;strong&gt;55 languages&lt;/strong&gt;, including right-to-left scripts and languages
without spaces. The filler rule understands English and Persian, with more on the way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Well tested.&lt;/strong&gt; 283 tests, CI on Windows, macOS and Linux with Python 3.10 and 3.13. MIT
licensed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it in five minutes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;prompt-tokensaver
tokensaver optimize your_prompt.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Want a guided run? The&lt;br&gt;
&lt;a href="https://github.com/behrouzbk/tokensaver/blob/main/examples/README.md" rel="noopener noreferrer"&gt;step-by-step test guide&lt;/a&gt;&lt;br&gt;
downloads two sample prompts and a tools file, and shows the expected output for every&lt;br&gt;
command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Help tokensaver grow
&lt;/h2&gt;

&lt;p&gt;tokensaver is young, and every bit of help makes a difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⭐ &lt;strong&gt;Star the repo&lt;/strong&gt; at &lt;a href="https://github.com/behrouzbk/tokensaver" rel="noopener noreferrer"&gt;github.com/behrouzbk/tokensaver&lt;/a&gt;.
It's the main way other developers find it.&lt;/li&gt;
&lt;li&gt;📣 &lt;strong&gt;Share it&lt;/strong&gt; with a teammate who pays an LLM bill, or post your before/after numbers.&lt;/li&gt;
&lt;li&gt;🐛 &lt;strong&gt;Try it on your prompts&lt;/strong&gt; and &lt;a href="https://github.com/behrouzbk/tokensaver/issues" rel="noopener noreferrer"&gt;open an issue&lt;/a&gt;
for anything confusing, wrong or missing.&lt;/li&gt;
&lt;li&gt;🌍 &lt;strong&gt;Speak another language?&lt;/strong&gt; Add filler phrases for it in
&lt;a href="https://github.com/behrouzbk/tokensaver/issues/5" rel="noopener noreferrer"&gt;issue #5&lt;/a&gt;. No code needed, though PRs
are welcome.&lt;/li&gt;
&lt;li&gt;🛠️ &lt;strong&gt;Want to contribute code?&lt;/strong&gt; Each optimizer rule is one small file with its own
tests. &lt;a href="https://github.com/behrouzbk/tokensaver/issues/1" rel="noopener noreferrer"&gt;Issue #1&lt;/a&gt; is a good first
issue, and &lt;a href="https://github.com/behrouzbk/tokensaver/blob/main/CONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt;
gets you to green tests in about five minutes.&lt;/li&gt;
&lt;li&gt;📏 &lt;strong&gt;Have access to Claude or Gemini token counters?&lt;/strong&gt; Help calibrate the estimates in
&lt;a href="https://github.com/behrouzbk/tokensaver/issues/3" rel="noopener noreferrer"&gt;issue #3&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;count&lt;/code&gt;, &lt;code&gt;compare&lt;/code&gt;, &lt;code&gt;optimize&lt;/code&gt;, &lt;code&gt;scan&lt;/code&gt; and &lt;code&gt;request&lt;/code&gt;: from "how many tokens?" to "what
should I change, and what does it save?"&lt;/li&gt;
&lt;li&gt;20 models, exact counts for OpenAI, labelled estimates for Claude and Gemini.&lt;/li&gt;
&lt;li&gt;A typical support prompt: −20.3% tokens, about $422 per million calls on GPT-4o.&lt;/li&gt;
&lt;li&gt;Offline, MIT, tested on 55 languages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;pip install prompt-tokensaver&lt;/code&gt; and give it one of your prompts. If it saves you tokens,&lt;br&gt;
a ⭐ on &lt;a href="https://github.com/behrouzbk/tokensaver" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; helps others find it.&lt;/p&gt;

</description>
      <category>cli</category>
      <category>llm</category>
      <category>opensource</category>
      <category>tools</category>
    </item>
    <item>
      <title>The language token tax: why your non-English prompts cost more, and what to do about it</title>
      <dc:creator>Bruce Banaei</dc:creator>
      <pubDate>Thu, 29 Oct 2026 21:47:52 +0000</pubDate>
      <link>https://dev.to/behrouzbk/the-language-token-tax-why-your-non-english-prompts-cost-more-and-what-to-do-about-it-ib2</link>
      <guid>https://dev.to/behrouzbk/the-language-token-tax-why-your-non-english-prompts-cost-more-and-what-to-do-about-it-ib2</guid>
      <description>&lt;p&gt;AI APIs don't bill you per word. They bill you per &lt;strong&gt;token&lt;/strong&gt;, and a token is whatever&lt;br&gt;
the model's tokenizer decided a piece of text should be.&lt;/p&gt;

&lt;p&gt;That sounds like a detail until you count. Here's one instruction, "Always answer in&lt;br&gt;
JSON format.", on GPT-4o's tokenizer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;English: &lt;strong&gt;6 tokens&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Hindi: &lt;strong&gt;9 tokens&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Punjabi: &lt;strong&gt;18 tokens&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same meaning, three times the price. I've started calling this the &lt;strong&gt;language token&lt;br&gt;
tax&lt;/strong&gt;, and if you ship LLM features outside English, you're paying it on every call.&lt;/p&gt;
&lt;h2&gt;
  
  
  Tokens are not words
&lt;/h2&gt;

&lt;p&gt;Modern tokenizers learn their vocabulary from training data. They see a huge amount of&lt;br&gt;
English, so common English words become single tokens: &lt;code&gt;answer&lt;/code&gt;, &lt;code&gt;format&lt;/code&gt;, &lt;code&gt;always&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Languages that show up less often in that data don't get that treatment. Their words&lt;br&gt;
are split into smaller pieces, sometimes down to single characters or raw bytes. More&lt;br&gt;
pieces means more tokens, and more tokens means a bigger bill and less room in the&lt;br&gt;
context window.&lt;/p&gt;
&lt;h2&gt;
  
  
  I measured it in 55 languages
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/behrouzbk/tokensaver" rel="noopener noreferrer"&gt;tokensaver&lt;/a&gt;, the open-source prompt-cost tool&lt;br&gt;
I maintain, has a test that runs the same sentence in 55 languages. So I counted every&lt;br&gt;
one of them with &lt;code&gt;o200k_base&lt;/code&gt;, the tokenizer behind GPT-4o and OpenAI's other current&lt;br&gt;
models:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;Tokens&lt;/th&gt;
&lt;th&gt;vs. English&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;English&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;1.0×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spanish&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;1.2×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;French, Russian, Persian, Chinese (Simplified)&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;1.3×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;German, Arabic, Hindi, Japanese&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;1.5×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Korean, Swahili&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;1.7×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bengali&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;1.8×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tamil, Burmese&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;2.3×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Telugu&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;2.8×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Punjabi (Gurmukhi)&lt;/td&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;3.0×&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;36 of the 55 languages needed at least 1.5× as many tokens as English.&lt;/strong&gt; Not one of&lt;br&gt;
them came out cheaper.&lt;/p&gt;

&lt;p&gt;You can check this yourself in a few lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tiktoken&lt;/span&gt;

&lt;span class="n"&gt;enc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tiktoken&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_encoding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;o200k_base&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;English&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Always answer in JSON format.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hindi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;हमेशा JSON प्रारूप में उत्तर दें।&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tamil&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;எப்போதும் JSON வடிவத்தில் பதிலளிக்கவும்.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;enc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; tokens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  It used to be much worse
&lt;/h2&gt;

&lt;p&gt;The older &lt;code&gt;cl100k_base&lt;/code&gt; tokenizer, used by GPT-4 and GPT-3.5 Turbo, shows how much has&lt;br&gt;
changed. Same sentence:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;cl100k_base (older)&lt;/th&gt;
&lt;th&gt;o200k_base (current)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;English&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hindi&lt;/td&gt;
&lt;td&gt;28 (4.7×)&lt;/td&gt;
&lt;td&gt;9 (1.5×)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bengali&lt;/td&gt;
&lt;td&gt;36 (6.0×)&lt;/td&gt;
&lt;td&gt;11 (1.8×)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tamil&lt;/td&gt;
&lt;td&gt;47 (7.8×)&lt;/td&gt;
&lt;td&gt;14 (2.3×)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Telugu&lt;/td&gt;
&lt;td&gt;71 (11.8×)&lt;/td&gt;
&lt;td&gt;17 (2.8×)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Newer tokenizers have narrowed the gap a lot, but they haven't closed it. Two practical&lt;br&gt;
takeaways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;If you're still on an older model, the tax may be several times bigger than you
think.&lt;/strong&gt; Moving to a newer model can cut tokens for non-English prompts even before
you touch the prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every provider tokenizes differently.&lt;/strong&gt; Claude and Gemini use their own tokenizers,
and there's no offline way to count them exactly. Measure on the model you actually
use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A word of caution: this is one short sentence. Ratios move around with the text, so&lt;br&gt;
treat these numbers as a direction, not a price list. Before you budget a product in&lt;br&gt;
another language, count your own prompts in that language.&lt;/p&gt;
&lt;h2&gt;
  
  
  What you can't fix, and what you can
&lt;/h2&gt;

&lt;p&gt;You can't change how a tokenizer splits Tamil. But a lot of what makes prompts expensive&lt;br&gt;
has nothing to do with language:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pretty-printed JSON.&lt;/strong&gt; Indentation and line breaks cost tokens in every script.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplicated rules.&lt;/strong&gt; A rule pasted twice is paid for twice, in any language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extra whitespace.&lt;/strong&gt; Trailing spaces and runs of blank lines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are exactly the fixes that work everywhere, so I made sure tokensaver applies them&lt;br&gt;
in any language. I tested it on three sample prompts with that kind of waste: one each&lt;br&gt;
in English, Persian and Chinese. Here are the results on GPT-4o with&lt;br&gt;
&lt;code&gt;tokensaver optimize --apply all&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;th&gt;Saved&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;English&lt;/td&gt;
&lt;td&gt;486&lt;/td&gt;
&lt;td&gt;386&lt;/td&gt;
&lt;td&gt;−20.6%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Persian&lt;/td&gt;
&lt;td&gt;350&lt;/td&gt;
&lt;td&gt;259&lt;/td&gt;
&lt;td&gt;−26.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chinese (Simplified)&lt;/td&gt;
&lt;td&gt;273&lt;/td&gt;
&lt;td&gt;189&lt;/td&gt;
&lt;td&gt;−30.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The non-English prompts saved &lt;em&gt;more&lt;/em&gt;, in percentage terms. When every word costs more&lt;br&gt;
tokens, removing a duplicated paragraph removes more tokens too.&lt;/p&gt;

&lt;p&gt;Trying it on your own prompt takes two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;prompt-tokensaver
tokensaver optimize prompt.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every suggestion shows the tokens and dollars it saves on your model. Safe changes, like&lt;br&gt;
minifying JSON, are applied automatically; tokensaver re-parses the JSON to make sure&lt;br&gt;
the data didn't change. Anything that could change meaning, like removing a duplicate,&lt;br&gt;
waits for you to review it. It runs fully offline, so your prompts never leave your&lt;br&gt;
machine.&lt;/p&gt;

&lt;p&gt;To see what the same prompt costs across models, cheapest first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tokensaver compare prompt.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Filler is language-specific, so it needs native speakers
&lt;/h2&gt;

&lt;p&gt;One kind of waste &lt;em&gt;is&lt;/em&gt; tied to language: polite filler. "I would like you to please…" or&lt;br&gt;
"Thanks in advance!" costs tokens and changes nothing about what the model does.&lt;/p&gt;

&lt;p&gt;You can't write those rules from a dictionary. You need someone who knows which phrases&lt;br&gt;
are truly empty, and which ones only look empty.&lt;/p&gt;

&lt;p&gt;This week, a native Persian speaker contributed exactly that. tokensaver now removes&lt;br&gt;
«لطفاً» ("please"), «از تو می‌خواهم که…» ("I want you to…") and «ممنون می‌شوم اگر…»&lt;br&gt;
("I'd appreciate it if…"). It handles the different ways people actually type them, with&lt;br&gt;
or without the invisible zero-width joiner in the middle of a word.&lt;/p&gt;

&lt;p&gt;Just as interesting is what we &lt;strong&gt;left out&lt;/strong&gt;: «اگر امکان دارد», "if possible". It looks&lt;br&gt;
like filler, but "if possible, also write tests" is a real condition. Delete it and an&lt;br&gt;
optional request becomes mandatory. That's the kind of call only a native speaker can&lt;br&gt;
make with confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your language next?
&lt;/h2&gt;

&lt;p&gt;The filler rule now understands English and Persian. If you speak another language, I'd&lt;br&gt;
love your help: list 3–5 phrases that never change what the model should do, in&lt;br&gt;
&lt;a href="https://github.com/behrouzbk/tokensaver/issues/5" rel="noopener noreferrer"&gt;issue #5&lt;/a&gt;. No code required, though PRs&lt;br&gt;
are very welcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You pay per token, and most non-English text needs more tokens for the same meaning:
1.5× or more for 36 of 55 languages in my test, up to 3× for Punjabi.&lt;/li&gt;
&lt;li&gt;Newer tokenizers are much fairer than older ones, so check which one your model uses.&lt;/li&gt;
&lt;li&gt;You can't fix the tokenizer, but JSON minification, duplicate removal and whitespace
cleanup work in any language. On my sample prompts they cut 26% in Persian and 31% in
Chinese.&lt;/li&gt;
&lt;li&gt;Measure your own prompts:
&lt;a href="https://github.com/behrouzbk/tokensaver" rel="noopener noreferrer"&gt;github.com/behrouzbk/tokensaver&lt;/a&gt; (MIT,
offline, &lt;code&gt;pip install prompt-tokensaver&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this was useful, a ⭐ on the repo helps other people find it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>python</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
