技能潮 SkillTide 提交收录
官方说明开源项目7 天前
sblattj/context-diet

sblattj/context-diet

Measure and cut Claude Code's starting context without breaking which skills fire. Scripts, A/B harness and a plugin.
在 GitHub 查看 ↗直链 · 无中转页
★ 数取值
0 ★ · sblattj/context-diet · 取自该仓库的 GitHub 页面 · (2026-10-16 20:00:20 核对)
来源明细
从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
收录与活跃
收录于 2026-10-10 · 最近见到 2026-10-10 · 共见到 2 次 · 被 1 个来源列出
评分构成
综合分 103 · 1 个来源 · repo
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 sblattj/context-diet;我们收录于 2026-10-10;最近见到 2026-10-10。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

context-diet

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

Measure and cut what Claude Code loads before your first prompt (built-in tool schemas, the skills listing, CLAUDE.md, MCP), then prove with an A/B that your skills still get picked.
S-T: every session pays a fixed "entry fee" of tokens before you type anything. This repo tells you what's in that fee, helps you shrink it, and checks you didn't break anything doing it. Example: hiding 20 rarely used skill descriptions saves ~2k tokens on every call; the A/B tells you if Claude still finds those skills when you need them.
What's here
| Folder | What it does |
|---|---|
| measure/ | start_tokens.py (real start per session from your logs, split by block), probe-interactive.sh (cost of one built-in tool in a real interactive session), ablate.sh (headless component ablation) |
| audit/ | skill-usage.py (how often each skill really fired), audit.py (suggested skillOverrides), skill-lint.py (600-char description cap), mcp-usage.py (calls per MCP server, suggests deniedMcpServers), size-ratchet.py (fails when CLAUDE.md, agents or a skill listing grow past a pinned baseline), memory-lint.py (lint CLAUDE.md and its @ imports for dangling pointers, import cycles and duplicated rules) |
| ab/ | Skill-trigger A/B: mine prompts from logs, build arms, synthesize missing positives, run, report recall / wrong pick / false fires / McNemar. Rename arms included |
| tools/ | publish-artifact.sh: publish an Artifact page from a throwaway side session so the Artifact tool can stay off |
| agents/lean.md | A low-context subagent (shell + file tools only) for fan-out work |
| skills/ | Plugin skills that point Claude at the above |
| docs/ | RUNBOOK.md (the full method) and CONTEXT-DIET.md |
Install as a plugin
Or just clone and run the scripts. Python 3.9+, no dependencies; tmux for the interactive probes.
Quick start
Scope and config: scripts read $CLAUDE_CONFIG_DIR if set, else ~/.claude. Session readers (start_tokens.py, skill-usage.py, mcp-usage.py, ab/mine.py) default to the current directory's project; use --project PATH for another one or --all-projects for all. If the project has no sessions they exit 2 rather than reading everything. Anything that calls a model (ablate.sh, ab/filter.py, ab/synth.py, ab/run.py, ab/quick_ab.py) requires --model with an explicit model id.
Then follow docs/RUNBOOK.md: change one lever, A/B it (ab/README.md), keep it only if recall holds.
Findings that shaped it
- claude -p starts ~21k lower than an interactive session. Measure real starts (entrypoint: cli).
来源
github · https://github.com/sblattj/context-diet
按领域浏览
开源项目
收录于
7 天前

更多开源项目

查看开源项目全部 731 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引