🩺 Base of AGI Doctor: Claude Code bağlam ve kurulum denetimi
Claude Code'da harcamanın büyük kısmı çoğu zaman yazılan koddan değil, her adımda yeniden okunan bağlamdan gelir. Kullanılmayan eklentiler, hiç çağrılmayan MCP sunucuları, şişmiş CLAUDE.md ve memory dosyaları, ekran görüntüleri ve günlerce açık kalan oturumlar bu bağlamı büyütür. Doctor bunları tek komutla bulur ve her bulguyu bir puan, tahmini tasarruf ve somut bir öneriyle raporlar.
Ne denetler?
- Bağlam maliyeti: sistem istemi, araç şemaları, ertelenmiş araç listesi, skill ve agent listeleri, MCP talimatları, CLAUDE.md zinciri ve memory. Son oturum kaydından ölçülür, yoksa dosyalardan tahmin edilir.
- Kullanılmayanlar: son N günde hiç çağrılmamış eklenti, skill, agent ve MCP sunucuları; kimlik doğrulama bekleyen ya da bağlanamayan sunucular; aynı adlı ya da tetiği örtüşen skill'ler.
- Oturum davranışı: ortalama ve en yüksek bağlam, sıkıştırma sayısı, önbellekten yeniden okumanın payı, görsel sayısı, en büyük araç çıktıları, model dağılımı, alt ajan payı ve "en çok ne yiyor" sıralaması.
- Hata riski: düz metin sır olabilecek değerler (yalnız konumu raporlanır), var olmayan yol başvuruları, olası çelişen kurallar, bayat ya da dizinsiz memory notları, aşırı geniş izinler, hata veren ya da betiği olmayan hook'lar.
Kurulum
Tek dosya, bağımlılık yok (Node 18+). Skill olarak kurarsanız Claude Code'a "kurulumumu denetle" diyebilirsiniz:
mkdir -p ~/.claude/skills/baseofagi-doctor/scripts curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -o ~/.claude/skills/baseofagi-doctor/SKILL.md curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -o ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs
Windows PowerShell:
New-Item -ItemType Directory -Force "$HOME\.claude\skills\baseofagi-doctor\scripts" | Out-Null Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -OutFile "$HOME\.claude\skills\baseofagi-doctor\SKILL.md" Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -OutFile "$HOME\.claude\skills\baseofagi-doctor\scripts\doctor.mjs"
Çalıştırmadan önce okuyun: SKILL.md · doctor.mjs.
Kullanım
node ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs --all-projects --lang tr node doctor.mjs --days 14 --exclude "~/private" --exclude "**/*secret-models*" node doctor.mjs --no-transcripts # yalnız yapılandırma, oturum kayıtlarına bakmaz
Rapor Markdown, HTML ve JSON olarak kullanıcı önbellek klasörüne yazılır (--out ile değişir). --exclude ile verilen yollar hiç açılmaz; aynı liste --exclude-file ya da BASEOFAGI_DOCTOR_EXCLUDE ile de verilebilir.
Güvenlik ve gizlilik
- Tamamen yerel: ağ isteği yok, model çağrısı yok, telemetri yok.
- Salt okuma.
--fixyalnız kullanılmayan eklentileri devre dışı bırakır; her biri için onay ister, önce dosyanın yedeğini alır, hiçbir şey silmez. - Oturum kayıtlarından yalnız sayı ve ad çıkarılır (araç adı, boyut, model). Mesaj ve dosya içeriği rapora girmez. Sır değerleri hiçbir zaman yazılmaz, yalnız dosya ve satır.
- Bulgular sezgiseldir ("olası çelişki", "bayat olabilir"); token sayıları yaklaşıktır.
🩺 Base of AGI Doctor: Claude Code context and setup audit
In Claude Code, most of the spend often comes not from the code you write but from context that is re-read on every step. Unused plugins, MCP servers nobody calls, bloated CLAUDE.md and memory files, screenshots and sessions left open for days all grow that context. Doctor finds them with one command and reports each finding with a score, an estimated saving and a concrete fix.
What it checks
- Context cost: system prompt, tool schemas, deferred tool list, skill and agent listings, MCP instructions, the CLAUDE.md chain and memory. Measured from the latest session transcript, estimated from files otherwise.
- Unused: plugins, skills, agents and MCP servers not called in the last N days; servers waiting for authentication or failing to connect; skills with the same name or overlapping triggers.
- Session behaviour: average and peak context, compactions, share of cache re-reads, images, largest tool outputs, model mix, subagent share and a "what eats the most" ranking.
- Error risk: possible plaintext secrets (only the location is reported), paths that no longer exist, possibly conflicting rules, stale or unindexed memory notes, overly broad permissions, failing hooks or hooks whose script is missing.
Install
One file, no dependencies (Node 18+). Installed as a skill, you can just ask Claude Code to "audit my setup":
mkdir -p ~/.claude/skills/baseofagi-doctor/scripts curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -o ~/.claude/skills/baseofagi-doctor/SKILL.md curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -o ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs
Windows PowerShell:
New-Item -ItemType Directory -Force "$HOME\.claude\skills\baseofagi-doctor\scripts" | Out-Null Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -OutFile "$HOME\.claude\skills\baseofagi-doctor\SKILL.md" Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -OutFile "$HOME\.claude\skills\baseofagi-doctor\scripts\doctor.mjs"
Read them before running: SKILL.md · doctor.mjs.
Usage
node ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs --all-projects --lang en node doctor.mjs --days 14 --exclude "~/private" --exclude "**/*secret-models*" node doctor.mjs --no-transcripts # configuration only, transcripts are not read
The report is written as Markdown, HTML and JSON to your user cache folder (change it with --out). Paths given with --exclude are never opened; the same list can come from --exclude-file or BASEOFAGI_DOCTOR_EXCLUDE.
Safety and privacy
- Fully local: no network requests, no model calls, no telemetry.
- Read-only.
--fixonly disables unused plugins; it asks for each one, backs up the file first and deletes nothing. - Only counts and names are taken from transcripts (tool name, size, model). Message and file contents never enter the report. Secret values are never written, only file and line.
- Findings are heuristics ("possible conflict", "possibly stale"); token counts are approximate.
🩺 Base of AGI Doctor: auditoría de contexto y configuración de Claude Code
En Claude Code, gran parte del gasto no suele venir del código que escribes, sino del contexto que se relee en cada paso. Plugins sin uso, servidores MCP que nadie llama, CLAUDE.md y memorias infladas, capturas de pantalla y sesiones abiertas durante días hacen crecer ese contexto. Doctor los encuentra con un solo comando y presenta cada hallazgo con una puntuación, un ahorro estimado y una corrección concreta.
Qué revisa
- Coste de contexto: prompt de sistema, esquemas de herramientas, lista de herramientas diferidas, listas de skills y agentes, instrucciones MCP, la cadena de CLAUDE.md y la memoria. Se mide con la última transcripción; si no hay, se estima desde los archivos.
- No usados: plugins, skills, agentes y servidores MCP que no se llamaron en los últimos N días; servidores pendientes de autenticación o que no conectan; skills con el mismo nombre o disparadores solapados.
- Comportamiento de sesión: contexto medio y máximo, compactaciones, peso de las relecturas de caché, imágenes, salidas de herramientas más grandes, mezcla de modelos, peso de los subagentes y una clasificación de "qué consume más".
- Riesgo de error: posibles secretos en texto plano (solo se informa la ubicación), rutas que ya no existen, reglas posiblemente contradictorias, notas de memoria desactualizadas o fuera del índice, permisos demasiado amplios, hooks que fallan o cuyo script falta.
Instalación
Un solo archivo, sin dependencias (Node 18+). Instalado como skill, basta con pedirle a Claude Code que "revise mi configuración":
mkdir -p ~/.claude/skills/baseofagi-doctor/scripts curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -o ~/.claude/skills/baseofagi-doctor/SKILL.md curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -o ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs
Windows PowerShell:
New-Item -ItemType Directory -Force "$HOME\.claude\skills\baseofagi-doctor\scripts" | Out-Null Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -OutFile "$HOME\.claude\skills\baseofagi-doctor\SKILL.md" Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -OutFile "$HOME\.claude\skills\baseofagi-doctor\scripts\doctor.mjs"
Léelos antes de ejecutar: SKILL.md · doctor.mjs.
Uso
node ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs --all-projects --lang es node doctor.mjs --days 14 --exclude "~/private" --exclude "**/*secret-models*" node doctor.mjs --no-transcripts # solo configuración, no lee las transcripciones
El informe se guarda en Markdown, HTML y JSON en tu carpeta de caché de usuario (cámbiala con --out). Las rutas indicadas con --exclude nunca se abren; la misma lista puede venir de --exclude-file o BASEOFAGI_DOCTOR_EXCLUDE.
Seguridad y privacidad
- Totalmente local: sin peticiones de red, sin llamadas a modelos, sin telemetría.
- Solo lectura.
--fixsolo desactiva plugins sin uso; pregunta por cada uno, hace antes una copia del archivo y no borra nada. - De las transcripciones solo se toman cifras y nombres (herramienta, tamaño, modelo). El contenido de mensajes y archivos nunca entra en el informe. Los valores secretos nunca se escriben, solo archivo y línea.
- Los hallazgos son heurísticos ("posible contradicción", "posiblemente desactualizada"); los tokens son aproximados.
🩺 Base of AGI Doctor: аудит контекста и настроек Claude Code
В Claude Code бо́льшая часть расходов часто приходится не на написанный код, а на контекст, который перечитывается на каждом шаге. Неиспользуемые плагины, MCP-серверы, которые никто не вызывает, раздутые CLAUDE.md и файлы памяти, скриншоты и сессии, открытые днями, — всё это раздувает контекст. Doctor находит это одной командой и показывает каждую находку с баллом, оценкой экономии и конкретной рекомендацией.
Что проверяет
- Стоимость контекста: системный промпт, схемы инструментов, список отложенных инструментов, списки skills и агентов, инструкции MCP, цепочка CLAUDE.md и память. Измеряется по последнему журналу сессии, иначе оценивается по файлам.
- Неиспользуемое: плагины, skills, агенты и MCP-серверы, не вызывавшиеся последние N дней; серверы, ждущие авторизации или не подключающиеся; skills с одинаковыми именами или пересекающимися триггерами.
- Поведение сессий: средний и пиковый контекст, сжатия, доля повторного чтения кэша, изображения, крупнейшие выводы инструментов, распределение по моделям, доля субагентов и рейтинг «что съедает больше всего».
- Риск ошибок: возможные секреты открытым текстом (сообщается только расположение), несуществующие пути, возможно противоречащие правила, устаревшие или не внесённые в индекс заметки памяти, слишком широкие разрешения, падающие hooks и hooks без скрипта.
Установка
Один файл, без зависимостей (Node 18+). Если установить как skill, достаточно попросить Claude Code «проверь мою настройку»:
mkdir -p ~/.claude/skills/baseofagi-doctor/scripts curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -o ~/.claude/skills/baseofagi-doctor/SKILL.md curl -fsSL https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -o ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs
Windows PowerShell:
New-Item -ItemType Directory -Force "$HOME\.claude\skills\baseofagi-doctor\scripts" | Out-Null Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/SKILL.md -OutFile "$HOME\.claude\skills\baseofagi-doctor\SKILL.md" Invoke-WebRequest https://baseofagi.com/skill/baseofagi-doctor/scripts/doctor.mjs -OutFile "$HOME\.claude\skills\baseofagi-doctor\scripts\doctor.mjs"
Прочитайте их перед запуском: SKILL.md · doctor.mjs.
Использование
node ~/.claude/skills/baseofagi-doctor/scripts/doctor.mjs --all-projects --lang ru node doctor.mjs --days 14 --exclude "~/private" --exclude "**/*secret-models*" node doctor.mjs --no-transcripts # только настройки, журналы сессий не читаются
Отчёт сохраняется в Markdown, HTML и JSON в пользовательскую папку кэша (меняется через --out). Пути из --exclude никогда не открываются; тот же список можно передать через --exclude-file или BASEOFAGI_DOCTOR_EXCLUDE.
Безопасность и конфиденциальность
- Полностью локально: без сетевых запросов, без вызовов моделей, без телеметрии.
- Только чтение.
--fixлишь отключает неиспользуемые плагины: спрашивает про каждый, сначала делает копию файла и ничего не удаляет. - Из журналов берутся только числа и имена (инструмент, размер, модель). Содержимое сообщений и файлов в отчёт не попадает. Значения секретов никогда не записываются — только файл и строка.
- Находки эвристические («возможное противоречие», «возможно устарела»); число токенов приблизительно.