usage
Use when a CTO or lead asks how much its lanes are spending, which session is burning quota, whether a lane tripped the token tripwire, or where the provider quota meters stand. Reads the installed token-usage counts (turns/h, cached tokens/h, average context per turn for each session; per-project/model totals; quota meters) and the tripwire's open incidents. Counts only; never message content. Does not install anything or change thresholds.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-03
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- usage
- description
- Use when a CTO or lead asks how much its lanes are spending, which session is burning quota, whether a lane tripped the token tripwire, or where the provider quota meters stand. Reads the installed token-usage counts (turns/h, cached tokens/h, average context per turn for each session; per-project/model totals; quota meters) and the tripwire's open incidents. Counts only; never message content. Does not install anything or change thresholds.
02 资源文件 2
- 脚本scripts/test-usage.sh2.7 KB
- 脚本scripts/usage.sh3.8 KB
03 SKILL.md 正文
Usage
Answer "what are my lanes spending?" from the counts the token tripwire
already keeps. The numbers come from the token-usage and token-tripwire
CLIs that dotfiles installs (scripts/usage); this skill only calls them.
Run
~/.claude/skills/usage/scripts/usage.sh [--project NAME] [--day YYYY-MM-DD] [--fresh] [--json]
--project NAMElimits the session view to one project: the first path segment under the projects root, the same name the tripwire's ownership table uses.--daygives that local day's per-project and per-model totals (default today).--freshscans rollouts and transcripts first. Without it the script reads the store as the last scan left it: every 10 minutes where the token-tripwire cron row is enabled, otherwise whenever something last rantoken-usage. The output always says how old the store is, and warns past 20 minutes. A stale store means the numbers are old, not that no lane is running: rerun with--freshbefore concluding anything.--jsonemits one JSON object (sessions,totals_project,totals_model,meters,incidents, plusstore_age_minutesandstale_note) for further processing.
Read the answer
- Sessions (last 60 minutes): turns/h, cached tokens/h and average context per turn. The tripwire's default lines are 300 turns/h, 60M cached tokens/h and 100k average context sustained for 30 minutes; the configured values may differ.
- Meters are account-wide quota windows with the time they were observed. A meter observed long ago is a snapshot, not the present.
- Incidents are the tripwire's open alerts and their delivery state.
When a lane is over the line, the doctrine's answer is the task-boundary
ritual: compact at a checkpoint, a fresh worker with a small brief, or stop
the loop. Report the numbers with their observation time and say which of
those you recommend; do not restate counts as costs without a fitted weight
(token-calibrate report says whether one is defensible yet).
Failure
If the script reports that token-usage is not installed, say so and stop:
installing it is the host's dotfiles installer's job, not this skill's. A
missing config means the tripwire alerts nobody; report that as a finding.
04 同仓库更多 Skills
where
Use before any find, rg, grep or Glob over a repo or a directory you do not already have an exact path for. Prints a small map of the current project (root, worktrees, depth-2 tree with sizes, the repo's own "Project structure" notes) so you search the worktree you own with a path instead of enumerating ~, ~/Projects, /, /nix or /tmp.
stacked-prs
Detailed workflow for managing stacked PRs. Use when rebasing a PR stack, resolving merge conflicts in a stack, merging stacked PRs, or when user mentions "stack" and "PR" together.
spawn-agent
Spawn AI agents in steerable tmux windows for parallel or long-running work, including transcript-preserving Codex session forks with step-scoped compaction and structured final-recap handoffs. Use to spawn interactive agents, steer running tmux agents, or fork a Codex session for a separate step.
retire-agent
Preserve a private, resumable agent handoff and verify a polite exit, or transfer the handoff to a freshly spawned successor.
lean-automation
Diagnose and prevent CI/deploy latency caused by automation inheriting a human's environment. Use when CI or a deploy feels slow, when auditing a repo's pipeline, when adding a dependency to a shared dev environment (flake devShell, base image, requirements file), or when writing a guard that is supposed to keep an environment lean.
issue-tracking
Use when agents create, select, update, comment on, close, or sync ditz issues, especially across worktrees or after uncertain or partial command results. Establish the intended tracker and use the existing CLI safely. Also use when a repo's beads/ditz instructions conflict; resolve the tracker before writing. Does not initialize trackers or migrate beads.