yihongchen772-alt

Tokenfat — AI skill for Claude Code

AI community

Diagnose AND cure AI coding token waste in one command.

How to install Tokenfat

This entry records only its repository, not the path inside it, so there is no exact command to give. Open yihongchen772-alt/tokenfat and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Tokenfat does

Diagnose AND cure AI coding token waste in one command. Local forensics, Nutrition Facts card, live PreToolUse auto-diet, Elephant Session Guard & MCP for Claude Code, Antigravity, Codex, Gemini CLI & Cursor.

Alternatives in AI

  • AI Prompts Writing — 自动判断写作状态、给出写作建议,并辅助AI写作与论文写作(全流程写稿改稿/去AI味/查真文献/画图/导出Word,含43项提示词+Agent Skills) 158 ★
  • Zettel Builder — Bottom-up Zettelkasten card-note skill for AI agent harnesses (Claude Code / OpenClaw / Codex / Hermes) 58 ★
  • AgentDFIR — Open-source digital forensics and incident response for AI agents (Claude Code, Codex, Cursor, Gemini, Copilot 31 ★

README

⚡ tokenfat

**Zero-friction context compression & token-waste forensics for AI coding agents.**

100% local, zero-network, `$0` LLM cost: **Lossless Auto-Compaction Anchors** (`PreCompact` + `SessionStart`), **Whole-Folder / Large-File Smart Digest** (`--digest` / MCP `tokenfat_digest`), **Startup Tax Audit**, **Verified Before-vs-After Proof** (`--compare`), and Apple Health **Token Nutrition Facts** cards for **Claude Code, Antigravity, Codex, Claude Desktop, Gemini CLI, OpenCode & Cursor**.

**Never blocks your prompts. Never truncates real files or folders you ask to read.**

[English](https://github.com/yihongchen772-alt/tokenfat/blob/main/README.md) · [简体中文](https://github.com/yihongchen772-alt/tokenfat/blob/main/README.zh-CN.md)

[![npm version](https://img.shields.io/npm/v/tokenfat?style=flat-square&color=cb3837)](https://www.npmjs.com/package/tokenfat) [![Node >=20](https://img.shields.io/badge/node-%3E%3D20-brightgreen?style=flat-square)](https://nodejs.org) [![License: MIT](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/yihongchen772-alt/tokenfat/blob/main/LICENSE) [![100% Local](https://img.shields.io/badge/privacy-100%25%20local%20%E2%80%A2%200%20network-10b981?style=flat-square)](#privacy--zero-telemetry) [![Zero LLM Cost](https://img.shields.io/badge/API%20cost-%240%20deterministic-f59e0b?style=flat-square)](#why-tokenfat)

npx tokenfat                    # 1. Local autopsy across all 7 AI clients (<2s, offline)
npx tokenfat --cure --apply     # 2. Install Lossless Compaction Anchors + Digest MCP + Lockfile Shield
npx tokenfat --digest ./src     # 3. Line-indexed skeleton of a whole folder or huge file (10x smaller)
npx tokenfat --compare          # 4. Real Before-vs-After proof from your own local logs

**`ccusage`** shows your credit card bill. **`rtk`** aggressively rewrites shell output (easy to hit the "compression trap" or break `permissions.allow`).