Agent skill

Usage

by alsk1992 in alsk1992/CloddsBot

Token usage tracking, cost estimation, and usage analytics. An agent skill from alsk1992/CloddsBot.

MITAuto-check passedData & Analytics

Install Usage

skills CLI
$ npx skills add alsk1992/CloddsBot --skill usage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alsk1992/CloddsBot usage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/bundled/usage .claude/skills/usage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
usage
GitHub stars
2.9k
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
136 words
Files
2
Skills in repo
118
Repo updated
First seen
Licence
MIT

At a glance

Token usage tracking, cost estimation, and usage analytics. An agent skill from alsk1992/CloddsBot.

  • Works in 5 steps: Monitor regularly — Check usage weekly → Set budgets — Prevent unexpected costs → Use appropriate models — Haiku for… → …
  • Tasks that involve Product analytics
  • SKILL.md covers Chat Commands, TypeScript API Reference, Model Pricing (per 1M tokens) and Footer Modes, plus 2 more sections
  • Runs TypeScript scripts from its folder

What it does

Usage is an agent skill from alsk1992/CloddsBot. Token usage tracking, cost estimation, and usage analytics

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `index.ts`).

It sits in Data & Analytics, covering Product analytics. The repository describes itself as: Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes… The licence is MIT.

When your agent uses it

  • Tasks that involve Product analytics

Example prompts

  • “/usage”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Monitor regularly — Check usage weekly
  2. Set budgets — Prevent unexpected costs
  3. Use appropriate models — Haiku for simple tasks
  4. Cache when possible — Reduce duplicate queries
  5. Review by user — Identify heavy users

What it can do on your machine

Read from SKILL.md and the folder at commit c930628. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Usage loads about 1.4k tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 136 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~16
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alsk1992/CloddsBot at commit c930628, republished under its MIT licence (© alsk1992). 136 words, ~1,352 tokens.

Download SKILL.mdSave it as .claude/skills/usage/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
usage
description
Token usage tracking, cost estimation, and usage analytics
emoji
📊

Usage - Complete API Reference

Track token usage, estimate costs, and analyze AI consumption across sessions and users.


Chat Commands

View Usage
/usage                                      Current session usage
/usage today                                Today's total usage
/usage week                                 This week's usage
/usage month                                This month's usage
Detailed Breakdown
/usage breakdown [today]                    Cost breakdown by model
/usage by-model                             Usage by AI model (alias)
/usage by-user                              Usage by user
/usage history [days]                       Historical usage (default 7 days)
/usage estimate <model> <in> <out>          Estimate cost for tokens
/usage user <id> [today]                    User-specific usage
Management
/usage reset                                Clear all usage data

TypeScript API Reference

Create Usage Service
typescript
import { createUsageService } from 'clodds/usage';

const usage = createUsageService({
  // Storage
  storage: 'sqlite',  // 'sqlite' | 'postgres' | 'memory'
  dbPath: './usage.db',

  // Pricing (per 1M tokens)
  pricing: {
    'claude-3-opus': { input: 15.00, output: 75.00 },
    'claude-3-sonnet': { input: 3.00, output: 15.00 },
    'claude-3-haiku': { input: 0.25, output: 1.25 },
    'gpt-4': { input: 30.00, output: 60.00 },
    'gpt-4o': { input: 5.00, output: 15.00 },
  },

  // Footer mode
  footerMode: 'tokens',  // 'off' | 'tokens' | 'full'
});
Record Usage
typescript
// Record a request
await usage.record({
  userId: 'user-123',
  sessionId: 'session-456',
  model: 'claude-3-sonnet',
  inputTokens: 1500,
  outputTokens: 800,
  durationMs: 2300,
  cached: false,
});
Get Session Usage
typescript
const session = await usage.getSessionUsage('session-456');

console.log(`Session: ${session.sessionId}`);
console.log(`Requests: ${session.requests}`);
console.log(`Input tokens: ${session.inputTokens.toLocaleString()}`);
console.log(`Output tokens: ${session.outputTokens.toLocaleString()}`);
console.log(`Total tokens: ${session.totalTokens.toLocaleString()}`);
console.log(`Est. cost: $${session.estimatedCost.toFixed(4)}`);
console.log(`Duration: ${session.totalDurationMs}ms`);
Get User Usage
typescript
const user = await usage.getUserUsage('user-123', {
  period: 'month',  // 'day' | 'week' | 'month' | 'all'
});

console.log(`User: ${user.userId}`);
console.log(`Sessions: ${user.sessions}`);
console.log(`Total tokens: ${user.totalTokens.toLocaleString()}`);
console.log(`Est. cost: $${user.estimatedCost.toFixed(2)}`);
Get Total Usage
typescript
const total = await usage.getTotalUsage({
  from: '2024-01-01',
  to: '2024-01-31',
});

console.log(`Total requests: ${total.requests}`);
console.log(`Total tokens: ${total.totalTokens.toLocaleString()}`);
console.log(`Total cost: $${total.estimatedCost.toFixed(2)}`);
Usage by Model
typescript
const byModel = await usage.getUsageByModel({
  period: 'month',
});

for (const [model, stats] of Object.entries(byModel)) {
  console.log(`${model}:`);
  console.log(`  Requests: ${stats.requests}`);
  console.log(`  Tokens: ${stats.totalTokens.toLocaleString()}`);
  console.log(`  Cost: $${stats.cost.toFixed(2)}`);
}
typescript
// Get formatted usage footer for messages
const footer = usage.formatFooter({
  inputTokens: 1500,
  outputTokens: 800,
  model: 'claude-3-sonnet',
});

// Output: "Tokens: 1.5k in / 800 out | Cost: ~$0.02"
Format Summary
typescript
// Get formatted summary
const summary = await usage.formatSummary({
  userId: 'user-123',
  period: 'today',
});

console.log(summary);
// "Today: 15 requests | 45k tokens | ~$0.85"
Estimate Cost
typescript
// Estimate cost for a request
const cost = usage.estimateCost({
  model: 'claude-3-opus',
  inputTokens: 5000,
  outputTokens: 2000,
});

console.log(`Estimated cost: $${cost.toFixed(4)}`);

Model Pricing (per 1M tokens)

ModelInputOutput
claude-3-opus$15.00$75.00
claude-3-sonnet$3.00$15.00
claude-3-haiku$0.25$1.25
gpt-4$30.00$60.00
gpt-4o$5.00$15.00
gpt-4o-mini$0.15$0.60

ModeOutput
offNo usage shown
tokensTokens: 1.5k in / 800 out
full`Tokens: 1.5k in / 800 out

Budget Alerts

typescript
// Set monthly budget
usage.setBudget({
  userId: 'user-123',
  monthly: 50.00,  // $50/month
  alertAt: [0.5, 0.8, 0.95],  // Alert at 50%, 80%, 95%
});

// Check budget status
const budget = await usage.checkBudget('user-123');

console.log(`Budget: $${budget.limit}`);
console.log(`Used: $${budget.used.toFixed(2)} (${budget.percent}%)`);
console.log(`Remaining: $${budget.remaining.toFixed(2)}`);

Best Practices

  1. Monitor regularly — Check usage weekly
  2. Set budgets — Prevent unexpected costs
  3. Use appropriate models — Haiku for simple tasks
  4. Cache when possible — Reduce duplicate queries
  5. Review by user — Identify heavy users

© alsk1992, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in src/skills/bundled/usage of alsk1992/CloddsBot.

  • SKILL.md
  • index.ts

Open the folder on GitHubat commit c930628

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in alsk1992/CloddsBot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Usage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Usage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Usage this skillalsk1992/CloddsBot2.9k1 repos~1.4kAutomated safety check: PassMIT
PostHog CLI Queriesdebugtheworldbot/keyStats1.5k—~1.2kAutomated safety check: PassMIT
Retentioneering Contributingretentioneering/retentioneering-tools920—~1.8kAutomated safety check: PassApache-2.0
Retentioneering Product Analyticsretentioneering/retentioneering-tools920—~1.6kAutomated safety check: PassApache-2.0
Retention Analysisliangdabiao/claude-data-analysis-ultra-main2901 repos~1.3kAutomated safety check: NotesNone
Feature Analytics Instrumentation Plannermistralai/mistral-vibe5.1k—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • PostHog CLI Queries

    debugtheworldbot/keyStats

    Runs HogQL queries against this project's PostHog data from the terminal using posthog-cli, with bundled scripts for dashboard metadata the CLI itself has no command for.

    1.5k GitHub stars~1.2k tokensUpdated 4 days ago
    Data & AnalyticsAuto-check passed
  • Retentioneering Contributing

    retentioneering/retentioneering-tools

    Help the user turn their Retentioneering ideas, friction reports, bug findings, or feature needs into high-quality upstream contributions: from capturing and validating the idea, through minimal…

    920 GitHub stars~1.8k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Retentioneering Product Analytics

    retentioneering/retentioneering-tools

    Analyze event logs, clickstreams, user paths, product funnels, retention, behavioral segments, transition graphs, step matrices, sequence patterns, and customer journeys using Retentioneering.

    920 GitHub stars~1.6k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Retention Analysis

    liangdabiao/claude-data-analysis-ultra-main

    Analyze user retention and churn using survival analysis, cohort analysis, and machine learning.

    290 GitHub starsUsed in 1 repo~1.3k tokens
    Data & AnalyticsAuto-check: notes
  • Official

    Plans which analytics events and properties a new feature needs, checks them against the existing event registry, and verifies them per environment.

    5.1k GitHub stars~2.2k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Funnel Analysis

    liangdabiao/claude-data-analysis-ultra-main

    Analyze user conversion funnels, calculate step-by-step conversion rates, create interactive visualizations, and identify optimization opportunities.

    290 GitHub starsUsed in 2 repos~781 tokens
    Data & AnalyticsAuto-check: notes

More from alsk1992/CloddsBot

All 118 skills in this repo
  • Qmd

    alsk1992/CloddsBot

    Local hybrid search for markdown notes and docs. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed
  • Drift SDK

    alsk1992/CloddsBot

    Drift Protocol perpetual futures trading on Solana (direct SDK)

    2.9k GitHub starsUsed in 1 repo~625 tokens
    Auto-check passed
  • Edge

    alsk1992/CloddsBot

    Find mispriced markets by comparing to external models and data sources

    2.9k GitHub starsUsed in 1 repo~472 tokens
    Auto-check passed
  • Embeddings

    alsk1992/CloddsBot

    Vector embeddings configuration and semantic search. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • News

    alsk1992/CloddsBot

    Monitor news and correlate with prediction market movements. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 1 repo~462 tokens
    Auto-check passed
  • Opportunity

    alsk1992/CloddsBot

    Find and execute cross-platform arbitrage opportunities across prediction markets

    2.9k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Usage

What does Usage do?

Token usage tracking, cost estimation, and usage analytics. An agent skill from alsk1992/CloddsBot. Usage is an agent skill from alsk1992/CloddsBot.

When should I use Usage?

Usage fits situations like: tasks that involve Product analytics.

How do I install Usage in Claude Code?

Run `npx skills add alsk1992/CloddsBot --skill usage -a claude-code`. Or copy the skill folder (src/skills/bundled/usage in alsk1992/CloddsBot) into .claude/skills/usage in your project. Claude Code loads it when a task matches its description.

How do I install Usage in Codex?

Run `npx skills add alsk1992/CloddsBot --skill usage -a codex`. Or copy the skill folder (src/skills/bundled/usage in alsk1992/CloddsBot) into .agents/skills/usage in your project. Codex loads it when a task matches its description.

Can I use Usage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alsk1992/CloddsBot --skill usage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/usage, .gemini/skills/usage, .github/skills/usage and .opencode/skills/usage in your project.

What does Usage need to run?

Going by SKILL.md and its folder, Usage needs TypeScript for the scripts in its folder. Our summary lists: Node.js.

Does Usage access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Usage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Usage use?

Usage is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Usage use?

About 1.4k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Usage?

Skills that share tags, products or a category with Usage: PostHog CLI Queries (debugtheworldbot/keyStats, 1.5k stars), Retentioneering Contributing (retentioneering/retentioneering-tools, 920 stars), Retentioneering Product Analytics (retentioneering/retentioneering-tools, 920 stars) and Retention Analysis (liangdabiao/claude-data-analysis-ultra-main, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Usage?

alsk1992 (a GitHub user) maintains it in alsk1992/CloddsBot, which has 2,901 GitHub stars. The repository holds 118 skills in this directory. The repository was last updated on October 2, 2026.

Source: alsk1992/CloddsBot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.