modscode / Gallery / taxi-meter
taxi-meter
A taxi meter in the status line: the session's cost ticks up live as tokens burn.
What it does
- Draws a pane, toasts
- Adds /taxi
- Watches tool calls
- Hooks session.end, session.measure, session.start, turn.complete and 3 more
- Keeps its own state between turns
Good points
- No network calls
- Starts no processes
- Written in TypeScript
- Speaks more than one language
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like taxi-meter by gxc.510 (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/gxcsoccer-taxi-meter/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "๐ Meter" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const text = 'โฆ'
const brand = 'โฆ'
const row = 'โฆ'
const row2 = 'โฆ'
const row3 = 'โฆ'
const last = 'โฆ'
const money = 'โฆ'
const flash = 'โฆ'
const time = 'โฆ'
const duration = 'โฆ'
const rate = 'โฆ'
const tool = 'โฆ'
const pct = 'โฆ'
const moneyUsd = 'โฆ'
const payback = 'โฆ'
const moneyUsd2 = 'โฆ'
const spend = 'โฆ'
const sparkline = 'โฆ'
const recent = 'โฆ'
const none = 'โฆ'
const moneyUsd3 = 'โฆ'
const prompt = 'โฆ'
const moneyUsd4 = 'โฆ'
const prompt2 = 'โฆ'
const moneyUsd5 = 'โฆ'
const prompt3 = 'โฆ'
const receipt = 'โฆ'
const currency = 'โฆ'
const addBudget = 'โฆ'
const clearBudget = 'โฆ'
const show = 'โฆ'
const close = 'โฆ'
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Text bold>
{text}
</Text>
<Text dimColor>
{brand}
</Text>
</Box>
<Box flexDirection="column" marginY={1}>
<Text bold>
{row}
</Text>
<Text bold>
{row2}
</Text>
<Text bold>
{row3}
</Text>
</Box>
<Text>
{`${last} ${money}`}
{` โฒ${flash}`}
</Text>
<Text dimColor>
{time}
{" "}
{duration}
{` ยท ${rate} ${money}/min`}
{` ยท ${tool}`}
</Text>
<Text>
<Text color="red">
budget
{" "}
โโโโโโโโ
โโโโโโโโ
{" "}
{pct}
{"% / "}
{moneyUsd}
</Text>
</Text>
<Text>
<Text dimColor>
{payback}
{" "}
</Text>
<Text color="cyan" bold>
{"๐ "}
0
</Text>
<Text dimColor>
{" "}
{moneyUsd2}
{" / "}
0
</Text>
</Text>
<Text>
<Text dimColor>
{spend}
{" "}
</Text>
<Text color="#f5c518">
{sparkline}
</Text>
</Text>
<Box flexDirection="column" marginTop={1}>
<Text bold>
{recent}
</Text>
<Text dimColor>
{none}
</Text>
<Text wrap="truncate-end">
{moneyUsd3}
{" "}
{prompt}
</Text>
<Text wrap="truncate-end">
{moneyUsd4}
{" "}
{prompt2}
</Text>
<Text wrap="truncate-end">
{moneyUsd5}
{" "}
{prompt3}
</Text>
</Box>
<Box flexDirection="row" flexWrap="wrap" marginTop={1} gap={1}>
<Button hotkey="r" label={`${receipt}`} />
<Button hotkey="c" label={`${currency}`} />
<Button hotkey="b" label={`${addBudget}`} />
<Button hotkey="n" label={`${clearBudget}`} />
<Button hotkey="h" label={`${show}`} />
<Button role="dismiss" label={`${close}`} />
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
await $.ui.toast(`๐ ๆฃๆตๅฐไฝ ๅจ็จ่ฎข้
๏ผ/taxi plan 200๏ผๅกซไฝ ็ๆ่ดน๏ผๅฐฑ่ฝ็ๅฐๆฌๆๅๆฌไบๅ ๅ`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
hooks/register.tsx lines 806โ921 ยท Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const w = PANE_WORDS[cfg.lang]
const now = await read($, live)
const limit = await read($, budget)
const hidden = await read($, isHidden)
const rides = await read($, trips)
const points = await read($, history)
const cols = Math.max(20, e.props.bodyColumns)
const fare = money(now.units, cfg.currency)
const digits = bigDigits(fare)
const isBig = digits !== null && digits[0]!.length <= cols
const pct = budgetPct({ units: now.units, budget: limit > 0 ? units(limit) : null })
const lamp =
now.phase === 'idle'
? { text: cfg.lang === 'zh' ? '็ฉบ่ฝฆ' : 'FOR HIRE', color: 'green' }
: now.phase === 'waiting'
? { text: cfg.lang === 'zh' ? '็ญๅ โณ' : 'WAITING โณ', color: 'yellow' }
: { text: `${cfg.lang === 'zh' ? '่ฝฝๅฎข' : 'HIRED'} ${now.isLit ? 'โ' : 'โ'}`, color: 'red' }
const drumColor = pct !== null && pct >= 100 ? 'red' : '#f5c518'
const barWidth = Math.max(8, Math.min(30, cols - 24))
const filled = pct === null ? 0 : Math.min(barWidth, Math.round((pct / 100) * barWidth))
const spend = spendBuckets(points, await $.clock.now(), Math.max(10, Math.min(30, cols - 16)), 60000)
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Text bold color={lamp.color}>
{lamp.text}
</Text>
<Text dimColor>{w.brand}</Text>
</Box>
{isBig ? (
<Box flexDirection="column" marginY={1}>
{digits.map(row => (
<Text color={drumColor} bold>
{row}
</Text>
))}
</Box>
) : (
<Text color={drumColor} bold>
{fare}
</Text>
)}
<Text>
{now.trip !== null && now.trip > 0
? `${now.phase === 'idle' ? w.last : w.ride} ${money(now.trip, cfg.currency)}`
: ' '}
{now.flash > 0 ? ` โฒ${(now.flash / 100).toFixed(2)}` : ''}
</Text>
{now.phase !== 'idle' && (
<Text dimColor>
{w.time} {duration(now.rideMs)}
{now.rate >= 1 ? ` ยท ${w.rate} ${money(Math.round(now.rate), cfg.currency)}/min` : ''}
{now.tool ? ` ยท ${now.tool}` : ''}
</Text>
)}
<Text>
{pct === null ? (
<Text dimColor>{w.noBudget}</Text>
) : (
<Text color={pct >= 100 ? 'red' : pct >= 80 ? 'yellow' : 'green'}>
{w.budget} {'โ'.repeat(filled)}
{'โ'.repeat(barWidth - filled)} {pct}% / {moneyUsd(limit, cfg.currency, cfg.cnyRate)}
</Text>
)}
</Text>
{cfg.planUsd > 0 && (
<Text>
<Text dimColor>{w.payback} </Text>
<Text color="cyan" bold>
๐ {paybackText(payback() ?? 0, cfg.lang)}
</Text>
<Text dimColor>
{' '}
{moneyUsd(m.monthUsd, cfg.currency, cfg.cnyRate)} / {moneyUsd(cfg.planUsd, cfg.currency, cfg.cnyRate)}
</Text>
</Text>
)}
<Text>
<Text dimColor>{w.spend} </Text>
<Text color="#f5c518">{sparkline(spend)}</Text>
</Text>
<Box flexDirection="column" marginTop={1}>
<Text bold>{w.recent}</Text>
{rides.length === 0 && <Text dimColor>{w.none}</Text>}
{rides
.slice(-4)
.reverse()
.map(t => (
<Text wrap="truncate-end">
{moneyUsd(t.fare, cfg.currency, cfg.cnyRate).padStart(8)} {t.prompt}
</Text>
))}
</Box>
<Box flexDirection="row" flexWrap="wrap" marginTop={1} gap={1}>
<Button key="receipt" hotkey="r" label={w.receipt} onPress={() => $.command.run({ command: 'taxi' })} />
<Button
key="currency"
hotkey="c"
label={w.currency}
onPress={() =>
$.config.set({ key: 'taxi-meter.currency', value: cfg.currency === 'USD' ? 'CNY' : 'USD' })
}
/>
<Button key="budget" hotkey="b" label={w.addBudget} onPress={() => setBudget($, Math.max(0, limit) + 5)} />
{limit > 0 && <Button key="nobudget" hotkey="n" label={w.clearBudget} onPress={() => setBudget($, 0)} />}
<Button key="hide" hotkey="h" label={hidden ? w.show : w.hide} onPress={() => setHidden($, !hidden)} />
<Button key="close" role="dismiss" label={w.close} onPress={() => $.ui.close({ id: PANE })} />
</Box>
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 gxcsoccer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
tool callsremembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit 344aa451b9da on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.2 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/โฆ do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches no network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add gxcsoccer/claude-taxi-meter/plugin install taxi-meter@claude-taxi-meterThis installs the marketplace's latest commit, which may not be the one read here (344aa451b9da). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "gxcsoccer-taxi-meter" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claudeโฆ2h 10m ยท โโโโโโโโโ build โ build โ buildJavaKotlin3 Pythonโ ok 3 โ ok 3 โ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases โโโโโโโโ 3/3build Pythonbuild Pythonbuild Pythonโฆ 3 more phasesLua โโโโโโโโ 3/Kotlinโ the whole upgrade Rubyโ build build Rubyโ build build Rubyโ build build Ruby โฆ 3 moreNext โโโโโโโโ PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention โโโโโโโโ 3! Scala ! Scala ! Scala โฆ 3 moreSession โโโโโโโโ okJava
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Ask Claudeโฆ
-
Ask ClaudeโฆTodayOct 63 left ยท Mar overdueRemCTL: Sepโ All done for today.โ build3โ Fix login โ โJul ยท buildโโ Fix login โ โJul ยท buildโโ Fix login โ โJul ยท buildโโ build3โ Fix login โ โJul ยท buildโโ Fix login โ โJul ยท buildโโ Fix login โ โJul ยท buildโโ build3โ Fix login โ โJul ยท buildโโ Fix login โ โJul ยท buildโโ Fix login โ โJul ยท buildโUpdated 14:32UndoRefresh
-
Ask ClaudeโฆTO graphโบ Fix login โบ Fix login โบ Fix loginScopeThis featureWhole projectHide done stepsReconnect
-
Ask ClaudeโฆReplay TheaterStep Prev1/3 write Next[31][31][31]Prev pNext nClose qโโโโโโโโโ Prevโ Prevโ Prev
-
Ask Claudeโฆgreat_cto: 3 gate waiting โ /gatesGatesmy-app ยท 3 waiting ยท checked Gates UTCGates โ Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approveGates โ Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approveGates โ Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approve