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.
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.
curl -O https://raw.githubusercontent.com/binarywang/WxJava/develop/.github/copilot-instructions.mdgit clone --depth 1 https://github.com/binarywang/WxJavaWrote 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/binarywang/wxjava/copilot-instructions)<a href="https://agentmods.dev/instructions/binarywang/wxjava/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/binarywang/wxjava/copilot-instructions/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.
<a href="https://agentmods.dev/instructions/binarywang/wxjava/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/binarywang/wxjava/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" 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.02031 | $0.02031 |
| Opus 5.5 | $0.00812 | $0.00812 |
| Sonnet 5.5 | $0.00406 | $0.00406 |
| Haiku 4.5 | $0.00203 | $0.00203 |
Grade A, and why
WxJava copilot-instructions.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.
How it starts
The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Copilot Instruction
请始终使用中文生成 Pull Request 的标题、描述和提交信息
WxJava - 微信 Java SDK 开发说明
WxJava 是一个支持多种微信平台的完整 Java SDK,包含公众号、小程序、微信支付、企业微信、开放平台、视频号、企点等多种功能模块。
请始终优先参考本说明,只有在遇到与此内容不一致的意外信息时,才退而使用搜索或 bash 命令。
高效开发指南
前置条件与环境准备
- Java 要求:JDK 8+(项目最低目标为 Java 8)
- Maven:推荐 Maven 3.6+(已验证 Maven 3.9.11)
- IDE:推荐使用 IntelliJ IDEA(项目针对 IDEA 优化)
引导、构建与校验
克隆仓库后按顺序执行以下命令:
# 1. 基础编译(请勿中断 - 约需 4-5 分钟)
mvn clean compile -DskipTests=true --no-transfer-progress
# 超时时间:建议设置 8 分钟以上。实际时间:约 4 分钟
# 2. 完整打包(请勿中断 - 约需 2-3 分钟)
mvn clean package -DskipTests=true --no-transfer-progress
# 超时时间:建议设置 5 分钟以上。实际时间:约 2 分钟
# 3. 代码质量校验(请勿中断 - 约需 45-60 秒)
mvn checkstyle:check --no-transfer-progress
# 超时时间:建议设置 3 分钟以上。实际时间:约 50 秒
重要时间说明:
- 绝对不要中断任意 Maven 构建命令
- 编译阶段耗时最长(约 4 分钟),原因是项目包含 34 个模块
- 后续构建会更快,因为存在增量编译
- 始终使用
--no-transfer-progress以减少日志噪音
测试结构
- 测试框架:TestNG(非 JUnit)
- 测试文件:共有 298 个测试文件
- 默认行为:pom.xml 中默认禁用测试(
<skip>true</skip>) - 测试配置:测试需要通过 test-config.xml 提供真实的微信 API 凭据
- 注意:没有真实微信 API 凭据请不要尝试运行测试,测试将会失败
项目结构与导航
核心 SDK 模块(主要开发区)
weixin-java-common/- 通用工具与基础类(最重要)weixin-java-mp/- 公众号 SDKweixin-java-pay/- 微信支付 SDKweixin-java-miniapp/- 小程序 SDKweixin-java-cp/- 企业微信 SDKweixin-java-open/- 开放平台 SDKweixin-java-channel/- 视频号 / Channel SDKweixin-java-qidian/- 企点 SDK
框架集成模块
spring-boot-starters/- Spring Boot 自动配置 startersolon-plugins/- Solon 框架插件weixin-graal/- GraalVM 本地镜像支持
配置与质量控制
quality-checks/google_checks.xml- Checkstyle 配置.editorconfig- 代码格式规则(2 个空格等于 1 个制表)pom.xml- 根级 Maven 配置
开发工作流
修改代码的流程
-
修改前务必先构建以建立干净基线:
mvn clean compile --no-transfer-progress -
遵循代码风格(由 checkstyle 强制):
- 缩进使用 2 个空格(不要用制表符)
- 遵循 Google Java 风格指南
- 在 IDE 中安装 EditorConfig 插件
-
增量验证修改:
# 每次修改后运行: mvn compile --no-transfer-progress mvn checkstyle:check --no-transfer-progress
提交修改前的必须校验
请务必按顺序完成以下校验步骤:
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.
- 2mo ago First seen · 203 lines · 2,031 tokens per session scan A 92b71713be6a
WxJava copilot-instructions.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,031 tokens to every session, about $0.0081 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.
WxJava copilot-instructions.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| WxJava copilot-instructions.mdbinarywang/WxJava | Instructions file | 33k | 4d ago | Apache-2.0 | A | 2,031 | GitHub Copilot |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |