Your agent follows the rules and uses fewer tokens without switching models. Just remove the accumulated clutter.

This is a free guide to cleaning up the setup of anyone who uses Claude Code and Codex. Over time, duplicate instruction files, downloaded but unused skills, old memories, and conflicting rules pile up; they all enter the context before the first request, and the agent starts ignoring rules and using more tokens. The guide covers an audit with a prompt, a script that reads your history, one AGENTS.md, folders for each business, playbooks, and a three-question filter. All you need is Claude Code or Codex installed and Python 3.
It’s not the model. It’s what the model receives before you type the first word.
CLAUDE.md, AGENTS.md, and GEMINI.md all speaking at once, with rules that contradict each other.
Packages installed for a tutorial and then forgotten. Each one nudges the agent a little in the wrong direction.
Old memory, outdated notes, and temporary files fill the context, and the limit runs out before the work is done.
First, clone the repository. Run the commands below from inside its folder.
git clone https://github.com/inematds/faxina-agentes cd faxina-agentes

You don’t need a huge prompt. Specify three things: what to audit, what to compare it against, and what criteria to use. The agent only reads and makes suggestions; nothing changes without your OK.
# the prompt, ready to paste cat prompts/auditoria.md

Reading hundreds of entire conversations with your agent is costly. The script scans Claude and Codex conversation files, counts messages showing friction ("that’s not what I asked for"), and lists skills you’ve never called. Read-only, no API.
python3 scripts/varrer_historico.py --dias 60 # expected: relatorio-faxina.md and relatorio-faxina.html | friction … | unused skills …
Start with low-risk cleanups: a dead hook, a temporary file, a skill unused for months.

Rules that apply to all tools go in a single AGENTS.md: writing rules, what “done” means, and what must never be done. Codex reads this file directly; in Claude Code, CLAUDE.md simply points to it. Keep tool-specific rules separate only when a feature exists in just one tool.
cp modelos/AGENTS-raiz.md ~/trabalho/AGENTS.md echo '@AGENTS.md' > ~/trabalho/CLAUDE.md

Each line of business and each client gets a folder with its own AGENTS.md (tone, audience, and local rules). It only enters context when the agent works there, so nothing leaks from one client to another.
mkdir -p ~/trabalho/{conteudo,vendas,clientes/cliente-a} cp modelos/AGENTS-pasta.md ~/trabalho/clientes/cliente-a/AGENTS.md

What you know how to do by heart is more valuable than a generic skill. Record an hour explaining the process, transcribe it, and ask the agent to organize it into files such as lancamento.md e aula.md. The AGENTS.md above says when to consult each one.
mkdir -p ~/trabalho/playbooks cp modelos/playbook-modelo.md ~/trabalho/playbooks/lancamento.md

The clutter comes back if no one cleans it up. Schedule the same audit every week (a scheduled Codex task or /schedule in Claude Code), with this rule: automatically clean up only low-risk items; put everything else on a list for you to decide.
# in Claude Code
/schedule every Monday at 8am: run prompts/auditoria.md and clean up only low-risk itemsA one-degree error in a ship’s heading seems tiny; by the end of the journey, it can be more than a hundred kilometers off course. Every misplaced skill adds that degree.
If not, don’t install it. Point the agent to the repository and copy only the relevant line into your AGENTS.md.
Then keep it in the folder of the project that uses it, never globally. The rest of your work won’t carry that weight.
The scheduled cleanup each week. Better models need fewer rules: remove clutter instead of piling it up.
The full explainer with illustrations and animated screens, plus a short reel to share with someone who needs it.
Full video (16:9)
Reel (9:16)
The audit prompt to paste into Claude Code or Codex.
Reads local history and generates a report in Markdown and HTML.
Root AGENTS.md, folder AGENTS.md, and a playbook template.
Checks the script with sample data.