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,291 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,291 This file is loaded in full into every session.
When invoked 1,291 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.1 $0.01291 $0.01291
Opus 5 $0.00646 $0.00646
Sonnet 5 $0.00258 $0.00258
Haiku 4.5 $0.00129 $0.00129

Measured 6d ago against content hash f032f3e30021, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 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.

CLAUDE.md · 140 lines

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 模式:

  1. Store 模式: 全局状态使用单例对象 + mutableStateOf 管理,Compose UI 自动订阅变化
  2. Repository 模式: 配置和订阅数据通过 Repository 对象持久化到本地文件
  3. 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: 将用户设置应用到配置 JSON
  • ConfigDefaults: 默认配置模板
  • SubscriptionRepository: 订阅列表的 CRUD 操作,支持远程订阅和本地节点导入
  • ClashConverter: Clash YAML 配置转换为 sing-box JSON
  • SettingsRepository/AppSettings: 用户设置的持久化
4. UI 层 (ui/)
  • AppNavigation: 底部导航栏和 NavHost 路由
  • screens/: 各功能页面 (HomeScreen, NodesScreen, SubscriptionScreen, SettingsScreen, DiagnosticsScreen)
  • components/: 可复用的 UI 组件
  • theme/: Material 3 主题和颜色定义
5. 主入口 (MainActivity.kt)
  • Activity 作为状态管理中心,聚合所有 Store 的状态
  • 使用 LaunchedEffect 处理初始化和副作用
  • 通过 AppNavigation 将所有回调和状态传递给子页面

Read the full file on GitHub · 140 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. 6d 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 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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,182 tokens

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).

microsoft/vscode · 6,785 tokens

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).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens