sing-box-windows-android: Instructions file for Claude Code

CLAUDE.md

sing-box-windows-android CLAUDE.md is an instructions file for Claude Code from xinggaoya/sing-box-windows-android. It costs 1,922 tokens per session, scanned A, original, MIT.

Project instructions for a Kotlin and Jetpack Compose Android VPN application built around the sing-box network engine. They describe the app’s features, architecture, build commands, and supported APK processor architectures.

In plain words
What is it for?
Use them when developing or building the Android app, creating debug or release APKs, installing a debug build, or locating VPN, engine, monitoring, and API-related code.
Why use it?
They give an AI coding agent the repository context needed to build, install, lint, and understand the app safely. They also identify the main components for VPN control, configuration storage, monitoring, and API diagnostics.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is xinggaoya/sing-box-windows-android's own configuration. It tells Claude Code how to work on sing-box-windows-android itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sing-box-windows-android configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/xinggaoya/sing-box-windows-android/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/xinggaoya/sing-box-windows-android

Made for: Claude Code.

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 sing-box-windows-android CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xinggaoya/sing-box-windows-android/claude-md/github.svg)](https://agentmods.dev/instructions/xinggaoya/sing-box-windows-android/claude-md)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sing-box-windows-android CLAUDE.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,922 This file is loaded in full into every session.
When invoked 1,922 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01922 $0.01922
Opus 5.5 $0.00769 $0.00769
Sonnet 5.5 $0.00384 $0.00384
Haiku 4.5 $0.00192 $0.00192

Measured 8d ago against content hash 250796d23e2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 8d 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.

CLAUDE.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 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

架构概览

核心架构模式

应用采用 Clean Architecture + MVI 模式:

  1. 领域层 (v2/domain): 只定义能力接口与领域模型,不含任何 Android / libbox 类型
  2. 数据层 (v2/data): 全部实现(内核命令层、配置仓储、订阅仓储)
  3. 功能层 (v2/feature): 页面 + MVI ViewModel,仅依赖领域接口
  4. MVI 基座 (v2/core/arch): 统一 Intent / State / Effect 数据流, Intent 通过 Channel 串行消费,避免并发交错导致的重复提交

依赖方向单向:feature → domain ← data。

关键组件

1. VPN 服务层 (vpn/) — 系统边界
  • AppVpnService: Android VpnService 实现,负责 VPN 接口建立与生命周期
  • VpnStateStore: 全局 VPN 状态单例 (IDLE/CONNECTING/CONNECTED/ERROR)
  • VpnController: 控制 VPN 服务的启动/停止
  • PlatformInterfaceBridge: 实现 libbox 1.14 的 PlatformInterface; Shell / SSH / Bridge / Tailscale 等平台专属能力在 Android 上显式返回「不支持」
2. 内核命令层 (v2/data/core) — ★ 核心
  • LibboxBootstrap: libbox 全局引导(SetupOptions,含 commandServerListenPort = 0)
  • SingBoxEngine: 由 CommandServer 托管内核实例(1.11 起 libbox 不再暴露独立 BoxService)
  • DefaultCoreGateway: 基于 CommandClient 的 CoreGateway 实现, 内含 CommandClientHandler 回调转接
  • CoreCommandBridge: 进程级单例,供 DI 容器与 VPN 服务共享同一条命令通道
  • CoreRuntimeCoordinator: 配置准备 + 命令通道生命周期编排
  • CoreInfoStore: 内核版本(直接读 Libbox.version())
3. 配置层 (v2/data/config)

领域模型已下沉到 v2/domain:AppSettings → v2/domain/settings, 订阅模型 → v2/domain/subscription,VpnState → v2/domain/runtime, 更新模型 → v2/domain/update。

  • ConfigRepository: sing-box JSON 配置的加载、保存和迁移
  • ConfigSettingsApplier: 将用户设置应用到配置 JSON
  • ConfigDefaults: 默认配置模板
  • SubscriptionRepository: 订阅列表 CRUD,支持远程订阅与本地节点导入
  • ClashConverter: Clash YAML 配置转换为 sing-box JSON
  • SettingsRepository/AppSettings: 用户设置持久化

Read the full file on GitHub · 168 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. 8d ago Changed · +28 lines · +631 tokens per session 250796d23e2b
  2. 2mo ago First seen · 140 lines · 1,291 tokens per session scan A f032f3e30021

Subscribe to this mod's changes

sing-box-windows-android CLAUDE.md is an instructions file published in the GitHub repository xinggaoya/sing-box-windows-android (56 stars, last pushed 7d ago), licensed MIT. It adds 1,922 tokens to every session, about $0.0077 per session on Opus 5.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.

Related

sing-box-windows-android CLAUDE.md compared with instructions from other repositories

sing-box-windows-android CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sing-box-windows-android CLAUDE.mdxinggaoya/sing-box-windows-androidInstructions file567d agoMITA1,922Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode