<?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: ProKit</title>
    <description>The latest articles on DEV Community by ProKit (@prokittools).</description>
    <link>https://dev.to/prokittools</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%2F4278914%2F74632bf7-a000-4ecc-9847-bdc979e5a11d.png</url>
      <title>DEV Community: ProKit</title>
      <link>https://dev.to/prokittools</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prokittools"/>
    <language>en</language>
    <item>
      <title>Nine AI Coding Agents, One Question: What Stops a Bad Command by Default?</title>
      <dc:creator>ProKit</dc:creator>
      <pubDate>Sat, 05 Dec 2026 11:36:54 +0000</pubDate>
      <link>https://dev.to/prokittools/nine-ai-coding-agents-one-question-what-stops-a-bad-command-by-default-ob1</link>
      <guid>https://dev.to/prokittools/nine-ai-coding-agents-one-question-what-stops-a-bad-command-by-default-ob1</guid>
      <description>&lt;p&gt;Every coding agent has a permission model. Most people never look at it until something goes wrong, and the defaults differ more than the marketing suggests. I read the vendor documentation for nine of them on 2026-12-01 and wrote down four things per tool: how approval works, whether there is a sandbox, what the filesystem boundary is, and whether the network is open.&lt;/p&gt;

&lt;p&gt;Here is what stood out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The network default is the one that bites
&lt;/h2&gt;

&lt;p&gt;Filesystem boundaries get all the attention, but outbound network is where data leaves. Three different defaults showed up in nine tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Off by default&lt;/strong&gt;: OpenAI Codex CLI. The sandbox is on by default in workspace-write mode, and &lt;code&gt;network_access&lt;/code&gt; is false until you turn it on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On by default&lt;/strong&gt;: Gemini CLI's default macOS Seatbelt profile allows network. nono, the sandbox wrapper, also allows network unless you pass &lt;code&gt;--block-net&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deny by default&lt;/strong&gt;: NVIDIA OpenShell allows only approved destinations, and Docker Sandboxes routes outbound TCP through a host proxy limited by network policy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claude Code sits in a fourth spot: the OS sandbox is optional and off by default, but when you turn it on, outbound traffic goes through a local proxy with an allowlist that starts empty. That is a strong default once enabled, and nothing at all before.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approval is not the same as isolation
&lt;/h2&gt;

&lt;p&gt;Several of these tools have rich approval settings and no sandbox, and that is fine as long as you know which one you bought.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cline&lt;/strong&gt; has no fixed command allowlist. The model marks each command with a &lt;code&gt;requires_approval&lt;/code&gt; flag, so what counts as safe is decided per command by the model. The docs call their examples not guarantees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;goose&lt;/strong&gt; ships three modes, and the docs warn that Completely Autonomous is applied by default. Each session keeps the mode it started with when you change the default later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenCode&lt;/strong&gt; has ordered rules with allow, deny and ask effects, and the &lt;strong&gt;last&lt;/strong&gt; matching rule wins. That is the reverse of Claude Code, where deny is evaluated first. If you carry your mental model from one tool to the other, you will get it backwards.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Read access is the quiet one
&lt;/h2&gt;

&lt;p&gt;Claude Code's sandbox limits writes to the working directory, a temp directory and any directories you add. Reads are a different story: with the sandbox on, reads cover most of the machine, including &lt;code&gt;~/.ssh&lt;/code&gt; and &lt;code&gt;~/.aws/credentials&lt;/code&gt;, unless you add &lt;code&gt;denyRead&lt;/code&gt;. The sandbox also covers shell commands only. Read, Edit, Write, WebFetch, WebSearch, MCP servers and hooks run outside it and follow the permission rules instead.&lt;/p&gt;

&lt;p&gt;Docker Sandboxes flips the usual file-safety concern. By default the workspace directory is mounted read-write, so the agent edits your tree in place. &lt;code&gt;--clone&lt;/code&gt; mounts the repo read-only and gives the agent a private clone to work in. Inside the microVM the agent has full control, sudo included; the VM boundary is the trust boundary, which is a clean way to think about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Sandbox default&lt;/th&gt;
&lt;th&gt;Network default&lt;/th&gt;
&lt;th&gt;The detail worth knowing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;Off (optional)&lt;/td&gt;
&lt;td&gt;Proxied, empty allowlist, once on&lt;/td&gt;
&lt;td&gt;Reads reach most of the machine unless denied&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex CLI&lt;/td&gt;
&lt;td&gt;On (workspace-write)&lt;/td&gt;
&lt;td&gt;Off&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.git&lt;/code&gt; stays read-only inside writable roots&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini CLI&lt;/td&gt;
&lt;td&gt;Opt-in&lt;/td&gt;
&lt;td&gt;Allowed (default profile)&lt;/td&gt;
&lt;td&gt;Windows sandbox ACL changes persist after the session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenCode&lt;/td&gt;
&lt;td&gt;None described&lt;/td&gt;
&lt;td&gt;Rule-based, not OS-level&lt;/td&gt;
&lt;td&gt;Last matching rule wins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cline&lt;/td&gt;
&lt;td&gt;None described&lt;/td&gt;
&lt;td&gt;Separate toggles&lt;/td&gt;
&lt;td&gt;Model decides what needs approval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;goose&lt;/td&gt;
&lt;td&gt;None described&lt;/td&gt;
&lt;td&gt;Not described&lt;/td&gt;
&lt;td&gt;Autonomous is the default mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;nono&lt;/td&gt;
&lt;td&gt;Kernel-enforced wrapper&lt;/td&gt;
&lt;td&gt;Allowed by default&lt;/td&gt;
&lt;td&gt;A filesystem-only profile does not stop exfiltration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Docker Sandboxes&lt;/td&gt;
&lt;td&gt;microVM&lt;/td&gt;
&lt;td&gt;Proxy with allowlist&lt;/td&gt;
&lt;td&gt;Direct mount by default, &lt;code&gt;--clone&lt;/code&gt; for isolation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenShell&lt;/td&gt;
&lt;td&gt;Landlock + seccomp&lt;/td&gt;
&lt;td&gt;Deny by default&lt;/td&gt;
&lt;td&gt;v0.1.11 at check time, policy format may change&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What I do with this
&lt;/h2&gt;

