Install any skill in seconds. Free to start, no credit card required.
Get Started Free →doccker/cc-java-dev
Java 开发规范,包含命名约定、异常处理、Spring Boot 最佳实践等
Passed 22 of 22 test cases with the skill, and 16 of 22 without it.
and 5 more in the full report
6 fixed16 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
在审查团队的 Java 代码时,我发现有一个积分明细统计功能:主方法先查出最近的 1500 条账单记录,然后在 for 循环里对每一条记录单独调用 UserRepository 去查询用户详细信息和等级。另外,有些查询需要传入包含上千个 ID 的列表。请帮我重构这部分 Java 代码,输出重构后的 Service 层完整代码以及优化说明,解决循环内频繁查询数据库和超长查询列表的问题。
| Checked | Without skill | With skill |
|---|---|---|
| executes the repository query in bulk outside the loop | Passed | Passed |
| places static constants before instance variables in class member ordering | Missed | Passed |
| partitions query parameter lists into batches of at most 500 elements | Passed | Passed |
The instructions your model reads when the skill loads.
参考来源: Google Java Style Guide、阿里巴巴 Java 开发手册
# Maven
mvn clean compile # 编译
mvn test # 运行测试
mvn verify # 运行所有检查
# Gradle
./gradlew build # 构建
./gradlew test # 运行测试
| 类型 | 规则 | 示例 |
|---|---|---|
| 包名 | 全小写,域名反转 | com.example.project |
| 类名 | 大驼峰,名词/名词短语 | UserService, HttpClient |
| 方法名 | 小驼峰,动词开头 | findById, isValid |
| 常量 | 全大写下划线分隔 | MAX_RETRY_COUNT |
| 布尔返回值 | is/has/can 前缀 | isActive(), hasPermission() |
public class Example {
// 1. 静态常量
public static final String CONSTANT = "value";
test cases passed, vs 16 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.