From partme-ai-full-stack-skills
Adds JavaDoc comments to Java code following industry standards, covering class-level, method-level, and field-level for Controllers, Services, Entities, DTOs, VOs, and other components.
npx claudepluginhub partme-ai/full-stack-skills --plugin t2ui-skillsThis skill uses the workspace's default tool permissions.
**ALWAYS use this skill when the user mentions:**
LICENSE.txtexamples/controller-example.mdexamples/entity-example.mdexamples/full-workflow-example.mdexamples/service-example.mdreference/java-coding-standards.mdreference/java-component-types.mdreference/javadoc-standards.mdtemplates/application-service-comment-template.mdtemplates/controller-comment-template.mdtemplates/domain-service-comment-template.mdtemplates/entity-comment-template.mdtemplates/feign-service-comment-template.mdtemplates/mapper-comment-template.mdtemplates/service-comment-template.mdCreates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
ALWAYS use this skill when the user mentions:
Trigger phrases include:
Component types this skill handles:
CRITICAL: This skill should be triggered when the user wants to add comments to Java code, regardless of the component type or complexity.
This skill follows a systematic 4-step workflow:
CRITICAL: Before adding any comments, you MUST:
Scan all Java files in the project:
.java files in the current directory and subdirectoriesRead related documentation:
Understand the context:
Identify patterns:
Output: A summary of your understanding of the codebase, including:
CRITICAL: You MUST ask the user to confirm which component types need comments.
Present a checklist of common Java component types and ask the user to select:
请确认需要进行代码注释的分类(可多选):
- [ ] Controller(控制器)
- [ ] Service(服务接口)
- [ ] ServiceImpl(服务实现)
- [ ] Application Service(应用服务,DDD架构)
- [ ] Domain Service(领域服务,DDD架构)
- [ ] Feign Service Interface(Feign远程服务接口)
- [ ] Mapper(数据访问层)
- [ ] Model(数据模型)
- [ ] Entity(实体类)
- [ ] BO(业务对象)
- [ ] DTO(数据传输对象)
- [ ] VO(视图对象)
- [ ] DAO(数据访问对象)
- [ ] Repository(仓储)
- [ ] Configuration(配置类)
- [ ] Component(组件类)
- [ ] Utility(工具类)
- [ ] Exception(异常类)
- [ ] 其他(请 specify)
Also ask about comment types:
Wait for user confirmation before proceeding to the next step.
CRITICAL: After user confirms component types, create a detailed todo list.
For each component type selected by the user:
Scan the codebase to find all matching classes:
*Controller.java, *Service.java)For each class, identify:
Generate a structured todo list in the following format:
## Todo List: Java Code Comments
### Controller 层
- [ ] UserController
- [ ] 类注释
- [ ] createUser() - 方法注释
- [ ] updateUser() - 方法注释
- [ ] deleteUser() - 方法注释
- [ ] userId - 属性注释
### Service 层
- [ ] UserService
- [ ] 类注释
- [ ] findUserById() - 方法注释
- [ ] saveUser() - 方法注释
### ServiceImpl 层
- [ ] UserServiceImpl
- [ ] 类注释
- [ ] findUserById() - 方法注释
- [ ] saveUser() - 方法注释
### Mapper 层
- [ ] UserMapper
- [ ] 类注释
- [ ] selectById() - 方法注释
### Model/Entity 层
- [ ] User
- [ ] 类注释
- [ ] id - 属性注释
- [ ] username - 属性注释
- [ ] email - 属性注释
Important:
CRITICAL: Add comments in the specified order and update todo list after each completion.
Order of execution:
For each item in the todo list:
Process one class at a time:
Class-level comment format (Standard JavaDoc):
/**
* [Class description]
*
* <p>This class [purpose and responsibility]
*
* @author [Author name if available]
* @since [Version or date if available]
*/
public class UserController {
Class-level comment format (Java Coding Standards - strict):
/**
* <p>[Class description]</p>
*
* <p>This class [purpose and responsibility]</p>
*
* @author [Author name if available]
* @since [Version or date if available]
*/
public class UserController {
Specialized class comment formats (Java Coding Standards - strict):
Application Service:
/**
* {服务名称}应用服务
*
* <p>{详细描述服务的业务功能、职责和应用场景}</p>
* <p>主要功能包括:</p>
* <ul>
* <li>{功能点1}</li>
* <li>{功能点2}</li>
* <li>{功能点3}</li>
* </ul>
*
* @author system
* @since 2025-01-21
*/
public class UserApplicationService {
Domain Service:
/**
* {服务名称}领域服务
*
* <p>{详细描述服务的领域职责和业务逻辑}</p>
* <p>主要功能包括:</p>
* <ul>
* <li>{功能点1}</li>
* <li>{功能点2}</li>
* </ul>
*
* @author system
* @since 2025-01-21
*/
public class UserDomainService {
Feign Service Interface:
/**
* {服务名称}Feign远程服务接口
*
* <p>通过Feign调用{目标服务}的远程接口</p>
* <p>主要功能:</p>
* <ul>
* <li>{接口功能1}</li>
* <li>{接口功能2}</li>
* </ul>
*
* @author system
* @since 2025-01-21
*/
public interface UserFeignService {
Method-level comment format (Standard JavaDoc):
/**
* [Method description]
*
* @param [paramName] [parameter description]
* @return [return value description]
* @throws [ExceptionType] [exception description]
*/
public UserDTO createUser(@RequestBody UserCreateRequest request) {
Method-level comment format (Java Coding Standards - strict):
/**
* <p>[Method description]</p>
*
* <p>[Detailed description]</p>
*
* @param [paramName] [paramType] [parameter description]
* @return [returnType] [return value description]
* @exception [full.package.ExceptionType] [exception description]
*/
public UserDTO createUser(@RequestBody UserCreateRequest request) {
Field-level comment format (Standard JavaDoc):
/**
* [Field description]
*/
private Long userId;
Field-level comment format (Java Coding Standards - strict):
/**
* <p>[Field description]</p>
*
* <p>[Detailed description if needed]</p>
*/
private Long userId;
After completing each class:
[x]Example progress update:
## Progress Update
✅ Completed: UserController
- [x] 类注释
- [x] createUser() - 方法注释
- [x] updateUser() - 方法注释
- [x] deleteUser() - 方法注释
- [x] userId - 属性注释
🔄 In Progress: UserService
- [x] 类注释
- [ ] findUserById() - 方法注释
- [ ] saveUser() - 方法注释
IMPORTANT: Comment Format Standards
This skill follows two standards:
The Java Coding Standards require:
<p> tags: <p>description</p>@param paramName paramType description@return returnType description@exception java.lang.Exception descriptionClass Comments Should Include:
<p> tags if following Java Coding Standards)Method Comments Should Include:
<p> tags if following Java Coding Standards)Field Comments Should Include:
<p> tags if following Java Coding Standards)For different component types, use appropriate templates from the templates/ directory:
templates/controller-comment-template.md - Controller class commentstemplates/service-comment-template.md - Service interface commentstemplates/serviceimpl-comment-template.md - Service implementation commentstemplates/application-service-comment-template.md - Application Service comments (DDD)templates/domain-service-comment-template.md - Domain Service comments (DDD)templates/feign-service-comment-template.md - Feign Service Interface commentstemplates/mapper-comment-template.md - Mapper commentstemplates/entity-comment-template.md - Entity class commentstemplates/dto-comment-template.md - DTO class commentsNote: All reference documents are located within this skill's directory structure.
When to use Java Coding Standards format:
<p> tags for descriptionsSee the examples/ directory for complete examples:
examples/controller-example.md - Controller commenting exampleexamples/service-example.md - Service commenting exampleexamples/entity-example.md - Entity commenting exampleexamples/full-workflow-example.md - Complete workflow exampleEnglish keywords: java, code comments, javadoc, documentation, class comments, method comments, field comments, code annotation, code documentation, java documentation, add comments, generate comments, document code, code comments java, java code comments, controller comments, service comments, mapper comments, entity comments, dto comments
Chinese keywords (中文关键词): Java 代码注释, 添加注释, 生成注释, 代码注释, 文档注释, JavaDoc, 类注释, 方法注释, 属性注释, 字段注释, 给代码添加注释, 代码文档, Java 文档, 注释生成, 一句话添加注释, Controller 注释, Service 注释, Mapper 注释, Entity 注释, DTO 注释, 代码注解