&lt;p&gt;Three habits, in order of payoff:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find the network setting first. If it is open, decide whether that is intended before the first task, not after.&lt;/li&gt;
&lt;li&gt;Write down the rule order. First-match-deny and last-match-wins behave differently on the same config, and one of them will surprise you.&lt;/li&gt;
&lt;li&gt;Keep the sandbox on for shell work even when you trust the model. The sandbox is about blast radius, not about trust.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The data
&lt;/h2&gt;

&lt;p&gt;Every row above came from vendor documentation, with a source link per tool, a checked date, and an explicit "not described on the page checked" instead of a guess. It is nine tools, seven fields each, as CSV and JSON.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gumroad: &lt;a href="https://cupj.gumroad.com/l/agent-safety-matrix-dataset" rel="noopener noreferrer"&gt;https://cupj.gumroad.com/l/agent-safety-matrix-dataset&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Payhip: &lt;a href="https://payhip.com/DigiMoraLap" rel="noopener noreferrer"&gt;https://payhip.com/DigiMoraLap&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Free interactive version with a settings generator: &lt;a href="https://prokit-hub.surge.sh/agent-safety-matrix/" rel="noopener noreferrer"&gt;https://prokit-hub.surge.sh/agent-safety-matrix/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is information about documented behavior, not security advice. Vendor docs change often, so check the linked source before you rely on a setting.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>devtools</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Snowball vs avalanche debt payoff: a 25-line JavaScript simulation</title>
      <dc:creator>ProKit</dc:creator>
      <pubDate>Wed, 02 Dec 2026 16:16:32 +0000</pubDate>
      <link>https://dev.to/prokittools/snowball-vs-avalanche-debt-payoff-a-25-line-javascript-simulation-1b80</link>
      <guid>https://dev.to/prokittools/snowball-vs-avalanche-debt-payoff-a-25-line-javascript-simulation-1b80</guid>
      <description>&lt;p&gt;Snowball or avalanche? Most debt payoff advice stops at "pay the smallest balance first" or "pay the highest rate first". The useful part is seeing the actual numbers side by side for your own debts. I built a small calculator to do that, and it turned out to be a good example of how much you can do with one HTML file and no backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two methods in one paragraph
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Snowball:&lt;/strong&gt; pay minimums on everything, put every extra dollar on the smallest balance. When it is gone, roll its payment into the next smallest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avalanche:&lt;/strong&gt; same idea, but target the highest interest rate first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Avalanche usually costs less interest. Snowball usually gives you quick wins sooner. Which one fits depends on the debts, so it is worth simulating both.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core loop
&lt;/h2&gt;

&lt;p&gt;Each month: add interest to every balance, pay the minimums, then send whatever is left to the target debt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;simulate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;debts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;debts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;interest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;apr&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;interest&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;pool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;min&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="n"&gt;pool&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;min&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;interest&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;snowball&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;avalanche&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;apr&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;apr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run both with the same debts and the same extra payment, then compare months and total interest. That is the whole trick. The 600-month cap stops it looping forever when minimums do not cover interest.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a single HTML file
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Your numbers stay in your browser. Nothing is uploaded.&lt;/li&gt;
&lt;li&gt;It works offline once saved.&lt;/li&gt;
&lt;li&gt;There is nothing to host or log in to.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  If you want it ready-made
&lt;/h2&gt;

&lt;p&gt;I packaged this as &lt;strong&gt;Debtfree Pro&lt;/strong&gt;: snowball vs avalanche comparison, interest saved and a debt-free date, in one HTML file. It is a planning aid, not financial advice.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gumroad: &lt;a href="https://cupj.gumroad.com/l/debtfree-pro" rel="noopener noreferrer"&gt;https://cupj.gumroad.com/l/debtfree-pro&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;More small tools (contracts, budget tracker, resume builder, invoices): &lt;a href="https://prokit-hub.surge.sh/" rel="noopener noreferrer"&gt;https://prokit-hub.surge.sh/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Payhip store: &lt;a href="https://payhip.com/DigiMoraLap" rel="noopener noreferrer"&gt;https://payhip.com/DigiMoraLap&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The code above is yours to reuse either way.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
