trim-agent-setup — скилл для Claude Code: аудит и установка
Скилл trim-agent-setup для Claude Code проверяет, какие файлы настроек агент читает и сколько токенов они занимают. Помогает найти неиспользуемые правила и сократить загруженные инструкции.
MIT ★ 149 обновлён 2026-11-16
npx skills add jackulau/coding.sh --skill trim-agent-setup -a claude-codeЧто делает trim-agent-setup
trim-agent-setup вызывает инструмент harness_audit через MCP-сервер coding.sh, чтобы проверить записанные на этой машине сессии и файлы инструкций. По умолчанию анализирует последние 30 дней; для другого периода можно передать параметр since, например 90d.
Отчёт показывает размер файлов в токенах, число загрузок, чтений и изменений, а также помечает нечитавшиеся, записываемые без чтения и загруженные, но неиспользованные скиллы. Скилл предлагает, что удалить или сократить, но сам ничего не меняет до согласия. Короткий период может скрыть редко используемые файлы.
После правок повторный аудит с check: true сравнивает незакоммиченные изменения с последним коммитом и отмечает смягчённые или удалённые защитные правила. Для проверки сокращённого файла на eval-наборе результат может предложить команду coding.sh refine run; запуск занимает минуты.
Какие задачи решает
- найти инструкции и скиллы, которые сессии не читали
- оценить расход токенов на загрузку файлов
- сократить перегруженные
AGENTS.mdилиCLAUDE.md - проверить правки на удаление защитных правил
Примеры запросов агенту
- Проведи аудит настроек агента и найди файлы, которые сессии не читали.
- Оцени расход токенов и предложи, что сократить в
AGENTS.md. - Повтори аудит за
90dи проверь, какие скиллы не использовались.
Как установить trim-agent-setup
1Через Skills CLI (Vercel)
npx skills add jackulau/coding.sh --skill trim-agent-setup -a claude-code2Вручную: положить файлы
~/.claude/skills/trim-agent-setup/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/trim-agent-setup/
1Через Skills CLI (Vercel)
npx skills add jackulau/coding.sh --skill trim-agent-setup -a codex2Вручную: положить файлы
.agents/skills/trim-agent-setup/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add jackulau/coding.sh --skill trim-agent-setup -a cursor2Вручную: положить файлы
.cursor/skills/trim-agent-setup/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install jackulau/coding.sh packages/coding.sh/skills/trim-agent-setup2Вручную: положить файлы
.github/skills/trim-agent-setup/SKILL.md1Через Skills CLI (Vercel)
npx skills add jackulau/coding.sh --skill trim-agent-setup -a gemini-cli2Командой платформы
gemini skills install https://github.com/jackulau/coding.sh --path packages/coding.sh/skills/trim-agent-setupВручную: положить файлы
.devin/skills/trim-agent-setup/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о trim-agent-setup
Как установить trim-agent-setup в Claude Code?
Выполни npx skills add jackulau/coding.sh --skill trim-agent-setup -a claude-code. Файл скилла появится по пути ~/.claude/skills/trim-agent-setup/SKILL.md.
Что делает trim-agent-setup?
Скилл анализирует записанные сессии и файлы инструкций: показывает, что агент читал, что записывал и сколько токенов стоила загрузка. Он предлагает правки, но ждёт согласия, прежде чем менять файлы.
Что нужно для работы trim-agent-setup?
Нужен MCP-сервер coding.sh, через который скилл вызывает инструмент harness_audit. Аудит читает сессии, записанные на этой машине, и файлы инструкций на диске.
Исходный текст
SKILL.md · MIT
--- name: trim-agent-setup description: "Finds the memory files, instruction files, rules and skills that recorded agent sessions never read, and what the files they load cost in tokens, then helps remove or shorten them safely. Use when the user asks to trim or audit their agent setup, shorten AGENTS.md or CLAUDE.md, cut context or token cost, or find unused skills and memory files." license: MIT --- # Trim the agent setup Uses the coding.sh MCP server's `harness_audit` tool. It reads sessions recorded on this machine and the instruction files on disk, and changes nothing. ## Steps 1. Call `harness_audit`. Pass `since` when the user names a window, such as `90d`. The default is 30 days. 2. Read `files`. Each has its size in `tokens`, how many sessions `loaded`, `read` and `wrote` it, and `flags`. List the flagged files first: - `never-read`: no session loaded it or read it. - `write-only`: sessions wrote it and none read it back. - `loaded-not-read`: a skill that was listed in context and never used. 3. Then give what loading costs: `loadTokensPerSession` for the whole setup, and the files with the largest `loadTokens`, which is what loading that file cost over the whole window. These are files to shorten, not to delete. 4. Propose what to delete or shorten. Change nothing until the user says yes. 5. After the edits, call `harness_audit` with `check: true`. It compares the uncommitted edits with the last commit. `check.rejections` lists each protected safety line that was deleted, reworded or relaxed. Show each one and put it back unless the user asked for that removal. This result's `next` is the command that allows the removal: give it only when the user wants that. 6. The result of step 1 can have `next`: a `coding.sh refine run` command that tests a shorter file on an eval suite. Give it to the user to run, because it takes minutes. When that result also has `note`, there is no suite to test on yet: tell the user that instead. ## Rules - A file the sessions never read can still be loaded on purpose. Ask before removing a rule that forbids something, such as a line about force pushes or secrets. - A short window hides files that are used rarely. Before deleting a skill, run the audit again with a longer `since`. - Delete nothing yourself that the user did not agree to in this conversation.
© jackulau · MIT · jackulau/coding.sh