Skip to content

Per Skill Opt

sarmakska edited this page Jun 4, 2026 · 1 revision

Per-skill optimisation

The headline "opt %" in the statusline is a project-wide number: how much slipstream saved you, summed across every scoped read in the session. The per-skill breakdown answers the next question: which skills are pulling their weight?

The command

slipstream stats --by-skill
# or
node dist/cli/index.js stats --by-skill

Sample output:

skill              calls   bytes served   baseline    opt %
scoped-read          412      1.21 MB     19.40 MB    93.8 %
symbol-lookup        207        318 KB     6.10 MB    94.9 %
memory-recall         84      1.05 MB      1.05 MB     0.0 %
map-orient            41         92 KB       92 KB     0.0 %
ship-runner           18      4.40 MB      4.40 MB     0.0 %
ALL                  762      7.08 MB     31.0 MB    77.2 %

By default it covers the current session. Add --all-sessions for the project lifetime, or --since 7d for a rolling window.

What opt % means per-skill

For each skill it is the same equation as the headline metric, scoped to the calls that skill made:

opt% = 1 - (bytes_served / baseline_bytes)
  • bytes_served is what the skill actually streamed into the agent.
  • baseline_bytes is what a whole-file read would have streamed for the same target.

A skill that always pulls whole files (because that is its job, like ship-runner running a build log) sits at 0 %, and that is correct: there is no narrower read to compare against. A skill built around sp_symbol and sp_lines should sit in the high 80s or 90s.

How to read the breakdown

  • A scoped-read skill in single digits. Something forced it to fall back to whole-file reads. Usually a stale map (see Drift detection) or the target file having no exported symbols. Rebuild the map; consider adding exports to the file.
  • A skill with very few calls but high baseline. A rare path is doing disproportionate damage. Worth refactoring that path to use scoped reads, even if the total saving is small in the current window.
  • The ALL line drifting down release over release. A regression. Compare against a previous --since window to spot the skill responsible.
  • A skill missing from the table. It was never invoked in the window. That is fine, but if a skill you expect to fire never fires, the skill engine selection rules are worth a look.

The dashboard's Session work panel renders the same table, sortable by column.


SarmaLinux . sarmalinux.com . Repository

Clone this wiki locally