EveryDev.ai
Subscribe
Home
Tools

3,804+ AI tools

  • New
  • Trending
  • Featured
  • Compare
  • Arena
Categories
  • Agents2782
  • Coding1973
  • Infrastructure825
  • Projects603
  • Marketing598
  • Research520
  • Analytics468
  • Design462
  • MCP419
  • Testing346
  • Security323
  • Data305
  • Integration224
  • Prompts220
  • Communication210
  • Extensions196
  • Learning179
  • Voice175
  • Commerce160
  • DevOps135
  • Web95
  • Finance31
AI Tools by Topic
  • AI Coding Assistants
  • Agent Frameworks
  • MCP Servers
  • AI Prompt Tools
  • Vibe Coding Tools
  • AI Design Tools
  • AI Database Tools
  • AI Website Builders
  • AI Testing Tools
  • LLM Evaluations
Follow Us
  • X / Twitter
  • LinkedIn
  • Reddit
  • Discord
  • Threads
  • Bluesky
  • Mastodon
  • YouTube
  • GitHub
  • Instagram
Get Started
  • About
  • Editorial Standards
  • Corrections & Disclosures
  • Community Guidelines
  • Advertise
  • Contact Us
  • Newsletter
  • Submit a Tool
  • Start a Discussion
  • Write A Blog
  • Share A Build
  • Terms of Service
  • Privacy Policy
Explore with AI
  • ChatGPT
  • Gemini
  • Claude
  • Grok
  • Perplexity
Agent Experience
  • llms.txt
