Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

token-formatter

БесплатноБез исполняемых скриптовНе проверен

Convert verbose docs/markdown/text into token-efficient formats. Use when user wants to reduce token count, compress content for LLM context, or optimize for…

majiayu000от majiayu000★ 31 звезда на GitHub

Об этом скилле

Token Formatter Skill

Convert verbose documentation, markdown, and text files into token-efficient formats while preserving essential information.

When to Use

Invoke this skill when:

  • User wants to reduce token count in documentation
  • User needs to compress markdown/text for LLM context
  • User asks to optimize content for AI consumption
  • Commands: /token-format, /compress, /toon

Token Reduction Rules

1. Remove Redundancy

Before:

## Introduction

In this document, we will explore and discuss the various different ways
that you can implement authentication in your application. We will cover
multiple approaches and methods that are available to developers.

After:

## Auth Implementation

Methods covered:
- JWT tokens
- Session-based
- OAuth2

2. Use Symbols & Abbreviations

Verbose Compressed
function fn
return ret
string str
number num
boolean bool
array arr
object obj
parameter param
configuration config
environment env
authentication auth
authorization authz
application app
database db
repository repo
directory dir
reference ref
implementation impl
documentation docs
information info
example ex
required req
optional opt
default def
maximum max
minimum min
and &
or |
with w/
without w/o
versus vs
approximately ~
greater than >
less than <
equals =
not equals !=
therefore =>
because bc

3. Compress Lists

Before:

The following features are included:
- User authentication with JWT tokens
- Role-based access control for authorization
- Password hashing using bcrypt algorithm
- Session management with Redis store
- Two-factor authentication support

After:

Features:
- JWT auth
- RBAC authz
- bcrypt passwords
- Redis sessions
- 2FA support

4. Remove Filler Words

Remove these words when possible:

  • "basically", "essentially", "actually", "really"
  • "in order to" → "to"
  • "due to the fact that" → "because"
  • "at this point in time" → "now"
  • "in the event that" → "if"
  • "for the purpose of" → "for"
  • "has the ability to" → "can"
  • "it is important to note that" → (remove)
  • "please note that" → (remove)
  • "as mentioned previously" → (remove)

5. Structured Data Format

Before (prose):

The API endpoint accepts three parameters. The first parameter is called
"userId" which is a required string that identifies the user. The second
parameter is "limit" which is an optional number that defaults to 10.
The third parameter is "offset" which is also optional and defaults to 0.

After (structured):

Params:
- userId: str (req) - user ID
- limit: num (opt, def=10)
- offset: num (opt, def=0)

6. Code Block Compression

Before:

// This function validates the user input
// It checks if the email is valid and the password meets requirements
function validateUserInput(email: string, password: string): boolean {
  // Check if email is valid
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  const isEmailValid = emailRegex.test(email);

  // Check if password is at least 8 characters
  const isPasswordValid = password.length >= 8;

  // Return true if both are valid
  return isEmailValid && isPasswordValid;
}

After:

fn validateUserInput(email: str, password: str): bool {
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email) && password.length >= 8;
}

7. Table Compression

Before:

| Parameter Name | Type | Required | Default Value | Description |
|---------------|------|----------|---------------|-------------|
| userId | string | yes | none | The unique identifier for the user |
| limit | number | no | 10 | Maximum number of results to return |
| offset | number | no | 0 | Number of results to skip |

After:

| Param | Type | Req | Def | Desc |
|-------|------|-----|-----|------|
| userId | str | Y | - | user ID |
| limit | num | N | 10 | max results |
| offset | num | N | 0 | skip count |

8. Heading Compression

Before:

# Comprehensive Guide to User Authentication and Authorization

## Chapter 1: Introduction to Authentication Concepts

### Section 1.1: Understanding the Basics of User Identity

After:

# Auth Guide

## 1. Intro

### 1.1 Identity Basics

9. URL & Path Compression

Before:

The configuration file is located at `/Users/username/Documents/Projects/MyApp/config/settings.json`

After:

Config: `~/Projects/MyApp/config/settings.json`

Полный SKILL.md на GitHub

Установить token-formatter в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл token-formatter?

Convert verbose docs/markdown/text into token-efficient formats. Use when user wants to reduce token count, compress content for LLM context, or optimize for AI consumption.

Как установить скилл token-formatter?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл token-formatter запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить token-formatter с