tollbooth

Estimate prompt token counts and dollar costs across language models.

6|1|Updated Jun 23, 2026
One-click install
npx skills add https://github.com/JGalego/Bag-of-Tricks --skill tollbooth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tollbooth
Source: https://github.com/JGalego/Bag-of-Tricks/tree/main/tollbooth
Command: npx skills add https://github.com/JGalego/Bag-of-Tricks --skill tollbooth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides the cost estimation of prompts across various language models before they are sent, helping users manage their budgets and optimize their requests.

Core Features & Use Cases

  • Cost Estimation: Estimate the token count and dollar cost of a prompt for different models.
  • Model Comparison: Compare the cost of prompts across different models.
  • Budget Management: Use the estimated costs to manage and plan AI budget.

Quick Start

Estimate the cost of a prompt using the tollbooth skill with the following command: tollbooth --tokens-only "Your prompt here"

Frequently Asked Questions about tollbooth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I estimate the token count and cost of a prompt before sending it?

You can estimate prompt cost by calculating input and output token counts and projected dollar amounts across supported models. Use the command `tollbooth --tokens-only "Your prompt here"` to retrieve immediate token estimates before sending requests.

How do I compare prompt costs across different language models?

Prompt cost comparison across different language models is supported natively by this skill. It evaluates the same prompt against multiple models to display varying token counts and dollar costs, helping you identify the most budget efficient model for your specific request.

Can I use prompt cost estimation for automated budget management in agent workflows?

Yes, automated budgeting in Claude agent workflows is a core feature of this skill. It integrates directly into agent pipelines to provide real-time cost estimation, allowing you to manage and plan your AI budget automatically before prompts are dispatched.

What is the best way to plan an AI budget for multiple language model requests?

The best way to plan an AI budget is using prompt cost estimation to project dollar costs and token counts before execution. This skill provides manual CLI estimation and automated budgeting capabilities to optimize requests and manage spending across models.

Does the prompt cost estimator require any external dependencies to run?

No external dependencies are required to run this prompt cost estimator. The skill operates independently using its built-in scripts, allowing you to estimate token counts and dollar costs without installing additional software packages.