WxJava: Instructions file for Codex

AGENTS.md

WxJava AGENTS.md is an instructions file for Codex, OpenCode from binarywang/WxJava. It costs 2,430 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for developers and coding agents working on WxJava, a Java software development kit for WeChat services. They describe the project's modules, Java compatibility, development process, code style, and review priorities.

In plain words
What is it for?
Use them when adding or changing WxJava modules, APIs, configuration, tests, or documentation. They help with tasks involving Maven's multi-module project structure, Spring Boot or Solon integrations, and Java 8 compatibility.
Why use it?
They provide the repository-specific rules needed to make changes that fit existing code and remain compatible. They also explain which documentation, build files, implementations, and tests to inspect first.

Instructions file for CodexOpenCode

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

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

About the project

WxJava is a Java server-side SDK for building backends that use WeChat services, including payments, public accounts, mini programs, enterprise accounts, the open platform, and video channels. It is for Java developers integrating those WeChat modules through Maven or Gradle. The catalogue add-ons guide users and contributors through module selection, integration, troubleshooting, API contributions, and upgrades.

binarywang/WxJava · 33,184 stars · on GitHub

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/binarywang/wxjava/agents-md"><img src="https://agentmods.dev/badge/instructions/binarywang/wxjava/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,430 This file is loaded in full into every session.
When invoked 2,430 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.02430 $0.02430
Opus 5.5 $0.00972 $0.00972
Sonnet 5.5 $0.00486 $0.00486
Haiku 4.5 $0.00243 $0.00243

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

Security

Grade A, and why

WxJava 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 2mo 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 · 131 lines

How it starts

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

WxJava Agent 指南

适用范围与指令优先级

  • 本文件适用于整个仓库,供本地编码 Agent、自动化 Agent 和 Pull Request Review Agent 使用。
  • 开始工作前先阅读与任务直接相关的 README.md、CONTRIBUTING.md、模块 pom.xml、现有实现和测试;不要仅凭通用经验推断项目约定。
  • 若子目录存在更具体的 AGENTS.md,处理该目录文件时优先遵循距离目标文件最近的说明。
  • 用户的明确要求优先于本文件;若要求与兼容性、安全性或仓库约定冲突,应先说明风险,不要静默偏离。
  • 只修改完成任务所必需的文件,不处理无关格式、重构或历史遗留问题。

项目概览

  • WxJava 是面向微信生态的 Java SDK,采用 Maven 多模块结构。
  • 当前根项目要求 Java 8(maven.compiler.source 和 maven.compiler.target 均为 1.8)。除非任务明确要求升级,否则新增代码、依赖和 API 必须保持 Java 8 兼容。
  • 主要 SDK 模块包括:
    • weixin-java-common:各模块共用的基础类型、工具、异常、HTTP 与配置能力。
    • weixin-java-mp:微信公众号。
    • weixin-java-miniapp:微信小程序。
    • weixin-java-pay:微信支付。
    • weixin-java-cp:企业微信。
    • weixin-java-open:微信开放平台。
    • weixin-java-channel:微信视频号、微信小店。
    • weixin-java-qidian:微信客服相关能力。
    • weixin-java-aispeech:微信智能语音。
    • weixin-graal:GraalVM 相关支持。
  • 集成模块主要位于:
    • spring-boot-starters:Spring Boot Starter 及多账号 Starter。
    • solon-plugins:Solon 插件及多账号插件。
    • wx-java-bom:统一管理对外模块版本的 BOM。
  • README.md 说明整体能力和使用方式,CONTRIBUTING.md 规定代码贡献要求,docs 保存补充文档。

开发流程

  1. 确认任务涉及的微信产品和 Maven 模块,先查找同模块中的相似接口、Bean、实现类和测试。
  2. 阅读目标模块及其父级 pom.xml,确认依赖、测试框架和已有实现方式。
  3. 优先沿用现有的包结构、命名、序列化、HTTP 执行器、异常处理及配置模式。
  4. 以最小变更完成任务;不要在功能修改中夹带依赖升级、全局格式化或无关重构。
  5. 为修复或新增行为添加有针对性的测试,并先运行受影响模块的验证。
  6. 交付前检查 diff、测试结果、兼容性和文档影响,明确报告未执行或无法执行的验证。

代码风格与兼容性

  • 遵循 .editorconfig:使用空格缩进、缩进宽度为 2、UTF-8、LF、文件末尾保留换行,并清除非 Markdown 文件的行尾空格。
  • 保持目标文件现有代码风格;避免仅为个人偏好调整 import、换行、注释或成员顺序。
  • 不使用 Java 9 及以上语言特性或仅在新版本 JDK 中存在的 API。
  • 项目使用 Lombok;新增或修改 Lombok 用法时遵循相邻代码模式,不要在同一变更中无理由改写为手工样板代码。
  • 公共 API、序列化字段、枚举值、常量、默认实现和依赖范围都可能影响下游用户,修改时优先保持源码、二进制和行为兼容。
  • 不要随意改变已有异常类型、空值语义、默认 HTTP 客户端、JSON/XML 映射或配置加载行为。
  • 新增依赖前先确认现有依赖能否满足需求;依赖版本应在合适的父 POM 或 BOM 中统一管理,避免模块间版本漂移。

API 与实现约定

  • 对接微信接口时,以对应产品的官方接口定义和仓库内现有同类实现为依据,核对请求路径、HTTP 方法、字段名、必填项和返回结构。
  • Java 字段名可以符合项目命名习惯,但传输层字段名必须与微信接口保持一致;需要时使用项目现有的 Gson、Jackson 或 XStream 映射方式。
  • 新增 Service API 时同步检查接口、实现类、请求/响应 Bean、URL 常量、序列化适配器和测试是否都需要更新。
  • 涉及多个 HTTP 客户端实现时,保持 Apache HttpClient、HttpComponents、OkHttp 和 Jodd 等现有实现的能力一致;不要只修复其中一种而遗漏其他可选实现。
  • 涉及 Starter 或插件时,检查单账号与多账号版本以及自动配置、配置属性和示例测试是否需要同步。
  • 公共方法需要清晰的 Javadoc,至少准确描述参数、返回值、异常和必要约束;不要编写与实现不一致的模板化注释。
  • 不吞掉异常,不使用空 catch,不在日志中泄露 token、secret、密钥、签名原文或用户敏感数据。

Read the full file on GitHub · 131 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. 2mo ago First seen · 131 lines · 2,430 tokens per session scan A c51d48576767

Subscribe to this mod's changes

WxJava AGENTS.md is an instructions file published in the GitHub repository binarywang/WxJava (33,184 stars, last pushed 4d ago), licensed Apache-2.0. It adds 2,430 tokens to every session, about $0.0097 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

WxJava AGENTS.md compared with instructions from other repositories

WxJava AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
WxJava AGENTS.mdbinarywang/WxJavaInstructions file33k4d agoApache-2.0A2,430Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode