update-rtk-stats
Skill0 starsChanged 12 days agoMITView on GitHub
Use when the user wants to refresh the RTK savings stats displayed on the claude-code-codex Case studies page (`/case-studies`). Triggers on "/update-rtk-stats", "refresh rtk stats", "maj stats rtk", or after a long session where rtk usage might have meaningfully changed the numbers. Reads `rtk gain --format json`, writes to frontend/src/data/rtk-stats.json, and proposes a commit.
- Commits and pushes
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
If rtk isn't found, stop and tell the user how to install it (https://github.com/rtk-ai/rtk).
- Distinctive: line 102
Do NOT auto-push without confirmation — RTK stats refresh is a routine but visible commit on a public repo.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Update RTK Stats
Refreshes the live RTK savings counters shown on the claude-code-codex Case studies page (/case-studies). Single-purpose skill : read fresh stats from the local rtk binary, persist them in the repo, and propose a commit.
When to use
- ✅ User says "/update-rtk-stats", "refresh rtk", "maj rtk stats"
- ✅ Periodic refresh (e.g. monthly cadence), especially after a long pair-programming session
- ✅ Right after changing how RTK is configured (new filters, scope changes)
When not to use
- ❌ The
rtkbinary isn't installed or in PATH (the skill will fail — RTK is required, not optional) - ❌ The user wants to display stats elsewhere (this skill only writes to the canonical JSON, the display is in
RtkStats.astro) - ❌ The user wants per-command breakdown (this skill only stores the summary — extend the JSON shape if needed)
Procedure
Step 1 — Verify rtk + repo path
which rtk
rtk --versionIf rtk isn't found, stop and tell the user how to install it (https://github.com/rtk-ai/rtk).
The target file is frontend/src/data/rtk-stats.json inside the claude-code-codex repo. Confirm we're in or under that repo with git rev-parse --show-toplevel and that package.json mentions claude-code-codex somewhere. If not, ask the user to cd there first.
Step 2 — Capture stats
rtk gain --format jsonSample shape (keep this stable — RtkStats.astro reads these exact keys) :
{
"summary": {
"total_commands": 1546,
"total_input": 1889477,
"total_output": 1459761,
"total_saved": 433733,
"avg_savings_pct": 22.955,
"total_time_ms": 616294,
"avg_time_ms": 398
}
}Step 3 — Write the JSON with timestamp
Pipe through node (or jq if available) to add a lastUpdated ISO timestamp. Don't use jq blindly — the user's machine may not have it (verified case 2026-05-08).
Safe one-liner :
rtk gain --format json | node -e '
const fs = require("fs");
let data = "";
process.stdin.on("data", c => data += c);
process.stdin.on("end", () => {
const j = JSON.parse(data);
j.lastUpdated = new Date().toISOString();
fs.writeFileSync(process.argv[1], JSON.stringify(j, null, 2) + "\n");
console.log("wrote", process.argv[1]);
});
' frontend/src/data/rtk-stats.jsonStep 4 — Verify the build still passes
export PATH="$HOME/.nvm/versions/node/v22.22.2/bin:$PATH"
cd frontend && npm run build 2>&1 | tail -5The RtkStats.astro component is server-rendered and reads the JSON at build time. If the JSON shape drifted, the build will fail clearly.
Step 5 — Show the diff and propose a commit
git diff frontend/src/data/rtk-stats.jsonThen propose to the user :
git add frontend/src/data/rtk-stats.json
git commit -m "chore: refresh RTK stats (<short summary like 'now 1.5M saved'>)"
git pushDo NOT auto-push without confirmation — RTK stats refresh is a routine but visible commit on a public repo. Wait for the user's "go" before pushing.
Anti-patterns
- ❌ Hard-coding stats in the SKILL.md or another file. The single source of truth is
frontend/src/data/rtk-stats.json. - ❌ Using
jqblindly — verified that Sylvain's machine doesn't have it. Always have anode-based fallback ready. - ❌ Modifying the JSON shape without updating
RtkStats.astro. They're coupled — change both. - ❌ Running this skill when
rtkitself is broken. Sanity check first.
Companion
/save— captures meta learnings;/update-rtk-statscaptures the quantitative trace of the collab./skillify— was used to extract concepts from Ruflo; this skill captures concepts from Sylvain's own daily-driver tooling.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

