token-saver-adaptive-ratio

v2026.09.24

Helper skill that exposes adaptive token-saver compression ratios for large context corpora.

GitHub
安装命令
npx skhub add oimiragieo/token-saver-adaptive-ratio
Markdown
SKILL.md

Token Saver Adaptive Ratio

Computes adaptive skeleton ratio based on corpus token count for context compression.

Purpose

This skill provides the computeAdaptiveRatio function that determines the optimal compression ratio based on the size of the context corpus:

  • <8K tokens: Returns 0.8 (keep 80% of content)
  • 8-32K tokens: Returns 0.5 (keep 50% of content)
  • 32-100K tokens: Returns 0.2 (keep 20% of content)
  • >100K tokens: Returns 0.1 (keep 10% of content)

Usage

const { computeAdaptiveRatio } = require('./scripts/main.cjs');

const ratio = computeAdaptiveRatio(50000); // Returns 0.2

When to Use

  • Before running context compression to determine the target compression ratio
  • When estimating token budget for large file reads
  • As part of the token-saver-context-compression workflow

Implementation

Re-exports the computeAdaptiveRatio function from token-saver-context-compression for module resolution and testing purposes.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

未指定

源路径

.claude/skills/token-saver-adaptive-ratio

默认分支

main

最新提交

64b580e

Tree SHA

42a1df4