Add Chinese comments to Kotlin/Java source files. Supports classes, methods, member variables, and key logic blocks. Comments are concise but comprehensive.
From android-dev-toolsnpx claudepluginhub adzcsx2/android-claude-skills --plugin android-dev-toolsThis skill uses the workspace's default tool permissions.
README.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
中文环境要求
本技能运行在中文环境下,请遵循以下约定:
- 面向用户的回复、注释、提示信息必须使用中文
- AI 内部处理过程可以使用英文
- 所有生成的文件必须使用 UTF-8 编码
为 Android 项目的 Kotlin/Java 源文件添加中文注释。
/code-note AlbumActivity| Parameter | Description |
|---|---|
文件名 | 要添加注释的文件名(支持 .kt/.java),可带或不带扩展名 |
Use Glob to find the file:
# Kotlin file
**/*{FileName}.kt
# Java file
**/*{FileName}.java
If multiple matches found, list them and ask user to select.
Read the entire file to understand:
Identify elements that need comments:
Follow these rules:
Style Guidelines:
Comment Types:
/**
* 类/方法说明
* @param paramName 参数说明
* @return 返回值说明
*/
// 单行注释说明关键逻辑
/** 成员变量说明 */
private var variable: Type
Use Edit tool to add comments without modifying code logic.
| Priority | Element | Example |
|---|---|---|
| High | Public methods | fun deleteUser() |
| High | Complex logic | Nested conditions, algorithms |
| Medium | Class members | private val adapter |
| Medium | Private methods | private fun calculate() |
| Low | Self-explanatory code | binding.tvTitle.text = title |
/**
* 相册页面
* 展示用户拍摄的照片/视频列表,支持查看详情、设为壁纸、重新上链等功能
*/
class AlbumActivity : BaseActivity<ActivityAlbumBinding>() {
/** 照片数据列表 */
val mData: ArrayList<PhotoEntity> = arrayListOf()
/** 相册列表适配器 */
private val mAdapter = object : RecyclerView.Adapter<ViewHolder>() {
/**
* 重新上链发布
* @param entity 照片实体
* @param activity 宿主Activity
* @param statusChangeListener 状态变化回调
*/
fun repost(entity: PhotoEntity, activity: AppCompatActivity, statusChangeListener: () -> Unit) {
// 根据上链状态显示不同提示
when (status) {
// 未上链状态
Status.UNPOST -> { ... }
// 上链中状态
Status.POSTING -> { ... }
// 上链失败状态
Status.POST_FAIL -> { ... }
}