localclash-luci: Instructions file for Codex

AGENTS.md

localclash-luci AGENTS.md is an instructions file for Codex, OpenCode from qoli/localclash-luci. It costs 892 tokens per session, scanned A, original, MIT.

A repository instruction file for the LuCI interface of localClash, an OpenWrt router application. It explains which logic belongs in the interface versus a neighboring core repository, along with language, integration, testing, and packaging rules.

In plain words
What is it for?
Use it when changing the LuCI interface, router control actions, RPC permissions, startup integration, or OpenWrt packages. It helps with Chinese UI text and regression checks for affected features.
Why use it?
It prevents duplicated runtime logic and keeps router controls, user-facing text, and release checks consistent. It also clarifies which changes need focused syntax, feature, or package tests.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Codex.

This is qoli/localclash-luci's own configuration. It tells Codex and OpenCode how to work on localclash-luci 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 localclash-luci configures →

Reuse

Borrowing it

Nothing to install: this file belongs to qoli/localclash-luci. 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/qoli/localclash-luci/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/qoli/localclash-luci

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 localclash-luci AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/qoli/localclash-luci/agents-md/github.svg)](https://agentmods.dev/instructions/qoli/localclash-luci/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/qoli/localclash-luci/agents-md"><img src="https://agentmods.dev/badge/instructions/qoli/localclash-luci/agents-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 localclash-luci AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/qoli/localclash-luci/agents-md"><img src="https://agentmods.dev/badge/instructions/qoli/localclash-luci/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 892 This file is loaded in full into every session.
When invoked 892 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.00892 $0.00892
Opus 5.5 $0.00357 $0.00357
Sonnet 5.5 $0.00178 $0.00178
Haiku 4.5 $0.00089 $0.00089

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

Security

Grade A, and why

localclash-luci 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 3d 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 · 64 lines

What it actually says

Repository Guidelines

项目关系

本仓库负责 localClash 的 OpenWrt LuCI 包装层:LuCI 视图、rpcd ACL、 OpenWrt 包元数据、helper 脚本、init 集成,以及面向路由器用户的 UI 行为。

/Volumes/Data/Github/localClash 是相邻的核心仓库。runtime 逻辑、产品级 CLI/MCP API、生成的运行时资产、Mihomo 生命周期和配置渲染都应保留在核心仓库。 LuCI 应调用这些产品接口,不要复制 runtime 逻辑。

表达语言

LuCI 面向用户的表达语言维持为简体中文。

以下内容使用简体中文:

  • LuCI UI 标签、描述、按钮文本、状态文本和弹窗摘要。
  • rpcd helper 消息和用户可见的 JSON summary。
  • 新增到本 LuCI 仓库的文档。

除非用户明确要求繁体中文版本,不要在 LuCI 面向用户的文本中引入繁体中文。

开发注意事项

优先沿用当前应用已经使用的直接 rpcd action 模式。这个 LuCI surface 不是传统 表单加应用的工作流;runtime、接管、恢复和维护控制都是直接操作按钮。

交付前,对改动过的 surface 运行聚焦的语法和打包检查,例如:

  • sh -n openwrt/luci-app-localclash/root/usr/libexec/rpcd/localclash
  • bash -n scripts/test-rpcd-takeover-restore.sh
  • scripts/test-rpcd-takeover-restore.sh
  • scripts/build-openwrt-ipk.sh
  • scripts/build-openwrt-apk.sh

功能测试与发布选测

从相邻 Core 仓库的 docs/istoreos-test-features.md 和 测试 Skill 开始:维护每个功能最后实际测试版本、结果和证据, 按变更影响选择回归,核对后沿用未受影响功能的历史结果。发布不自动触发全表重测。

集成约束

先在 Core 核对版本化 runtime facts 契约及发布兼容性,再修改 LuCI。fw4/nft、 策略路由、DNS hijack、desired state、ownership marker、boot/hotplug 及跨模块事务归 LuCI; 不得把这些执行器移进 Core,或用未协调的 effective=false 轮询覆盖用户明确停止。 同 boot 修复只依本次启动的拥有证据;跨 reboot 自动恢复是单独、明确的持久设置。 手动停止应清除本次启动的修复意图,不得偷偷启用或改写开机恢复策略。

普通 IPK/APK 只安装静态包文件;postinst 不下载 Core、不创建运行时资产、不管理 MCP 生命周期。下载、service ensure/restart 与任务交接由显式 helper 操作负责。 UI 通过窄 rpcd action 调用正式产品接口,不执行任意 shell、不编辑生成 YAML, 不扩成第二套配置模型或完整规则/群组编辑器。网站分流是受限例外。 保存后不回显订阅秘密;各变更入口读回实际状态,不以 task 完成代替网络结果。

DNS ingress 租约、loopback 本地回查 bypass 与 dnsmasq 上游保持各自职责: LAN 查询不能仅因目标是路由器地址就绕过接管;不得删除 Mihomo 回查 dnsmasq 的 loopback bypass。避免持久覆盖用户 fw4 配置,清理仅处理本模块拥有的规则和 marker。

发布操作按 Core 的 发布 Skill 执行;源码、schema 和 workflow 保持实现事实,README 维护用户入口。

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. 3d ago First seen · 64 lines · 892 tokens per session scan A bec04fe49271

Subscribe to this mod's changes

localclash-luci AGENTS.md is an instructions file published in the GitHub repository qoli/localclash-luci (121 stars, last pushed 3d ago), licensed MIT. It adds 892 tokens to every session, about $0.0036 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-10-26.

Related

Other instructions, from other repositories

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 · 9,715 tokens

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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens