Settings

Theme

Show HN: Claude Skill for temporary cost tracking

github.com

2 points by jbdamask 3 months ago · 1 comment · 1 min read

Reader

Here's a Claude Skill that lets me turn cost tracking on an off for a particular unit of work.

I use it in interactive Claude Code sessions. For example, if I want to add a Claude API feature to an app, I'll often hack it together first in CC. This skill lets me start and stop tracking so I get get a sense for what the API costs will be.

For example:

> /cost-tracking > [do stuff] > stop tracking

Then I get a nice little table showing tokens and cost for the model that was used:

Haiku cost report (this session's work):

  ┌───────────────────┬───────────┬─────────┐
  │     Category      │  Tokens   │  Cost   │
  ├───────────────────┼───────────┼─────────┤
  │ Base input        │ 182       │ $0.0002 │
  ├───────────────────┼───────────┼─────────┤
  │ Output            │ 3,276     │ $0.0164 │
  ├───────────────────┼───────────┼─────────┤
  │ Cache writes (1h) │ 25,619    │ $0.0512 │
  ├───────────────────┼───────────┼─────────┤
  │ Cache reads       │ 1,585,531 │ $0.1586 │
  ├───────────────────┼───────────┼─────────┤
  │ Grand Total       │           │ $0.2264 │
  └───────────────────┴───────────┴─────────┘

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection