skills-experimental/decstbm-scroll-optimization/SKILL.md
# DECSTBM Scroll Optimization Skill DECSTBM Scroll Optimization - ScrollHint type + DECSTBM scroll region + hardware scroll (SU/SD) + top/bottom rows + delta direction + scrollTop change detection + CSI n S/CSI n T pattern。 ## 功能概述 从Claude Code的ink/render-node-to-output.ts提取的DECSTBM滚动优化模式,用于OpenClaw的终端滚动性能优化。 ## 核心机制 ### ScrollHint Type ```typescript // DECSTBM scroll optimization hint. When a ScrollBox's scrollTop changes // between frames (and nothing else moved), log-update.ts can emit
npx skillsauth add bianhaifeng789-hue/openclaw-config skills-experimental/decstbm-scroll-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
DECSTBM Scroll Optimization - ScrollHint type + DECSTBM scroll region + hardware scroll (SU/SD) + top/bottom rows + delta direction + scrollTop change detection + CSI n S/CSI n T pattern。
从Claude Code的ink/render-node-to-output.ts提取的DECSTBM滚动优化模式,用于OpenClaw的终端滚动性能优化。
// DECSTBM scroll optimization hint. When a ScrollBox's scrollTop changes
// between frames (and nothing else moved), log-update.ts can emit a
// hardware scroll (DECSTBM + SU/SD) instead of rewriting the whole viewport.
export type ScrollHint = {
top: number // 0-indexed inclusive screen row
bottom: number // 0-indexed inclusive screen row
delta: number // >0: content moved up (scrollTop increased, CSI n S)
}
// Hardware scroll optimization
// Only scrollTop changed, nothing else moved
# DECSTBM + SU/SD CSI sequences
// DECSTBM: Set Top and Bottom Margins
// CSI top ; bottom r
// Defines scroll region
// Only rows in region scroll
// Terminal scroll region
// Limits scroll area
# Efficient partial scroll
// CSI n S: Scroll Down (content moves up, scrollTop increased)
// CSI n T: Scroll Up (content moves down, scrollTop decreased)
// Hardware scroll: terminal shifts rows
// No re-render needed
// Hardware scroll sequences
// CSI n S/CSI n T
# Skip full viewport rewrite
// When a ScrollBox's scrollTop changes between frames
// (and nothing else moved), emit hardware scroll
// scrollTop diff only
// No layout shift
# Hardware scroll eligible
// top/bottom are 0-indexed inclusive screen rows
// Define scroll region boundaries
// 0-indexed inclusive
// Region rows
// delta > 0: content moved up (scrollTop increased)
// CSI n S (scroll down n lines)
// delta < 0: content moved down (scrollTop decreased)
// CSI n T (scroll up n lines)
// Direction from delta
// CSI sequence choice
export function resetScrollHint(): void {
scrollHint = null
absoluteRectsPrev = absoluteRectsCur
absoluteRectsCur = []
}
// Reset per-frame
// Record absolute rects
# Previous frame rects preserved
{
"scrollHint": {
"top": 5,
"bottom": 20,
"delta": 3
},
"scrollTopPrev": 10,
"scrollTopCur": 13
}
scrollTop change only → DECSTBM + SU/SD → hardware scroll → skip full viewport rewrite
# 只有scrollTop变化
# 使用硬件滚动
# 避免全viewport重写
# 大幅减少IO
DECSTBM: CSI top ; bottom r → scroll region → only region rows shift
# DECSTBM设置滚动区域
# 只有区域内rows滚动
# 其他rows保持
delta > 0: CSI n S (scroll down, content up) | delta < 0: CSI n T (scroll up, content down)
# delta正负决定CSI sequence
# CSI n S: scroll down n lines
# CSI n T: scroll up n lines
scrollTop change + nothing else moved → hardware scroll eligible
# scrollTop变化是唯一条件
# 无其他layout shift
# 硬件滚动优化eligible
ink/render-node-to-output.ts (1462 lines)business
IAA 日报飞书输出能力。 支持把固定 CSV 模板一键转换成: - 中文运营结论 - 飞书卡片 JSON - 飞书发送载荷 Use when: - 需要把 IAA 日报直接发到飞书 - 需要从 CSV 一键生成运营日报
data-ai
IAA日报分析模型 功能: - 渠道日报自动分析 - 小时级+日级ROI联动判断 - 按地区输出加量/降量/停投建议 - 按产品类型输出阈值 - 自动识别利润区/观察区/止损区 Use when: - 分析每天投放数据 - 生成运营日报结论 - 判断是否加量/降量/停投 - 对比美加澳/日韩表现 Keywords: - 日报模型, 投放日报, 加量, 降量, 停投, ROI日报, 分地区分析
data-ai
IAA固定日报分析模板 功能: - 固定字段模板(可直接贴每天数据) - 自动输出总盘结论 - 自动输出美加澳/日韩结论 - 自动给出加量/降量/停投建议 - 适配文件修复/清理两类产品 Use when: - 需要固定日报格式 - 每天复盘渠道表现 - 给运营团队出统一结论 Keywords: - 固定模板, 日报模板, ROI模板, IAA日报, 运营模板
development
# HyperlinkPool Pattern Skill HyperlinkPool Pattern - HyperlinkPool class + strings array + stringMap + Index 0 no hyperlink + intern(hyperlink) + get(id) + undefined handling + 5-minute reset + OSC8 hyperlink interning。 ## 功能概述 从Claude Code的ink/screen.ts提取的HyperlinkPool模式,用于OpenClaw的OSC8超链接池管理。 ## 核心机制 ### HyperlinkPool Class ```typescript export class HyperlinkPool { private strings: string[] = [''] // Index 0 = no hyperlink private stringMap = new Map<string, number>() // strings