aiskillstore avatar

Alibaba Java Coding Guidelines Skill

This brings Alibaba's Java coding guidelines into your editor as a reviewable standard. It catches the usual suspects like naming, magic values, and SQL injection risks, but also pushes on less obvious stuff like logging context, null handling in public APIs, and MyBatis parameter binding. Works for code generation, refactoring, and reviews across Java, Spring, MyBatis, and SQL. The skill prioritizes mandatory rules over recommendations and warns you when project conventions conflict with the standard. Output is concrete: file, line, severity, risk, and a fix you can actually apply. If you're working on Java backends that need to pass enterprise review or you just want consistent guard rails without memorizing a 100 page handbook, this does the gruntwork.

GitHub stars
352
last updated
Jun 11, 2026

Install

$ npx -y skills add aiskillstore/marketplace --skill alibaba-java-coding-guidelines-skill --agent claude-code

Installs into .claude/skills of the current project.

Files

阿里巴巴 Java 开发规约

概览

使用本 skill 时,把《阿里巴巴 Java 开发手册》当作 Java 代码生成、重构和审查的默认质量基线。优先处理强制规则,再处理推荐规则;如果项目本地约定和规约冲突,说明冲突点并以用户或项目约定为准。

详细规则摘要见 references/alibaba-java-rules.md。需要精确出处或完整条文时,打开官方页面:https://alibaba.github.io/Alibaba-Java-Coding-Guidelines/。

兼容性

这是通用 Agent Skill,不绑定单个应用或运行器。Claude Code、Codex 以及其他支持 Agent Skills 目录规范的工具都应只依赖 SKILL.md 和按需读取的 references/ 内容。

agents/openai.yaml 只是 OpenAI/Codex UI 元数据,属于可选增强;不应作为 Claude Code 或其他 agent 使用本 skill 的前提。

校验入口提供 Python、Node.js、Go 三种等价实现:scripts/validate_skill.py、scripts/validate_skill.mjs、scripts/validate_skill.go。使用者可以按本地运行时任选其一;需要验证三者一致时运行 tests/test_validators.sh。

使用场景

  • 审查 Java、Spring、MyBatis、Maven、SQL、DDL、日志、异常处理或安全相关改动。
  • 生成新类、接口、DTO、VO、DO、枚举、异常类、测试类、Mapper、Service、DAO 或 SQL。
  • 重构命名、常量、集合、并发、控制流、日志、异常和数据库访问代码。
  • 给出代码评审意见、整改清单、规范符合性报告或自动修复建议。

工作流程

  1. 先识别任务类型:代码生成、代码审查、重构、SQL/DDL 审查、依赖治理、安全检查。
  2. 读取当前项目的已有风格、包结构、测试框架和持久层写法,避免只按通用规约硬套。
  3. 按严重级别处理:
    • 强制:发现违反时必须指出或修复。
    • 推荐:默认遵循;如果不采用,说明权衡。
    • 参考:作为设计建议,不阻塞交付。
  4. 针对相关模块读取 references/alibaba-java-rules.md 中对应小节。
  5. 输出结果时按影响排序:正确性和安全性、稳定性和性能、可维护性、风格一致性。

代码生成规则

Sponsors

Details

Repository
github.com/aiskillstore/marketplace
Category
Java & JVM
First seen
Jun 11, 2026

More from aiskillstore/marketplace

All 37

Recommended

More Java & JVM
1limrun-inc avatarlimrun-gradlelimrun-inc/skillsBuild an Android app on a remote Gradle sandbox with `lim gradle build` instead of local Gradle or Android Studio, from any environment (Linux, Windows, macOS, 41.5Kskills.sh installs
2github avatarjava-docsgithub/awesome-copilotEnsure that Java types are documented with Javadoc comments and follow best practices for documentation.10.8Kskills.sh installs
3github avatarjava-refactoring-extract-methodgithub/awesome-copilotRefactoring using Extract Methods in Java Language9.3Kskills.sh installs
4github avatarjava-refactoring-remove-parametergithub/awesome-copilotRefactoring using Remove Parameter in Java Language8.9Kskills.sh installs
5affaan-m avatarkotlin-coroutines-flowsaffaan-m/eccKotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.5.9Kskills.sh installs
6affaan-m avatarkotlin-testingaffaan-m/eccKotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practic5.7Kskills.sh installs