java-coding-guide-pro SKILL.md skillA

This file is byte-identical to the first copy the registry indexed, one of 6 indexed copies. Same content hash, so the same checks give both the same grade.

java-coding-guide-pro from baixuanzhu/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add baixuanzhu/skills/java-coding-guide-pro@v3.5.0

Pins v3.5.0 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
baixuanzhu/skills
Path
eval/java-coding-guide-pro/darwin-validation-v3.6.0/snapshots/v3.5.0/SKILL.md
Versions recorded
1
Latest version
v3.5.0, committed Sep 2, 2026
Size
13,772 bytes
Repository stars
3
License
MIT

Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring / best practices / code quality)。 覆盖:判空与字符串、集合与 Stream、日期时间、文件 IO / HTTP 调用 / JSON 序列化、 线程池与并发、Bean 拷贝、加密哈希、异常处理与日志、金额与浮点精确运算、 现代 Java 语法(JDK 8~25,按特性最低版本门控)。 次级触发信号——代码中出现:SimpleDateFormat、Executors.newFixedThreadPool / newCachedThreadPool / newSingleThreadExecutor、new Thread(...)、 new BigDecimal(0.1) 小数构造、BeanUtils.copyProperties、catch (Throwable) / catch…

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Java 编码指南

面向日常 Java 开发的**编码约定助手**。每条规则「✗ 禁止 → ✓ 推荐」,覆盖 JDK 8~25+(LTS 锚定:8/11/17/21/25)。

## 三条铁律

1. **栈中立**:库的选择**跟随项目既有依赖**,本指南不强加任何库;Spring 项目优先 Spring 生态自带能力(Jackson / RestTemplate / WebClient / SLF4J)。
2. **一域一默认**:每个场景只给唯一推荐(以项目既有栈为准),不列举「或 A 或 B」制造决策疲劳。
3. **版本门控**:先确认目标 JDK,高版本特性按门控使用——JDK 8 项目严禁 `var`/`record`/`switch 表达式`/文本块/`sealed`/`虚拟线程`。

## 第 0 步:栈探测与适配(激活时先执行)

读 `pom.xml` / `build.gradle` 一次性探测(读不到则一次问全,勿分多轮):

1. **目标 JDK**:`maven.compiler.release` / `<source>` / `sourceCompatibility`;读不到问用户「目标 JDK 版本是(8 / 11 / 17 / 21 / 25)?」。
2. **已有栈**:Spring 系(自带 Jackson/RestTemplate/WebClient/SLF4J)、Hutool、commons-lang3、Guava、Gson/Fastjson、OkHttp、Lombok、MapStruct。
3. **三条适配规则**:
   - 项目**已有**对应能力的库 → **跟随既有库**,不另引、不混用(一个项目一套字符串/集合工具);仅当既有库缺该能力时补引,并在代码注释标注混用原因。
   - **高风险能力缺失**且任务确实需要(见「风险分级与构件选择」)→ 触发 C-CHECK 询问是否引入。
   - **低风险能力缺失**(判空/集合/随机数/日期等)→ 直接用 JDK 原生,**零打断、不询问**。

## JDK 版本策略

**判据:目标 JDK ≥ 特性最低版本 → 可用;低于 → 禁用,改低版本写法。** 非 LTS 目标同样按版本比较,不另设档位。

| 特性 | 最低 JDK |
|---|---|
| Lambda / 方法引用 / `Optional` / `Stream` / `java.time` / `CompletableFuture` | 8(下限) |
| `var`(仅局部变量) | 10 |
| JDK 内置 `HttpClient` | 11 |
| `switch` 表达式(箭头 / `yield`) | 14 |
| 文本块 `"""` | 15 |
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add baixuanzhu/skills/java-coding-guide-pro@sha256:b7a1b97c5cb828ef

The line at the top of this page pins the label v3.5.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_l4d2wye6wjub4yad.svg)](https://markdownregistry.com/a/art_l4d2wye6wjub4yad)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Sep 2, 2026.

versioncommittedcommitsizeaudit
v3.5.0 latest2026-09-02 a91b961 13,772 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (13772 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

baixuanzhu/skills · 3 stars · license MIT · pushed 2026-11-03 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_l4d2wye6wjub4yad
GET https://markdownregistry.com/api/v1/resolve?ref=baixuanzhu/skills/java-coding-guide-pro
GET https://markdownregistry.com/api/v1/blob/b7a1b97c5cb828ef056ce7ec05090c8eb0d3c0aae51ddc75a331be9d24d0db8e

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from baixuanzhu/skills

AGENTS.md AGENTS.md file
baixuanzhu/skills · AGENTS.md
git:20261027.6a2cc9a · audit A · 3 stars
CLAUDE.md CLAUDE.md file
baixuanzhu/skills · CLAUDE.md
git:20260822.070edce · audit B · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/v3.3.0/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.3.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/v3.4.0/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.4.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/version1/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.3.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/version2/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.4.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/versionA/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.4.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/versionB/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.3.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.5.0/snapshots/v3.4.1/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.4.1 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.5.0/snapshots/v3.5.0/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.5.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.5.0/snapshots/version1/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.4.1 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.5.0/snapshots/version2/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.5.0 · audit A · 3 stars

Every file in baixuanzhu/skills

Other files named java-coding-guide-pro

java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/versionB/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.3.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.6.0/snapshots/v3.6.0/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.6.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.6.0/snapshots/versionA/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.6.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.6.0/snapshots/version2/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.6.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/versionA/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.4.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.4.0/snapshots/version1/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.3.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.6.0/snapshots/versionB/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.5.0 · audit A · 3 stars
java-coding-guide-pro SKILL.md skill
baixuanzhu/skills · eval/java-coding-guide-pro/darwin-validation-v3.5.0/snapshots/version2/SKILL.md · Java 编码规范与避坑助手。在编写、修改、重构或审查任何 Java / Spring Boot 代码时使用本技能—— 无论用户是否提到编码规范或具体工具库(Java coding / code review / refactoring…
v3.5.0 · audit A · 3 stars

Browse by kind, by grade A, or by owner.