<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Plugins on Vijay Kodam</title><link>https://vijay.eu/tags/plugins/</link><description>Recent content in Plugins on Vijay Kodam</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 04 Jul 2026 10:00:00 +0300</lastBuildDate><atom:link href="https://vijay.eu/tags/plugins/index.xml" rel="self" type="application/rss+xml"/><item><title>Catch silent model downgrades in Claude Code</title><link>https://vijay.eu/posts/model-audit-skill/</link><pubDate>Sat, 04 Jul 2026 10:00:00 +0300</pubDate><guid>https://vijay.eu/posts/model-audit-skill/</guid><description>&lt;p&gt;&lt;img src="https://vijay.eu/images/model-audit-skill.png" alt="model-audit skill README on GitHub"&gt;&lt;/p&gt;
&lt;p&gt;How do you know Claude Code doesn&amp;rsquo;t silently downgrade Fable 5 to Opus for some of your tasks?&lt;/p&gt;
&lt;p&gt;Recently Anthropic restored access to Fable 5 with a twist. From their &lt;a href="https://www.anthropic.com/news/redeploying-fable-5"&gt;blog post&lt;/a&gt; understood that some requests might get blocked and requests sent to Opus 4.8.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://vijay.eu/images/fable5.png" alt="Fable5"&gt;&lt;/p&gt;
&lt;p&gt;How do you know how many requests were sent to Opus 4.8 when the model is set to Fable5? I started debugging with that question in mind a few days ago. The built-in commands don&amp;rsquo;t answer it. &lt;code&gt;/usage&lt;/code&gt; shows quota, &lt;code&gt;/cost&lt;/code&gt; shows spend, &lt;code&gt;/context&lt;/code&gt; shows tokens, but none of them tell you which model actually produced each response.&lt;/p&gt;
&lt;p&gt;The ground truth is already sitting on your machine. Claude Code writes every session transcript to ~/.claude/projects/, and every assistant message in those files carries a &amp;ldquo;model&amp;rdquo; field with the exact model ID that generated it. A per-message audit trail, hiding in plain sight.&lt;/p&gt;
&lt;p&gt;I turned that debugging session into a Claude Code skill called model-audit.&lt;/p&gt;
&lt;p&gt;It scans your session history and reports which models handled your work, with main agent and subagents listed separately. Subagents legitimately run on different models, Haiku for cheap scans and so on, but your main conversation turns should stay on the model you selected. If a session was downgraded midway, you see it immediately as mixed model counts in a single row.&lt;/p&gt;
&lt;p&gt;Install it as a plugin:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/plugin marketplace add vijaykodam/model-audit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/plugin install model-audit@model-audit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then run &lt;code&gt;/model-audit&lt;/code&gt; to audit the last 7 days, which is the default. You can pass any number of days, or &lt;code&gt;all&lt;/code&gt; for your full session history.&lt;/p&gt;
&lt;h3 id="example-output"&gt;Example output&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Claude Code sessions active in the last &lt;span style="color:#ae81ff"&gt;7&lt;/span&gt; day&lt;span style="color:#f92672"&gt;(&lt;/span&gt;s&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LAST ACTIVE PROJECT SESSION MODELS &lt;span style="color:#f92672"&gt;(&lt;/span&gt;responses&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2026-07-03 09:47 -vijay-projects-project3 85f5d9a6-ec9f-4dc2-... claude-fable-5&lt;span style="color:#f92672"&gt;(&lt;/span&gt;24&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2026-07-02 11:18 -vijay-projects-project1 4a347153-4458-47f8-... claude-fable-5&lt;span style="color:#f92672"&gt;(&lt;/span&gt;278&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2026-07-02 07:53 -vijay-projects-projecy1 1a89419d/agent-ab3a2f9e5caae8685 claude-opus-4-8&lt;span style="color:#f92672"&gt;(&lt;/span&gt;21&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2026-06-30 18:06 -vijay-projects-project3 a4b9c607-b1e8-4c92-... claude-opus-4-8&lt;span style="color:#f92672"&gt;(&lt;/span&gt;128&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Totals across all sessions:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;598&lt;/span&gt; claude-fable-5
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;504&lt;/span&gt; claude-opus-4-8
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ae81ff"&gt;51&lt;/span&gt; claude-haiku-4-5-20251001
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="reading-the-results"&gt;Reading the results&lt;/h2&gt;
&lt;p&gt;When invoked as a skill, &lt;code&gt;/model-audit&lt;/code&gt; runs the audit and presents the
session table and totals with these interpretation rules applied; they hold
equally if you read the script output yourself.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MODELS counts are per response, so a session that changed model mid-way
shows both models with their proportions. A downgrade shows up as
&lt;code&gt;claude-opus-4-8&lt;/code&gt; (or another model) counts inside a session you expected
to be Fable 5.&lt;/li&gt;
&lt;li&gt;Subagent work appears as separate rows (SESSION looks like
&lt;code&gt;1a89419d/agent-...&lt;/code&gt;, prefixed with the parent session that spawned it).
Subagents legitimately run on different models but never handle the main
conversation turns — so a main-session row showing 100% one model means
every conversation turn ran on that model.&lt;/li&gt;
&lt;li&gt;Resumed or forked sessions get a new session file that includes a copy
of the prior history, so the same responses can appear in two rows
(same message IDs in both files). Totals across sessions therefore
overcount conversations that were resumed; per-session rows are still
accurate.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;model&amp;quot;:&amp;quot;&amp;lt;synthetic&amp;gt;&amp;quot;&lt;/code&gt; entries in transcripts are harness-injected error
messages, not real model responses; the audit filters them out.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="related-built-in-tools"&gt;Related built-in tools&lt;/h2&gt;
&lt;p&gt;Claude Code&amp;rsquo;s built-in usage commands were checked first, but none of them
report model provenance — which model actually produced each response. That
is the gap &lt;code&gt;/model-audit&lt;/code&gt; fills. How each differs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/usage&lt;/code&gt; shows plan quota consumption (session/weekly limits) — no model
IDs, no per-project or per-session breakdown.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/cost&lt;/code&gt; and &lt;code&gt;/context&lt;/code&gt; show token and cost figures for the current session
only — no history across sessions, no model provenance.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;session-report&lt;/code&gt; plugin aggregates token usage by project, skill, and
subagent type from the same transcripts — but does not report model IDs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/model-audit&lt;/code&gt; reads the per-message &lt;code&gt;&amp;quot;model&amp;quot;&lt;/code&gt; field from the transcripts:
per-session, per-response model IDs across all projects and any time
window.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="note"&gt;Note&lt;/h2&gt;
&lt;p&gt;Two things I cared about while building it:&lt;/p&gt;
&lt;p&gt;Everything runs locally. It is a small shell script reading files on your own machine, and nothing is sent over the internet.&lt;/p&gt;
&lt;p&gt;No dependencies beyond standard bash, grep, and awk. Works on macOS and Linux.&lt;/p&gt;
&lt;h2 id="final-thoughts"&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;For what it&amp;rsquo;s worth, my audit showed no silent downgrades. But now I can verify that instead of assuming it.&lt;/p&gt;
&lt;p&gt;Give it a try and let me know if you have any feature requests.&lt;/p&gt;
&lt;p&gt;Repo: &lt;a href="https://github.com/vijaykodam/model-audit"&gt;https://github.com/vijaykodam/model-audit&lt;/a&gt;&lt;/p&gt;</description></item><item><title>model-audit Claude Code SKILL</title><link>https://vijay.eu/projects/model-audit/</link><pubDate>Sat, 04 Jul 2026 10:00:00 +0300</pubDate><guid>https://vijay.eu/projects/model-audit/</guid><description>&lt;p&gt;A Claude Code skill, installable as a plugin, that audits which Claude model handled your sessions. Use it to confirm your coding requests ran on the model you selected (Fable 5, Opus 4.8, and so on) and were not silently served by a different one.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://vijay.eu/images/model-audit-skill.png" alt="model-audit skill README on GitHub"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/vijaykodam/model-audit" class="button"&gt;View on GitHub&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="why"&gt;Why&lt;/h2&gt;
&lt;p&gt;Claude Code&amp;rsquo;s built-in commands do not answer &amp;ldquo;which model produced this response?&amp;rdquo;. &lt;code&gt;/usage&lt;/code&gt; shows plan quota, &lt;code&gt;/cost&lt;/code&gt; shows spend, &lt;code&gt;/context&lt;/code&gt; shows tokens — none report model provenance.&lt;/p&gt;
&lt;p&gt;The ground truth is already on your machine. Claude Code writes every session transcript to &lt;code&gt;~/.claude/projects/&lt;/code&gt;, and every assistant message carries a &lt;code&gt;&amp;quot;model&amp;quot;&lt;/code&gt; field with the exact model ID that generated it. model-audit reads that per-message audit trail and rolls it up per session.&lt;/p&gt;
&lt;h2 id="install"&gt;Install&lt;/h2&gt;
&lt;p&gt;As a plugin (recommended):&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;/plugin marketplace add vijaykodam/model-audit
/plugin install model-audit@model-audit
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or from your shell, outside a session:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;claude plugin marketplace add vijaykodam/model-audit
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;claude plugin install model-audit@model-audit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run &lt;code&gt;/reload-plugins&lt;/code&gt; (or restart Claude Code) to activate.&lt;/p&gt;
&lt;h2 id="use"&gt;Use&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;/model-audit # audit the last 7 days (default)
/model-audit 30 # any number of days
/model-audit all # full session history
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="example-output"&gt;Example output&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Claude Code sessions active in the last 7 day(s)
LAST ACTIVE PROJECT SESSION MODELS (responses)
2026-07-03 09:47 -vijay-projects-project3 85f5d9a6-ec9f-4dc2-... claude-fable-5(24)
2026-07-02 11:18 -vijay-projects-project1 4a347153-4458-47f8-... claude-fable-5(278)
2026-07-02 07:53 -vijay-projects-project1 1a89419d/agent-ab3a2f9e5caae claude-opus-4-8(21)
2026-06-30 18:06 -vijay-projects-project3 a4b9c607-b1e8-4c92-... claude-opus-4-8(128)
Totals across all sessions:
598 claude-fable-5
504 claude-opus-4-8
51 claude-haiku-4-5-20251001
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Model counts are per response, so a session that changed model mid-way shows both models with their proportions. A silent downgrade shows up as an unexpected model count inside a session you expected to be on one model. Subagents appear as separate rows (the &lt;code&gt;SESSION&lt;/code&gt; looks like &lt;code&gt;1a89419d/agent-...&lt;/code&gt;) — they legitimately run on different models but never handle the main conversation turns.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Everything runs locally. It is a small shell script reading files on your own machine; nothing is sent over the internet.&lt;/li&gt;
&lt;li&gt;No dependencies beyond standard tools (bash, find, grep, sed, awk). Works on macOS and Linux.&lt;/li&gt;
&lt;li&gt;Apache-2.0 licensed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For full documentation and the source, see the &lt;a href="https://github.com/vijaykodam/model-audit"&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>