<?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: Vuk Topalović</title>
    <description>The latest articles on DEV Community by Vuk Topalović (@vtopa).</description>
    <link>https://dev.to/vtopa</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%2F3843469%2F89558589-5d4b-4371-a992-435593c2d1ec.jpg</url>
      <title>DEV Community: Vuk Topalović</title>
      <link>https://dev.to/vtopa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vtopa"/>
    <language>en</language>
    <item>
      <title>I built a Claude Code plugin that only keeps an "agent memory" rule if it can prove it saves tokens</title>
      <dc:creator>Vuk Topalović</dc:creator>
      <pubDate>Sat, 27 Jun 2026 21:52:41 +0000</pubDate>
      <link>https://dev.to/vtopa/i-built-a-claude-code-plugin-that-only-keeps-an-agent-memory-rule-if-it-can-prove-it-saves-tokens-53ho</link>
      <guid>https://dev.to/vtopa/i-built-a-claude-code-plugin-that-only-keeps-an-agent-memory-rule-if-it-can-prove-it-saves-tokens-53ho</guid>
      <description>&lt;p&gt;Most agent-memory setups add a rule because a model thought it sounded useful. I wanted one that has to earn its spot.&lt;/p&gt;

&lt;p&gt;token-warden watches your Claude Code sessions, distills candidate efficiency rules from the expensive ones, then benchmarks each rule on a frozen test suite (with vs without it) and only keeps it if it saves at least 2x the tokens it costs to carry around, and breaks nothing. Everything else gets evicted. It once threw out a rule that saved 38k tokens per run because that "saving" came from the agent giving up and failing the task.&lt;/p&gt;

&lt;p&gt;Honest result so far: on a deliberately wasteful agent, a "grep for the symbol before reading the whole file" rule cut a session from ~67k to ~56k tokens (about 16%, roughly 3 cents/session on Sonnet, ~500x what the rule itself costs). On my already-optimized agents the same rule saves basically nothing and gets auto-evicted, which is the entire point. It refuses to keep junk just to look busy.&lt;/p&gt;

&lt;p&gt;It's measured, not vibes. Open source, MIT. I'd genuinely like people to try to break it or tell me the numbers are wrong.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/vukkt/token-warden" rel="noopener noreferrer"&gt;https://github.com/vukkt/token-warden&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>claude</category>
      <category>performance</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Most AI agent memory never pays for itself</title>
      <dc:creator>Vuk Topalović</dc:creator>
      <pubDate>Mon, 22 Jun 2026 21:12:52 +0000</pubDate>
      <link>https://dev.to/vtopa/most-ai-agent-memory-never-pays-for-itself-4afi</link>
      <guid>https://dev.to/vtopa/most-ai-agent-memory-never-pays-for-itself-4afi</guid>
      <description>&lt;p&gt;Built a small tool for Claude Code that tracks whether “agent memory” rules actually pay for themselves in token usage.&lt;/p&gt;

&lt;p&gt;The idea is simple: every persistent instruction should justify itself by reducing future token cost. If it doesn’t, it gets flagged for removal.&lt;/p&gt;

&lt;p&gt;Over time, a surprising amount of memory ends up being neutral or negative ROI once measured. Check it out, would mean a lot :)&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/vukkt/token-warden" rel="noopener noreferrer"&gt;https://github.com/vukkt/token-warden&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>claude</category>
      <category>showdev</category>
    </item>
    <item>
      <title>"make your AI better" is guesswork — token-warden only keeps changes it can prove, with real numbers on a fair repeatable test, made the work cheaper.</title>
      <dc:creator>Vuk Topalović</dc:creator>
      <pubDate>Mon, 15 Jun 2026 09:57:06 +0000</pubDate>
      <link>https://dev.to/vtopa/make-your-ai-better-is-guesswork-token-warden-only-keeps-changes-it-can-prove-with-real-53me</link>
      <guid>https://dev.to/vtopa/make-your-ai-better-is-guesswork-token-warden-only-keeps-changes-it-can-prove-with-real-53me</guid>
      <description>&lt;p&gt;token-warden is a thrifty office manager for your AI assistants. It does four things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keeps the receipts. Every time the AI finishes a task, it quietly notes how much that cost — like saving every taxi receipt in a drawer.&lt;/li&gt;
&lt;li&gt;Notices waste. When a task costs far more than usual, it asks a cheap junior AI: "Why was that so expensive? What habit would've made it cheaper?" — and writes down a suggested habit, e.g. "search for the right file before opening files at random."&lt;/li&gt;
&lt;li&gt;Tests the habit for real — this is the important part. It doesn't just trust the suggestion. It keeps a fixed set of practice tasks (like a standardized test that never changes), and runs them twice: once with the new habit, once without. Now it has hard numbers on whether the habit actually saved money, instead of a hunch.&lt;/li&gt;
&lt;li&gt;Keeps only what pays off. A habit takes up room in the AI's memory, and that room itself costs a little every single time. So the rule is strict: a habit must save at least twice what it costs to keep, or it's thrown out. Winners get written into the AI's permanent memory so it uses them automatically forever after; losers are discarded (but remembered as "tried it, didn't work" so the same bad idea won't come back).
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/vukkt" rel="noopener noreferrer"&gt;
        vukkt
      &lt;/a&gt; / &lt;a href="https://github.com/vukkt/token-warden" rel="noopener noreferrer"&gt;
        token-warden
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Claude Code plugin that makes coding agents measurably cheaper over time: collect token costs, distill candidate rules, benchmark them on a frozen golden suite, and keep only rules that earn their context rent.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;token-warden&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/vukkt/token-warden/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/vukkt/token-warden/actions/workflows/ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt;
&lt;a href="https://github.com/vukkt/token-warden/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667" alt="License: MIT"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Claude Code plugin that makes coding agents measurably cheaper over time.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most "agent memory" accumulates advice nobody ever verifies. token-warden treats agent
memory as an engineering problem: every rule that wants space in an agent's context must
&lt;strong&gt;prove, on a fixed benchmark, that it saves more tokens than it costs&lt;/strong&gt; — or it gets
evicted. The result is a per-agent memory file containing only rules with measured
positive return.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Measured, not vibes&lt;/strong&gt; — every rule carries a token delta from real benchmark runs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-funding&lt;/strong&gt; — rules must save ≥ 2× their own context rent to stay&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-auditing&lt;/strong&gt; — active rules are re-benchmarked round-robin and evicted when they
stop earning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero session overhead&lt;/strong&gt; — collection runs in a Stop hook that never blocks or fails
your work&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Table of contents&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#how-it-works" rel="noopener noreferrer"&gt;How it works&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#getting-started" rel="noopener noreferrer"&gt;Getting started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#commands" rel="noopener noreferrer"&gt;Commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#the-benchmark-system" rel="noopener noreferrer"&gt;The benchmark system&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#architecture" rel="noopener noreferrer"&gt;Architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#the-agents" rel="noopener noreferrer"&gt;The agents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#inter-agent-approval-gate-experimental" rel="noopener noreferrer"&gt;Inter-agent approval gate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vukkt/token-warden#design-invariants" rel="noopener noreferrer"&gt;Design invariants&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/vukkt/token-warden#a-recorded-demonstration" rel="noopener noreferrer"&gt;A recorded&lt;/a&gt;…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/vukkt/token-warden" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
  </channel>
</rss>
