feat: thin session — hide skill bulk from injection, route on demand

Claude Code injects every personal skill name (~1.4k skills → ~11k tokens) into
each session. Thin session hides the bulk via native skillOverrides
(user-invocable-only) and surfaces the top-5 relevant skills per prompt — saving
~11k tokens/session while keeping every skill reachable by /name.

- gen-skill-overrides.mjs: writes the skillOverrides hide-map (allowlist editable)
- skill-router.mjs: UserPromptSubmit hook, per-prompt top-5, fail-open + guarded
- athena-research: manual router skill
- build-skill-index.mjs: index now scans ~/.claude/skills + dedupes parity copies
- route-skills.mjs / build_registry.py: usage/frequency removed from ranking
  (still collected for analytics; ranking is quality-led)
- settings.json.tmpl: register the hook; bootstrap Layer 2 runs the generator so
  thin session is on by default for fresh installs
- docs/thin-session.md + README: what it is, how it saves tokens, how to revert

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Зарубин Филипп
2026-06-22 20:31:30 +03:00
co-authored by Claude Opus 4.8
parent bc3696bb38
commit 67e6b0e84d
10 changed files with 346 additions and 7 deletions
+2
View File
@@ -155,6 +155,8 @@ Every time an AI assistant has to rediscover its own tools, re-read scattered in
Less wandering means fewer tokens spent on overhead and more spent on your actual problem. The structure does the remembering, so the assistant doesn't have to.
**Thin session — thousands of skills, near-zero startup cost.** Listing every skill to the assistant up front costs ~11k tokens *per session*. Athena hides the bulk behind a native, reversible `skillOverrides` map and surfaces only the ~5 most relevant skills per prompt (a fail-open `UserPromptSubmit` router), so the model starts clean and pulls capability on demand — every skill still reachable by `/name`. **~11k tokens saved per session.** See [docs/thin-session.md](docs/thin-session.md).
---
## Why it's efficient (in short)