跳到正文
cccskills
免费在 GitHub 公开

context-budget

Plan a session's context window like the budget it is — what loads up front, what gets linked instead, what stays fetch-on-demand, and how to keep the stable prefix cache-friendly so repeated turns cost cents instead of dollars. Use when asked my agent keeps blowing its context, plan what to load into the session, why is every turn so expensive, or design the context for this workflow. Produces the load/link/fetch allocation, the cache-aware prefix layout, the per-turn cost shape, and the eviction rules for when the window fills anyway.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md6.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Context Budget Skill

A context window is a budget that gets re-spent every single turn — everything sitting in it rides every call, which is how a session that "only loaded a few files" ends up paying for them forty times. This skill plans the spend before the session: what earns a permanent seat (loaded once, up front, stable), what gets linked (a map or index, with the full thing fetch-on-demand), and what never enters at all. The quiet second half is cache-awareness: providers price cached prefix tokens at a fraction of fresh ones, but only if the prefix stays byte-identical — so the layout (stable things first, volatile things last) is itself a cost decision.

Not quite this? Use context-switch-budget when you mean your own attention and context switching across the week, not an LLM's context window.

What This Skill Produces

  • The allocation — every candidate piece of context sorted into load / link / fetch-on-demand / exclude, with reasons
  • The prefix layout — stable-first ordering that keeps provider caches hitting turn after turn
  • The per-turn cost shape — what a turn costs at the start, mid-session, and near the window limit (measure with token-cost)
  • The eviction rules — pre-decided: what gets summarized, crushed, or dropped when the window fills, and in what order

Required Inputs

Ask for these if not provided:

  • The workflow — what the session does, how many turns it typically runs, what it touches (files, APIs, documents)
  • The candidate context — everything someone wants loaded: instructions, docs, schemas, examples, history — the raw wishlist the budget disciplines
  • The volatility map — which pieces change mid-session (edited files, growing history) and which never do (instructions, schemas) — the cache layout keys off this
  • The window and the pricing — the model's context size, and whether the provider prices cached input differently (most majors do — verify the current terms)

Framework: The Budgeting Rules

  1. Everything resident rides every turn: the first question for each candidate is not "is it useful?" but "is it useful per turn?" — a 4,000-token style guide consulted once cost 4,000 tokens if fetched on demand, and 4,000 × N turns as a resident. Residency is for what most turns actually use.
  2. Link beats load for reference material: an index costs ~3% of its territory (repo-map for code, a crushed schema for data, a table of contents for docs) — load the index, fetch the section when a turn needs it. The escape hatch makes it safe; the ratio makes it policy.
  3. Layout is a price decision — stable first, volatile last: cached-prefix pricing (often ~10% of fresh input) only applies while the prefix stays byte-identical, so anything that changes — timestamps, growing history, edited files — belongs after everything that doesn't. One volatile line at position zero un-caches everything below it, every turn.
  4. Crush at the gates: tool outputs and files pass through context-crusher before entering; output rides token-diet levels where the reader allows. The budget's borders are where compression works — inside, the tokens are already spent.
  5. Evict by plan, not by panic: decide now what goes first when the window fills — typically: crushed tool outputs (refetchable) → resolved sub-task history (summarized to outcomes via session-handoff) → stale file snapshots (re-readable) — and never the instructions or the decisions log. Mid-crisis eviction always throws out the wrong thing; that's why the order is written while calm.

Output Format

Context Budget: [workflow] — [window size], ~[N] turns expected

The Allocation

PieceSize (~tokens)VerdictWhy
[load / link (with its index) / fetch-on-demand / exclude]

The Prefix Layout

[Ordered: instructions → schemas/standing refs → the maps/indexes → (volatility line) → working state → history — with the cache note per section]

Per-Turn Cost Shape

[Turn 1 / mid-session / near-limit — the arithmetic, cache-adjusted where pricing is known]

Eviction Rules (pre-decided)

