From flutter-dev-tools
Add Chinese comments to Dart 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
/flutter-dev-tools:code-noteThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **中文环境要求**
中文环境要求
本技能运行在中文环境下,请遵循以下约定:
- 面向用户的回复、注释、提示信息必须使用中文
- AI 内部处理过程可以使用英文
- 所有生成的文件必须使用 UTF-8 编码
为 Flutter 项目的 Dart 源文件添加中文注释。
/fdt:code-note AlbumPage/fdt:code-note login_page.dart给 AlbumPage 添加注释帮我给这个文件写上注释| Parameter | Description |
|---|---|
文件名 | 要添加注释的文件名(支持 .dart),可带或不带扩展名 |
Use Glob to find the file:
**/*{FileName}.dart
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:
///) for method documentation// for inline explanationsComment Types:
/// 类/方法说明
/// [paramName] 参数说明
/// 返回值说明
// 单行注释说明关键逻辑
/// 成员变量说明
final String variable;
Use Edit tool to add comments without modifying code logic.
| Priority | Element | Example |
|---|---|---|
| High | Public methods | void deleteUser() |
| High | Complex logic | Nested conditions, algorithms |
| High | Build methods | Widget build(BuildContext context) |
| Medium | Class members | final ScrollController _controller |
| Medium | Private methods | void _calculate() |
| Medium | State lifecycle | initState(), dispose() |
| Low | Self-explanatory code | title: Text('Hello') |
/// 相册页面
/// 展示用户拍摄的照片/视频列表,支持查看详情、设为壁纸等功能
class AlbumPage extends StatefulWidget {
/// 照片数据列表
final List<PhotoEntity> _photos = [];
/// 相册列表适配器
late AlbumAdapter _adapter;
/// 重新发布
/// [entity] 照片实体
/// [context] 上下文
/// [onStatusChange] 状态变化回调
Future<void> repost(
PhotoEntity entity,
BuildContext context,
VoidCallback onStatusChange,
) async {
// 根据上传状态显示不同提示
switch (status) {
// 未上传状态
case UploadStatus.idle:
// ...
// 上传中状态
case UploadStatus.uploading:
// ...
// 上传失败状态
case UploadStatus.failed:
// ...
}
/// for method/class docs, // for inlineProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, 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.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub adzcsx2/flutter-claude-skill --plugin flutter-dev-tools