From android-dev-tools
Add Chinese comments to Kotlin/Java source files. Supports classes, methods, member variables, and key logic blocks. Comments are concise but comprehensive.
How this skill is triggered — by the user, by Claude, or both
Slash command
/android-dev-tools:code-noteThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **中文环境要求**
中文环境要求
本技能运行在中文环境下,请遵循以下约定:
- 面向用户的回复、注释、提示信息必须使用中文
- 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 -> { ... }
}
npx claudepluginhub adzcsx2/android-claude-skills --plugin android-dev-toolsAutomatically generates documentation comments and docstrings for code functions/classes, matching project style or language conventions like Google/NumPy for Python, JSDoc for JS/TS, godoc for Go.
Generates standard Javadoc comments for Java classes, interfaces, methods, and fields. Useful when adding documentation to Java code on requests like 'add javadoc' or 'document this class'.
Adds section-level comments to code files capturing intent, rationale, gotchas, and architecture for LLM context preservation across sessions. Invoke via 'literatize', 'add literate comments', or 'annotate this file'.