[The order, each with its recovery route: "crushed outputs first — refetchable via [command]"]

Quality Checks

  • Every resident piece justified per-turn, not per-session
  • Reference material is linked via an index with a fetch route, not loaded wholesale
  • The layout puts nothing volatile above anything stable
  • Compression happens at the borders (crusher in, diet out)
  • The eviction order exists before the window fills, with recovery routes

Anti-Patterns

  • Do not load what a link can carry — residency is the most expensive real estate in the system
  • Do not put a timestamp at the top of a cached prefix — one volatile byte re-prices everything under it
  • Do not treat the window limit as the budget — the budget is per-turn cost × turns; the limit is just the wall
  • Do not evict the decisions log — history compresses, decisions don't; losing them re-litigates the session
  • Do not design for turn one — sessions are priced by their shape over time, and turn one is the cheapest turn there is

Example Trigger Phrases

  • "My agent keeps blowing its context."
  • "Plan what to load into the session."
  • "Why is every turn so expensive?"
  • "Design the context for this workflow."

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Design a 360-degree feedback survey or write a structured 360 feedback report. Use when asked to build a 360 feedback process, write 360 feedback for a colleague, design a feedback survey, or produce a feedback report. Produces either a complete survey instrument with rating scales and open-ended questions, or a structured narrative feedback report with themes, strengths, and development areas.

中文简介正在准备中。当前显示原文说明。

mohitagw15856/pm-claude-skills14822026年10月23日 更新

Decode a 401k or workplace retirement plan — the real cost of its funds, the match's fine print, vesting math, and the plan features worth using or avoiding. Use when someone asks 'is my 401k any good', 'decode my 401k plan', 'which funds should I look at', or 'what fees am I paying'. Produces a fee decode in dollars-over-time, match and vesting math, a fund-lineup triage by cost, and the questions for HR or the plan administrator.

中文简介正在准备中。当前显示原文说明。

mohitagw15856/pm-claude-skills14822026年10月23日 更新

Design statistically rigorous A/B tests for product features, UI changes, onboarding flows, and pricing experiments. Use when asked to set up an experiment, design an A/B test, calculate sample size, or interpret test results. Produces a complete test plan with hypothesis, variant definitions, sample size, duration estimate, guardrail metrics, and a results interpretation guide.

中文简介正在准备中。当前显示原文说明。

mohitagw15856/pm-claude-skills14822026年10月23日 更新

Analyse a finished A/B test and write the readout — the result, whether it's statistically and practically significant, what it means, and the ship/no-ship call. Use when asked to analyse experiment results, write an A/B test readout, interpret test data, or decide whether to ship a variant. Produces a clear verdict with the lift and confidence, segment cuts, the risks (peeking, novelty, sample), and a recommendation. Distinct from planning a test — this reads results.

中文简介正在准备中。当前显示原文说明。

mohitagw15856/pm-claude-skills14822026年10月23日 更新

Build or tailor an academic CV for faculty, postdoc, research or fellowship applications: publications, grants, teaching, supervision and service in the order the field expects, with consistent citations. Use when asked to write my academic CV, update my CV for a lectureship, tenure-track or postdoc application, format my publications list, or adapt my academic CV for an industry research role. Produces the full academic CV, a field-appropriate section order, a clean publications list in one citation style, and a two-page summary version when asked.

中文简介正在准备中。当前显示原文说明。

mohitagw15856/pm-claude-skills14822026年10月23日 更新

Generate a WCAG 2.2 accessibility audit checklist and remediation suggestions for any UI or design. Use when asked to audit for accessibility, check WCAG compliance, review a design for a11y issues, or create an accessibility remediation plan. Produces a prioritised checklist with pass/fail assessments and specific fixes.

中文简介正在准备中。当前显示原文说明。

mohitagw15856/pm-claude-skills14822026年10月23日 更新

查看 mohitagw15856 的全部技能

报告此技能的问题