Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/binarywang/wxjava/copilot-instructionsgit clone --depth 1 https://github.com/binarywang/WxJavaWhat 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 | $0.02031 | $0.02031 |
| Opus 5 | $0.01015 | $0.01015 |
| Sonnet 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 yesterday.
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.
- yesterday 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,051 stars, last pushed 2d ago), licensed Apache-2.0. It adds 2,031 tokens to every session, about $0.0102 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.
Other instructions, from other repositories
wechat-clawbot CLAUDE.md
Instructions for nightsailer/wechat-clawbot, covering claude.md, architecture, key directories, testing and linting and formatting.
ai4j AGENTS.md
Instructions for LnYo-Cly/ai4j, covering repository guidelines, project identity, monorepo scope, harness anything and hard rules.
ai4j CLAUDE.md
Instructions for LnYo-Cly/ai4j: 本项目以 AGENTS.md 作为 coding agent 指令的唯一权威入口。.
weclaws AGENTS.md
Instructions for yokingma/weclaws: This file sets repository-wide rules for coding agents in WeClaws.
weclaws CLAUDE.md
Instructions for yokingma/weclaws: Read AGENTS.md first. Then read README.md, docs/manuals/README.md, and the relevant workspace PATTERNS.md / CHANGELOG.md.
openapi AGENTS.md
Instructions for longbridge/openapi, covering agent guidelines, after modifying rust code, after modifying the node.js sdk (nodejs/), after modifying the python sdk api (python/) and after modifying the c sdk (c/).