agentleFS
tiagovilasboastiagovilasboas/downshift-ai/skills/downshift-tune/SKILL.md

downshift-tune

Skill4 starsChanged 9 days agoApache-2.0View on GitHub

Tune what a session spends in tokens and quota with Downshift installed, in a fixed order with evidence first. Diagnoses routing, fixed context, tool output and project policy, then proposes one change at a time. Use only when the user names Downshift, or asks to cut subagent tokens, context or quota in a project where `downshift doctor` runs. Writes nothing to a file outside the repository without the user's yes.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every change to a file outside the repository is shown first and waits for the user's yes.

    line 14
  2. Distinctive:

    Run all four before proposing anything.

    line 19
  3. Very specific:

    If Downshift is not routing at all, stop here and hand over to the downshift-setup skill.

    line 28
  4. Distinctive:

    Fixed context: when the always-loaded set is large or has content for one domain only.

    line 34
  5. Distinctive:

    Tool output: when sessions re-read long test, build or log output.

    line 36
  6. Distinctive:

    Project policy: when a low-risk repository keeps spawning at the frontier tier, or a high-risk one keeps rework from downshifts.

    line 38
  7. Distinctive:

    Misroutes: when a child failed because its tier was too small, or a trivial task kept the frontier tier.

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Downshift tune

Downshift does not track spend and does not measure money. It works simply and model-agnostically: the LLM picks the model, and Downshift only applies the [tier=small] hint (down only), the limits the user declares (a floor that only raises, the session allowlist, quota) and reports the result in tokens. This skill reduces the tokens and quota a session consumes, and the rework a wrong routing decision causes. Never promise a percentage. Never read or print task prompts. Every change to a file outside the repository is shown first and waits for the user's yes.

1. Diagnose, in this order

Run all four before proposing anything. Record what you observed, not what you assume.

StepCommandWhat it tells you
Is routing on?downshift doctor --jsonfailed checks, each with a fix; companion row says whether a context companion is recorded
What did routing do?downshift stats --days=7decisions and held guardrails over the period; frontier rewrites on doubt above 0 is an alarm
What loads every session?wc -c on the always-loaded files (section 3 of the audit skill) plus the skill descriptions and MCP tool schemasfixed context per session, in bytes (tokens ≈ bytes / 4, say it is an estimate)
Where does tool output go?downshift context status; downshift context metricsnative observe counts; whether a companion compressor is recorded

If Downshift is not routing at all, stop here and hand over to the downshift-setup skill.

2. Pick the biggest lever

Order by expected effect, then apply one at a time and re-measure:

  1. Fixed context when the always-loaded set is large or has content for one domain only. references/context-diet.md
  2. Tool output when sessions re-read long test, build or log output. references/compress-output.md
  3. Project policy when a low-risk repository keeps spawning at the frontier tier, or a high-risk one keeps rework from downshifts. references/project-policy.md
  4. Misroutes when a child failed because its tier was too small, or a trivial task kept the frontier tier. references/misroute-triage.md

Routing itself needs no tuning here: it is deterministic and already applied. The LLM chooses the model; Downshift only carries the [tier=small] hint down and holds the limits the user declared. Do not teach the user to word prompts so the classifier picks a smaller tier; that moves risk, not tokens.

3. Report

Table: lever | evidence (command and the line you read) | change proposed | expected effect (direction only, in tokens, context bytes or quota) | confidence (observed, inferred, unverified). One change per row. After the user applies one, re-run step 1 next week; downshift report compares routed and control from their own usage, in tokens per completed task.

Downshift by Tiago Vilas Boas · https://github.com/tiagovilasboas/downshift-ai

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.