Theme
With AI, Everyone is a Dev. EveryDev.ai © 2026
    1. Home
    2. Tools
    3. tokensift
    tokensift icon

    tokensift

    Prompt Engineering

    A deterministic, offline token-efficiency linter for LLM prompts and payloads that identifies token waste and calculates real dollar costs per finding.

    Visit Website

    At a Glance

    Pricing
    Open Source

    Fully free and open source under the MIT license. Install via npm and use all features at no cost.

    Engagement

    Available On

    Web
    API
    SDK
    CLI

    Resources

    WebsiteDocsGitHubllms.txt

    Topics

    Prompt EngineeringLinters & FormattersAI Development Libraries

    Alternatives

    id-agentTokenCalculator.devFabric
    Developer
    Riten VagadiyaRiten Vagadiya builds developer tools focused on LLM efficie…

    Listed Sep 2026

    About tokensift

    tokensift is a token-efficiency linter for LLM prompts and payloads, built by Riten Vagadiya and published under the MIT license. It performs deterministic, local, tokenizer-level static analysis on prompt strings, Message[] arrays, and tool schemas — no network calls, no accounts, no telemetry. The project is actively developed and available on npm as tokensift.

    What It Is

    tokensift works like a code linter (think ESLint), but instead of flagging style issues, it flags token waste: text that costs money and context-window space without adding value for the model. It actually tokenizes input using the same encoder the provider uses — for OpenAI models that means the real BPE vocabulary, so counts are exact. For Claude, where no public tokenizer exists, it uses a calibrated estimate and marks every finding with confidence: "estimate" vs "exact". The tool ships 20 built-in rules covering problems like UUID bloat, repeated blocks, pretty-printed JSON, base64 blobs, filler phrases, and more.

    How the Analysis Works

    Each finding includes the rule that fired, the token cost before and after a fix, a suggestion, and a real dollar cost derived from a curated snapshot of LiteLLM's pricing table. Finding.cost.perCall is the savings per call; Finding.cost.per1000Calls is the same number at a more readable denomination. A volume config option projects monthly cost at a given request rate. The analyze() function runs all built-in rules by default; passing rules: [...] runs a subset, and rules: [] just tokenizes with no findings.

    Key built-in rules include:

    • uuid-bloat — UUIDs cost ~18 tokens; a short id costs 3
    • repeated-block — verbatim spans repeated across a prompt are paid every time
    • pretty-json — indented JSON spends tokens on whitespace the model doesn't need
    • base64-blob — base64 runs close to 1 token per 1.3–1.5 characters (error severity)
    • filler — hedging phrases add token cost with no instruction content
    • html-whitespace, whitespace-run, unicode-punct — all autofixable

    Two Ways to Use It

    As a library: analyze() accepts a prompt string or message array and returns a Report with findings, summary token counts, and cost. dyn() marks dynamic slots so static and per-request token costs are tracked separately. defineRule lets you write custom rules in the same shape as the 20 built-ins. Test matchers for vitest and jest are available via tokensift/matchers, with toBeUnderTokens, toHaveNoTokensiftErrors, and toMatchTokenBaseline.

    As a CLI: Point it at files, globs, or stdin. Output formats include pretty terminal output, JSON, GitHub Actions annotations (--format github), PR-comment markdown tables (--format markdown), and SARIF 2.1.0 for GitHub Code Scanning. --fix --write applies safe autofixes. tokensift init scaffolds a config file and reference snippets for GitHub Actions, pre-commit hooks, and test setup. tokensift check is the CI gate: exits 0 (clean) or 2 (error-severity finding), with no middle ground.

    Deployment and Runtime Compatibility

    The analyze/budget/tokenize path has no Node-specific code, so it works in Cloudflare Workers, Supabase Edge Functions, Netlify Edge Functions, and Deno via npm:tokensift — no config, no shims. The full bundle gzips to ~1.6MB; importing a single encoder family (e.g., tokensift/encoders/o200k) drops it to ~1.13MB, useful for edge environments with compressed-size limits. Vercel users should use the Node.js runtime rather than Edge Runtime.

    Update: v1.3.0

    The latest release is v1.3.0, published on 2026-08-28. The project was created in July 2026 and has been actively developed since, with the core engine, 20 rules, CLI, test matchers, Claude calibration support, and pricing tooling all functional. Supported OpenAI model families are o200k_base (gpt-4o, gpt-4.1, gpt-5, o1, o3, o4-mini, and more) and cl100k_base (gpt-4, gpt-3.5-turbo), both with exact confidence. Anthropic support covers claude-opus-4-5, claude-sonnet-4-5, and claude-haiku-4-5 with estimate-based confidence and a calibrate command for running your own calibration against your own prompts and API key.

    tokensift - 1

    Community Discussions

    Be the first to start a conversation about tokensift

    Share your experience with tokensift, ask questions, or help others learn from your insights.

    Pricing

    OPEN SOURCE

    Open Source

    Fully free and open source under the MIT license. Install via npm and use all features at no cost.

    • All 20 built-in rules
    • CLI with file, glob, and stdin support
    • Library API for Node.js, Deno, and edge runtimes
    • Test matchers for vitest and jest
    • Custom rule authoring

    Capabilities

    Key Features

    • Token-efficiency linting for LLM prompts and payloads
    • 20 built-in rules covering UUID bloat, repeated blocks, pretty-printed JSON, base64 blobs, filler phrases, and more
    • Exact tokenization for OpenAI models using real BPE vocabulary
    • Calibrated estimate-based tokenization for Claude models
    • Real dollar cost per finding with per-call and per-1000-calls breakdown
    • CLI with file, glob, and stdin support
    • Output formats: terminal, JSON, GitHub Actions annotations, Markdown, SARIF 2.1.0
    • Autofixable rules: unicode-punct, whitespace-run, pretty-json, html-whitespace
    • Custom rule authoring via defineRule
    • Test matchers for vitest and jest (toBeUnderTokens, toHaveNoTokensiftErrors, toMatchTokenBaseline)
    • Template slot tracking with dyn() for static vs dynamic token cost separation
    • Baseline regression tracking for CI
    • Token budget enforcement with budget init and check commands
    • Pricing snapshot from LiteLLM with local override support
    • Cloudflare Workers, Supabase Edge, Netlify Edge, and Deno compatible
    • No telemetry, no accounts, no background network calls
    • Deterministic and fully offline analysis

    Integrations

    OpenAI (gpt-4o, gpt-4.1, gpt-5, o1, o3, o4-mini, and more)
    Anthropic Claude (claude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5)
    vitest
    jest
    GitHub Actions
    Cloudflare Workers
    Supabase Edge Functions
    Netlify Edge Functions
    Vercel (Node.js runtime)
    Deno
    LiteLLM pricing table
    API Available
    View Docs

    Ratings & Reviews

    No ratings yet

    Be the first to rate tokensift and help others make informed decisions.

    Developer

    Riten Vagadiya

    Riten Vagadiya builds developer tools focused on LLM efficiency and prompt engineering. tokensift is his open-source token-efficiency linter for LLM prompts and payloads, published under the MIT license. The project is actively maintained on GitHub with regular releases.

    Read more about Riten Vagadiya
    WebsiteGitHub
    1 tool in directory

    Similar Tools

    id-agent icon

    id-agent

    Token-efficient, human-readable word-based ID generator for AI agents — a UUID alternative optimized for LLM context windows.

    TokenCalculator.dev icon

    TokenCalculator.dev

    Privacy-first browser-based token and cost calculator for text, code, PDFs, and images across OpenAI, Claude, Gemini, and DeepSeek — no content uploaded.

    Fabric icon

    Fabric

    An open-source CLI framework for augmenting humans using AI by organizing and applying crowdsourced prompt patterns to real-world tasks.

    Browse all tools

    Related Topics

    Prompt Engineering

    Tools for creating and refining effective AI prompts.

    82 tools

    Linters & Formatters

    Automated code quality tools that check style, detect errors, and format code consistently across projects.

    11 tools

    AI Development Libraries

    Programming libraries and frameworks that provide machine learning capabilities, model integration, and AI functionality for developers.

    303 tools
    Browse all topics
    Back to all toolsSuggest an edit
    ratings
    discussions