使い方
- インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
- 必要なツール、認証情報、対応環境を原文で確認します。
- 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/oimiragieo/agent-studio --skill token-saver-adaptive-ratio開始前の確認
- 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
- スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文
見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。
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
javascript
const { computeAdaptiveRatio } = require('./scripts/main.cjs');
const ratio = computeAdaptiveRatio(50000); // Returns 0.2When 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.