tokenmeter copilot-instructions.md

tokenmeter copilot-instructions.md is an instructions file for GitHub Copilot from Priyans-hu/tokenmeter. It costs 252 tokens per session, scanned A, original, MIT.

A set of coding instructions for TokenMeter, a macOS menu-bar app that tracks Claude Code use, limits, and costs. It documents the app’s Swift, SwiftUI, and Swift Package Manager setup.

In plain words
What is it for?
Use it when building, testing, or changing TokenMeter, including its menu-bar interface, usage data parsing, API access, and concurrency code.
Why use it?
It gives an coding agent the project’s structure, tools, and coding conventions so its changes fit the existing app.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/priyans-hu/tokenmeter/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/Priyans-hu/tokenmeter

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tokenmeter copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/priyans-hu/tokenmeter/copilot-instructions.svg)](https://agentmods.dev/instructions/priyans-hu/tokenmeter/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/priyans-hu/tokenmeter/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/priyans-hu/tokenmeter/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 252 This file is loaded in full into every session.
When invoked 252 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00252 $0.00252
Opus 5 $0.00126 $0.00126
Sonnet 5 $0.00050 $0.00050
Haiku 4.5 $0.00025 $0.00025

Measured 4d ago against content hash e1a71d68c05a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tokenmeter copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/copilot-instructions.md · 24 lines

What it actually says

TokenMeter — Copilot Instructions

macOS menu bar app for tracking Claude Code usage, rate limits, and costs.

Tech Stack

  • Swift 5.9+, SwiftUI, macOS 14+ (Sonoma)
  • Swift Package Manager — cd TokenMeter && swift build -c release
  • Swift Concurrency — async/await, actors, @MainActor

Architecture

  • TokenMeterApp.swift — MenuBarExtra app entry point
  • UsageViewModel.swift — @MainActor ObservableObject for all state
  • Services/NativeUsageParser.swift — parses JSONL from ~/.claude/projects/
  • Services/UsageAPIService.swift — actor, reads Keychain OAuth token, calls Anthropic API
  • Models/UsageSummary.swift — data models (DailyUsage, HourlyUsage, RateLimitInfo, ClaudePlan)
  • Views/ — SwiftUI views

Conventions

  • UsageAPIService is an actor for thread safety
  • UsageViewModel is @MainActor for UI updates
  • Concurrent data fetching with async let
  • No Xcode project — SPM only
  • macOS 14+ minimum deployment target
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 24 lines · 252 tokens per session scan A e1a71d68c05a

Subscribe to this mod's changes

tokenmeter copilot-instructions.md is an instructions file published in the GitHub repository Priyans-hu/tokenmeter (5 stars, last pushed 5mo ago), licensed MIT. It adds 252 tokens to every session, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

FluidAudio copilot-instructions.md

Copilot instructions for FluidInference/FluidAudio, covering fluidaudio - agent development guide, build & test commands, architecture, critical rules and code style (swift-format config).

FluidInference/FluidAudio · 552 tokens

speech-swift AGENTS.md

AGENTS.md instructions for soniqo/speech-swift, covering agent instructions, communication style, workflow, running tests and benchmarks — sequential and memory-aware and git conventions.

soniqo/speech-swift · 5,053 tokens

codex-provider-sync AGENTS.md

Instructions for Dailin521/codex-provider-sync, covering ai / agent operator guide, vnext architecture baseline, goal, choose the interface and safe operating flow.

Dailin521/codex-provider-sync · 1,480 tokens

liney AGENTS.md

AGENTS.md instructions for everettjf/liney, covering liney repository collaboration guide, 交流语言 / communication language, project overview, repository layout and build and test.

everettjf/liney · 1,589 tokens

Starcat AGENTS.md

AGENTS.md instructions for starcat-app/Starcat, covering agents.md, 🚨 硬性铁律(每次写代码前必读,违反即返工), 🌿 git 分支与 worktree(强制), 🧭 主进度索引(每次开工前必读) and 状态符号(与功能实现总览.md 同步).

starcat-app/Starcat · 7,439 tokens

skills-manager CLAUDE.md

Instructions for yibie/skills-manager, covering skills manager - development guide, tui engine: blessed, 核心原则, 参考文档 and 正确的 list 用法.

yibie/skills-manager · 642 tokens