Borrowing it
Nothing to install: this file belongs to xinggaoya/sing-box-windows-android. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/xinggaoya/sing-box-windows-android/master/CLAUDE.mdgit clone --depth 1 https://github.com/xinggaoya/sing-box-windows-androidWrote 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.
[](https://agentmods.dev/instructions/xinggaoya/sing-box-windows-android/claude-md)<a href="https://agentmods.dev/instructions/xinggaoya/sing-box-windows-android/claude-md"><img src="https://agentmods.dev/badge/instructions/xinggaoya/sing-box-windows-android/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01291 | $0.01291 |
| Opus 5 | $0.00646 | $0.00646 |
| Sonnet 5 | $0.00258 | $0.00258 |
| Haiku 4.5 | $0.00129 | $0.00129 |
Grade A, and why
sing-box-windows-android CLAUDE.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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
项目概述
这是一个基于 sing-box 核心的 Android VPN 客户端应用,使用 Kotlin 和 Jetpack Compose (Material 3) 构建。应用支持订阅管理、节点选择、流量监控和 Clash API 诊断等功能。
构建命令
# 构建 Debug 版本
./gradlew assembleDebug
# 构建 Release 版本
./gradlew assembleRelease
# 安装到连接的设备
./gradlew installDebug
# 按架构构建特定 APK (splits.abi 配置)
./gradlew assembleRelease # 会生成 arm64-v8a, armeabi-v7a, x86, x86_64 四个独立 APK
架构概览
核心架构模式
应用采用 单例状态管理 + Compose 响应式 UI 模式:
- Store 模式: 全局状态使用单例对象 +
mutableStateOf管理,Compose UI 自动订阅变化 - Repository 模式: 配置和订阅数据通过 Repository 对象持久化到本地文件
- Manager 模式: 核心功能通过 Manager 单例协调(如 OutboundGroupManager、CoreStatusManager)
关键组件
1. VPN 服务层 (vpn/)
AppVpnService: Android VpnService 实现,负责 VPN 接口的建立和管理VpnStateStore: 全局 VPN 状态单例 (IDLE/CONNECTING/CONNECTED/ERROR)VpnController: 控制 VPN 服务的启动/停止PlatformInterfaceBridge: 连接 libbox 与 Android VPN 的桥梁
2. 核心引擎层 (core/)
SingBoxEngine: sing-box 核心生命周期管理,负责启动/停止 libbox 服务LibboxManager: libbox 库的初始化和管理CoreStatusManager/CoreStatusStore: 核心状态(内存、连接数、流量)监控CoreInfoManager/CoreInfoStore: 核心版本等信息管理OutboundGroupManager: 节点分组管理,通过 Clash API 获取和操作节点ClashApiClient: Clash API 客户端,与 sing-box 的 REST API 通信ClashApiStreamManager/ClashApiDiagnosticsManager: Clash API 流量和诊断数据管理
3. 配置层 (config/)
ConfigRepository: sing-box JSON 配置的加载、保存和迁移ConfigSettingsApplier: 将用户设置应用到配置 JSONConfigDefaults: 默认配置模板SubscriptionRepository: 订阅列表的 CRUD 操作,支持远程订阅和本地节点导入ClashConverter: Clash YAML 配置转换为 sing-box JSONSettingsRepository/AppSettings: 用户设置的持久化
4. UI 层 (ui/)
AppNavigation: 底部导航栏和 NavHost 路由screens/: 各功能页面 (HomeScreen, NodesScreen, SubscriptionScreen, SettingsScreen, DiagnosticsScreen)components/: 可复用的 UI 组件theme/: Material 3 主题和颜色定义
5. 主入口 (MainActivity.kt)
- Activity 作为状态管理中心,聚合所有 Store 的状态
- 使用
LaunchedEffect处理初始化和副作用 - 通过 AppNavigation 将所有回调和状态传递给子页面
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.
- 6d ago First seen · 140 lines · 1,291 tokens per session scan A f032f3e30021
sing-box-windows-android CLAUDE.md is an instructions file published in the GitHub repository xinggaoya/sing-box-windows-android (56 stars, last pushed 6mo ago), licensed MIT. It adds 1,291 tokens to every session, about $0.0065 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.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.