DeepSeekMeter AGENTS.md

DeepSeekMeter AGENTS.md is an instructions file for Codex, OpenCode from CWNU-Open-Source-Community/DeepSeekMeter. It costs 3,490 tokens per session, scanned A, original, MIT.

Repository instructions for DeepSeekMeter, a macOS menu-bar app that shows DeepSeek account balance, spending, token use, and daily trends. They also describe its iOS and Android folders and its build and test setup.

In plain words
What is it for?
Use them to navigate the project, run its self-tests and builds, validate mobile structure, and follow its release and documentation conventions.
Why use it?
They tell coding agents what the project does, which platforms and tools it supports, and which checks must pass after changes.

Instructions file for CodexOpenCode

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/cwnu-open-source-community/deepseekmeter/agents-md
Clone the repo
git clone --depth 1 https://github.com/CWNU-Open-Source-Community/DeepSeekMeter

Made for: Codex, OpenCode.

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 DeepSeekMeter AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cwnu-open-source-community/deepseekmeter/agents-md.svg)](https://agentmods.dev/instructions/cwnu-open-source-community/deepseekmeter/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/cwnu-open-source-community/deepseekmeter/agents-md"><img src="https://agentmods.dev/badge/instructions/cwnu-open-source-community/deepseekmeter/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,490 This file is loaded in full into every session.
When invoked 3,490 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.03490 $0.03490
Opus 5 $0.01745 $0.01745
Sonnet 5 $0.00698 $0.00698
Haiku 4.5 $0.00349 $0.00349

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

Security

Grade A, and why

DeepSeekMeter AGENTS.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.

AGENTS.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — DeepSeekMeter 仓库操作规范

This file is the operating manual for AI coding agents (Claude Code, Cursor, Codex, etc.). 开始在本仓库修改代码之前,请先完整阅读本文件,并严格遵守其中的规范与边界。

1. 项目是什么

DeepSeekMeter 是一个 macOS 菜单栏小工具(SwiftUI + AppKit):实时展示 DeepSeek 平台账户的余额、本月费用、Token 用量与按天趋势。

  • 工具链:Swift 6(swift-tools-version 6.0),Swift 5 语言模式(Package.swift 中显式设置)
  • 平台:macOS 14+(Apple Silicon / Intel 均可),仅 macOS,无 iOS/iPadOS
  • 移动端:iOS 版(ios/,M1–M5 代码完成,分发待账号)与 Android 版(android/,A4 完成,A5 规划中),总体方案见 MOBILE-PLAN.md
  • 构建:Swift Package Manager,无 Xcode 工程、无任何第三方依赖、单 target(仅指 macOS 包;iOS 工程在 ios/ 内,见第 8 节红线 13)
  • 测试:轻量自测(swiftc 直接编译运行,不依赖 XCTest
  • CI:GitHub Actions(push main / PR 触发,覆盖 macOS / Windows / iOS / Android);发布:打 v* 标签自动出 macOS DMG、Windows ZIP 和 Android APK Release
  • 用户文档:README.md(英文)+ README.zh-CN.md(中文),双语惯例

2. 常用命令(改动后必须本地验证)

swift run                        # 开发模式运行(无 .app 外壳)
swift build                      # debug 构建
swift build -c release           # release 构建
bash Scripts/run-tests.sh        # 运行自测(全绿才算通过)
bash Scripts/build-app.sh release # 组装 build/DeepSeekMeter.app 并签名
bash Scripts/install.sh          # 构建 + 安装到 /Applications 并启动

# iOS 版验证(核心包自测 + 工程结构静态校验必跑;有 Xcode 时还会构建 App 冒烟)
bash Scripts/run-ios-tests.sh
python3 Scripts/check-ios-project.py   # 单独跑工程结构校验(无 Xcode 环境的把关)

# 本机有 Xcode 后:一键跑 iOS 模拟器(构建 + 运行 + 截图),详见 docs/install-xcode-and-run.md
bash Scripts/run-ios-simulator.sh

# Android 核心单测(需 JDK 17 + Android SDK;JVM 直跑无需设备)
cd android && ./gradlew :core:test

CI 的验证链:swift buildswift build -c releaserun-tests.shbuild-app.sh release → 冒烟启动 6 秒。 任何改动都必须保证这条链全部通过。

注意:swift runBundle.main.bundleIdentifier 为 nil,开机自启注册会被跳过(SettingsStore 中已处理),这是预期行为,不是 Bug。

3. 仓库结构

Sources/DeepSeekMeter/
  AppMain.swift                  @main 入口;.accessory 激活策略(仅菜单栏,无 Dock 图标)
  AppDelegate.swift              生命周期组装:SettingsStore → AppModel → StatusItemController
  StatusItemController.swift     菜单栏 NSStatusItem + NSPopover 宿主(内容尺寸自适应)
  AppModel.swift                 状态中枢:@MainActor ObservableObject;轮询、拉取、错误状态
  PlatformService.swift          DeepSeek 平台私有接口客户端 + PlatformError
  Models.swift                   网络模型(Decodable)+ MonthUsage 聚合模型
  SettingsStore.swift            设置持久化(UserDefaults)+ 开机自启 + 旧钥匙串一次性迁移
  Formatting.swift               format() / currencySymbol() 等纯函数
  LoginWindowController.swift    内嵌官方登录页(WKWebView)+ Token 自动提取
  Views/
    PopoverView.swift            悬浮窗主界面(SwiftUI)
    SparklineView.swift          Token 按天用量柱状图
windows/                         Windows 版(.NET 8 + WPF,与 macOS 版功能对齐)
  src/DeepSeekMeter.Core/        纯逻辑库:Models / Formatting / PlatformService / SettingsStore
  src/DeepSeekMeter/             WPF 应用:MainViewModel / TrayIconController / PopoverWindow / LoginWindow 等
  tests/DeepSeekMeter.Selftest/  轻量自测(控制台,零测试框架)
  README.md                      Windows 英文说明(含与 macOS 版对应关系)
  README.zh-CN.md                Windows 中文说明
ios/                             iOS 版(开发中,详见 MOBILE-PLAN.md)
  DeepSeekMeterCore/             共享核心 Swift Package(PlatformService / Models / Formatting / TokenStoring / AppModel,零第三方依赖;AppModel 注入 TokenStoring+URLSession,可在 macOS 上自测)
  DeepSeekMeter.xcodeproj        iOS App 工程(SwiftUI,Xcode 16 同步文件夹格式)
  DeepSeekMeter/                 iOS App 源码(AppMain / TokenStore(Keychain) / Views/ / NotificationService / BackgroundRefreshService)
  DeepSeekMeterWidget/            WidgetKit 余额小组件(快照驱动;Token 不进 App Group 共享容器)
  DeepSeekMeterCore/Sources/DeepSeekMeterCoreSelftest/  核心轻量自测(swift run 直接跑,不依赖 XCTest)
android/                         Android 版(A4 已完成,A5 规划中,详见 MOBILE-PLAN.md 第 4 节)
  core/                          纯逻辑核心模块(Kotlin,零第三方业务依赖;org.json 手写映射)
  core/src/test/                 本地 JVM 单测(无需设备;org.json 测试期用官方 jar 替身)
Scripts/
  build-app.sh / install.sh / notarize.sh / publish-windows.ps1 / run-tests.sh / run-ios-tests.sh / make-icon.sh / generate-icon.swift
  Info.plist                     应用包信息(**版本号在这里改**)
  selftest/main.swift            轻量自测源码(swiftc 编译运行)
.github/workflows/
  ci.yml                         push main / PR:macOS、Windows、iOS、Android 构建与自测
  release.yml                    打 v* 标签:构建 macOS DMG、Windows ZIP、Android APK 并发布 GitHub Release

Read the full file on GitHub · 165 lines

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 · 165 lines · 3,490 tokens per session scan A ba9d69a80b03

Subscribe to this mod's changes

DeepSeekMeter AGENTS.md is an instructions file published in the GitHub repository CWNU-Open-Source-Community/DeepSeekMeter (12 stars, last pushed 18d ago), licensed MIT. It adds 3,490 tokens to every session, about $0.0175 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-30.