Skip to content
coworkplugins

Claude skill

Java Contract

Java Contract is a Claude skill in the Skills plugin. 为项目建立并执行 Java 编码契约:把需求没说明的边界决策(无结果 / null 参数 / 集合里的 null / 重复 key / 结果顺序与可变性 / 非法参数 / 静态还是实例 / 重复到达)落成 .claude/rules/java-contract.md, 动手前先读、写完编译验证;审存量代码时按失效模式七组追问。 在编写、修改、审查 Java 代码时使用;也用于决定某个方法该返回…

CommunityShips in SkillsDeveloper Tools

What it does

The description in the skill's SKILL.md, which Claude reads to decide when to use it:

为项目建立并执行 Java 编码契约:把需求没说明的边界决策(无结果 / null 参数 / 集合里的 null / 重复 key / 结果顺序与可变性 / 非法参数 / 静态还是实例 / 重复到达)落成 .claude/rules/java-contract.md, 动手前先读、写完编译验证;审存量代码时按失效模式七组追问。 在编写、修改、审查 Java 代码时使用;也用于决定某个方法该返回 null 还是空集合、 空集合聚合该返回 0 还是 Optional、为项目定下统一的边界处理规则。 触发信号:要为新方法定返回契约、项目里还没有 .claude/rules/java-contract.md、 put 与 putIfAbsent 混用、写操作可能被重复投递或重试、 cannot find symbol 且 symbol 是 var 或 JDK 9+ 方法名。 不适用:第三方库 API 用法与选型、Spring 分层与工程组织、测试框架、静态检查规则集、前端代码。

The skill's instructions (about 378 words) cover:

  • 两条原则
  • 第一步:读项目
  • 契约八项
  • 写完即验证
  • 审查(存量代码,独立动作)
  • 库边界
  • 使用流程

How to use it

  1. Java Contract comes inside the Skills plugin, so you get it by installing that plugin, along with its 9 other skills. A plugin installs as one unit, with all its skills. The plugin's page has the install steps, and plugins are saved to your Claude account.
  2. Ask Claude for the task. When your request matches the skill's description, Claude loads it.
  3. To pick it yourself in Claude chat, type / or click + and choose java-contract. In Claude Code and Cowork, type:
    /baixuanzhu-skills:java-contract

Source

Plugin
Skills
SKILL.md
View on GitHub
Repo stars
4
Repo last pushed
Nov 3, 2026
Checked
Nov 16, 2026

More skills in Skills