Skip to content
Back to skills

Token Saver Adaptive Ratio

ASecurity

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

  • 40 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
developmentjavascriptrustgojavatesting

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add oimiragieo/agent-studio --skill token-saver-adaptive-ratio --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Token Saver Adaptive Ratio?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Token Saver Adaptive Ratio
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/oimiragieo-token-saver-adaptive-ratio/badge)](https://www.skillsdirectory.com/skills/oimiragieo-token-saver-adaptive-ratio)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: token-saver-adaptive-ratio
description: Helper skill that exposes adaptive token-saver compression ratios for large context corpora.
version: 1.0.0
category: helper
invoked_by: skill
user_invocable: false
agents: [context-compressor]
tags: [token-saver, compression, helper]
source: builtin
trust_score: 100
provenance_sha: 31cd24bf51f50786
---

# 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.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.

Files in this skill

  • SKILL.md1.3 KB
  • commands/token-saver-adaptive-ratio.md126 B
  • hooks/post-execute.cjs205 B
  • hooks/pre-execute.cjs311 B
  • references/research-requirements.md531 B
  • rules/token-saver-adaptive-ratio.md415 B
  • schemas/input.schema.json487 B
  • schemas/output.schema.json312 B
  • scripts/main.cjs1.1 KB
  • templates/implementation-template.md360 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…