Files
athena/chezmoi/dot_claude/settings.json.tmpl
T
Зарубин ФилиппandClaude Opus 4.8 67e6b0e84d 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>
2026-06-22 20:31:30 +03:00

114 lines
3.2 KiB
Cheetah

{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"deny": [
"Read({{ .chezmoi.homeDir }}/.claude/secrets/**)",
"Read({{ .chezmoi.homeDir }}/.claude/server.env)",
"Read({{ .chezmoi.homeDir }}/.claude/session-env/**)",
"Read({{ .chezmoi.homeDir }}/.ssh/**)",
"Read({{ .chezmoi.homeDir }}/.secrets/**)",
"Read({{ .chezmoi.homeDir }}/.config/gh/**)",
"Read({{ .chezmoi.homeDir }}/.git-credentials)",
"Read({{ .chezmoi.homeDir }}/.claude/mcp.json)",
"Read(**/.env)",
"Read(**/.env.*)",
"Read(**/*secret*)",
"Read(**/*credential*)",
"Read(**/id_rsa*)",
"Read(**/*.pem)",
"Read(**/.scrapegraphai/**)",
"Read(**/references/secrets-map.md)",
"Edit(**/.env)",
"Write(**/.env)",
"Edit(**/*secret*)",
"Write(**/*secret*)",
"Write({{ .chezmoi.homeDir }}/.ssh/**)",
"Edit({{ .chezmoi.homeDir }}/.ssh/**)",
"Write({{ .chezmoi.homeDir }}/.secrets/**)",
"Edit({{ .chezmoi.homeDir }}/.secrets/**)",
"Write({{ .chezmoi.homeDir }}/.git-credentials)",
"Edit({{ .chezmoi.homeDir }}/.git-credentials)",
"Write({{ .chezmoi.homeDir }}/.claude/mcp.json)",
"Edit({{ .chezmoi.homeDir }}/.claude/mcp.json)",
"Write(**/*.pem)",
"Edit(**/*.pem)",
"Write(**/*.key)",
"Edit(**/*.key)",
"Write(**/*.ovpn)",
"Edit(**/*.ovpn)",
"Write(**/*credential*)",
"Edit(**/*credential*)"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "bash \"{{ .chezmoi.homeDir }}/.claude/hooks/security-guard.sh\"",
"timeout": 5
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash \"{{ .chezmoi.homeDir }}/.claude/hooks/bash-guard.sh\"",
"timeout": 5
},
{
"type": "command",
"command": "bash \"{{ .chezmoi.homeDir }}/.claude/hooks/git-leak-guard.sh\"",
"timeout": 10
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node \"{{ .chezmoi.homeDir }}/.claude/hooks/skill-router.mjs\"",
"timeout": 6,
"statusMessage": "GraphiFy skill routing..."
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash \"{{ .chezmoi.homeDir }}/.claude/hooks/onboarding-detect.sh\"",
"timeout": 5
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "bash \"{{ .chezmoi.homeDir }}/.claude/scripts/session-token-log.sh\"",
"async": true,
"timeout": 20,
"statusMessage": "Token-spend → self-learning..."
}
]
}
]
},
"enabledPlugins": {
"superpowers@superpowers-dev": true,
"ui-ux-pro-max@ui-ux-pro-max-skill": true,
"caveman@caveman": true
}
}