I Open Sourced My Coding Agent Setup
1 Software engineer, Singapore; cyrus@pastelero.ph
Abstract
My coding agents were starting every session with a pile of tools I never used. I measured it instead of guessing. Claude Code itself costs about 35k tokens before I type anything. Connectors added another 3.4k to 12.8k, and an always-on reply plugin added 2.5k. Trimming skills, agents and rules saved almost nothing in tokens, but it fixed a skill list too long for the agent to read. A full audit cut startup by 11 to 14%. I packaged the result as dot-agent: one instruction file for every agent, a few skills, and an audit that removes what you don't use once you approve it. The biggest lesson came last. Installing it on my own machine, I still saw unused servers, because the installer only adds things and never told me so.
Keywords: Open Source; AI; Build log
Introduction
I use four coding agents: Claude Code, Codex, Gemini CLI and Cursor. Each one has its own config folder. Each one gathered junk.
A skill I tried once for a weekend. A connector I signed into for one demo. A plugin that looked useful in a tweet. None of it went away. And every one of them loads into every session, before I type a single word.
I didn't notice for months. The agent still worked. It just started with less room and sometimes picked the wrong tool.
So I did what I always do. I measured it, cleaned it up, and put it in a repo. This post is about dot-agent[1], what the numbers showed, and the bug I found when I installed my own tool.
Approach
Measure the first request
The number I care about is the size of the first request in a session, before I've typed anything. Claude Code can run headless and report it, so I ran claude -p "Reply with just OK." and added up the input and cache tokens.
I changed one thing at a time. Connectors on and off. One plugin off. Old config files swapped back in. Each change got its own runs, and I restored the setup after every one.
What it showed
Table 1 has the results.
| Change | Startup tokens | Difference |
|---|---|---|
| Baseline, connectors off | about 37,870 | |
| claude.ai connectors on | 41,320 to 50,640 | +3.4k to +12.8k |
| Always-on i-have-adhd plugin removed | 35,408 | about -2.5k |
| Vercel plugin (49 skills) off | 37,022 | about -0.9k |
| Old setup: 45 skills, 17 agents, old rules | 38,118 | +0.25k |
Three things surprised me.
Claude Code itself costs about 35k tokens. That's the system prompt and the built-in tools. I can't configure it away, so there's no point worrying about it.
Connectors were the biggest lever. Each one adds its tool names and instructions to every session, used or not. The range is wide because headless mode doesn't wait for every connector to connect. So even 12.8k is a lower bound.
And trimming skills barely moved the number. 251 tokens. I expected thousands.
Why skills still mattered
The skill result looked like a reason to stop caring about skills. It wasn't.
Claude Code gives the skill list a budget of about 8,000 characters. Past that, it cuts descriptions. My list was 25,622 characters, and 61 of those skills had never been used. So the agent was reading half sentences and guessing which skill fit.
Removing skills didn't save tokens because the list was already being cut. What it did was let the agent see every description again. The agent got better. It didn't get cheaper.
What went into the repo
dot-agent has three parts.
- One instruction file for every agent.
global/AGENTS.mdis linked into Claude Code, Codex and Gemini CLI, so they all follow the same rules. Cursor has no global file, so I paste it in. - A small set of skills. 24 of them. The 6 workflow skills only load when I call them, which keeps the list short.
setup-auditandproject-notesare the core. - The audit. It reads my transcripts, counts what I actually use, finds unused, failing, duplicate and never signed in servers, and proposes a plan. Nothing changes until I approve it, and everything it removes goes to an archive.
Figure 1 shows how install and audit fit together.
In a second test, on a setup that had only run the installer, a full audit took startup from 55,030 to 47,457 tokens. With connectors off, which gives the steadier number, it went from 48,068 to 42,829. That's 11 to 14%.
What I got wrong
Hooks that promised savings
Earlier versions shipped two hooks that were supposed to save tokens. One summarized long tool output. The other blocked reading the same file twice.
A code review showed neither could work. The summary hook added its summary next to the full output instead of replacing it. So it made things bigger. The read blocker kept blocking after I'd edited the file, which forced extra turns. The "316k tokens a week" number in the old README had no method behind it.
I deleted both. The repo now has a rule: every claim needs a measurement in docs/EXPERIMENTS.md.
The installer that didn't say what it did
Today I installed dot-agent on my own machine, opened a session, and still saw servers I never use.
I'd assumed installing meant cleaning up. It doesn't. The installer only adds and links files. Cleanup is the audit, which needs approval for each change. The code was right. It just never told me which was which.
Worse, the audit had missed a GitHub server saved under one project folder. It only checked servers saved for the whole user. Servers saved under a single project were skipped.
So I fixed three things. The audit's usage check now covers project servers too. ./install.sh --status prints what's on, what's off, and the command to turn each part on. And the installer asks its two questions in the terminal, then offers to start the audit, instead of hiding everything behind flags.
Discussion
Table 2 puts the levers side by side.
| Lever | What it costs | What fixes it |
|---|---|---|
| Claude Code itself | about 35k tokens | Nothing. It's the floor |
| Unused connectors | 3.4k to 12.8k tokens | Disconnect them on claude.ai |
| Always-on reply plugins | about 2.5k tokens | Turn them on only if you want them |
| Too many skills | A list the agent can't read in full | Archive the ones you never use |
The pattern is the same as with my notes and my training plan. I had a story about my setup. Measuring it made me check the story. Most of what I thought were deliberate choices were defaults I'd never looked at again.
Limitations
This is one person's setup. The numbers come from my machine, my folders and my transcripts.
Headless runs undercount connectors, and the full-setup number moved by about 9k between runs. The audit result used 2 runs each, and many things changed at once. So it measures the whole audit, not any single change.
I haven't measured whether the shared project notes save tokens on later sessions. I think they do, but I don't have paired runs to prove it.
What I would do differently
Measure first. I spent weeks adding skills and hooks before I had a way to see what any of them cost. The hooks would never have shipped if I'd measured them on day one.
And tell people what state they're in. A tool that changes your setup should end by showing you the setup.
Conclusion
dot-agent is my setup, and it's how things work for me. Yours will be different. But the audit reads any Claude Code setup, and ./install.sh --status changes nothing.
References
- dot-agent. github.com. https://github.com/cyruspastelero/dot-agent ↑