agentsclimarketplace

Scrollback freeze optimization

Skill ychampion/cskill-agents/skills/scrollback-freeze-optimization

Agent skills for coding CLIs, multi-agent runtimes, context engines, MCP extensions, and terminal tooling. Instead of using claude code's source code, give your agent skills to create your own!

Install
npx -y skills add ychampion/cskill-agents --skill scrollback-freeze-optimization

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Cache and reuse animated children once they slide into scrollback so terminal resets never occur.

SKILL.md

1.8 KB, 324 tokens by cl100k_base, as published. Nobody here has run it

SKILL: Scrollback Freeze Optimization

Domain: terminal-ui Trigger: Apply whenever you render active widgets that can scroll into terminal history and would otherwise force full-screen updates. Source Pattern: Distilled from reviewed terminal rendering, layout, animation, and accessibility implementations.

Core Method

Wrap any timer-driven subtree with a viewport-aware container that caches the last visible React element in a ref. When the viewport reports hidden, always return the cached node instead of the live children; React's diffing sees no change and the terminal renderer skips the expensive full-screen redraw.

Key Rules

  • Use viewport visibility for the specific widget you are freezing and keep an explicit reference to the last rendered children.
  • Only update the cache while the element is visible; otherwise return the cached subtree so React can reuse the same reference.
  • Disable memoization on the freeze wrapper (explicit 'use no memo') so React doesn't bail out before the cached reference is read.
  • Keep the cached node simple so it can be safely reused after long pauses and still produce the correct layout.

Example Application

Wrap a spinner in scrollback with the freeze wrapper so once you scroll past it, log-update never touches the spinner subtree even though its timer continues running when visible.

Anti-Patterns (What NOT to do)

  • Let the spinner still re-render while offscreen, which triggers repeated full-screen resets.
  • Put the cache update inside a memoized component that never reads the cached ref.
  • Assume scrollback nodes can simply be hidden with CSS; the terminal renderer still re-renders them.

Gives 0 of the 12 instructions most performance cost skills give in 324 tokens

Counted across 803 of the 1,058 authors here whose files we hold, read 2026-08-07

  • keep skill files under 500 linesin 82 of 803, across 16 files
  • use imperative form in instructionsin 80 of 803, across 9 files
  • draft assertions while test runs are in progressin 75 of 803, across 9 files
  • create two to three realistic test promptsin 74 of 803, across 9 files
  • write skill descriptions to be pushyin 72 of 803, across 7 files
  • save test cases to evals jsonin 72 of 803, across 6 files
  • ask questions about edge cases and input formatsin 72 of 803, across 7 files
  • save timing data immediately when runs completein 70 of 803, across 5 files
  • include all trigger conditions in the skill descriptionin 69 of 803, across 3 files
  • launch all test runs in a single turnin 69 of 803, across 3 files
  • capture intent before writing a skillin 67 of 803, across 1 file
  • import directly instead of barrel filesin 52 of 803, across 15 files

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.