← スキル一覧に戻る

code-commenter
by shrek82
golang orm
⭐ 0🍴 0📅 2026年1月18日
SKILL.md
name: "code-commenter" description: "Adds detailed comments to code files. Invoke when user asks to add comments, document code, or explain code. RULES: Core methods=English, Tests=Chinese."
Code Commenter Skill
This skill specializes in adding meaningful, high-quality comments to source code, with specific language rules for production vs. test code.
Goals
- Documentation: Ensure core and main methods have proper documentation.
- Clarification: Add inline comments to explain complex logic in core methods.
- Test Context: clearly explain test scenarios and verification steps.
Guidelines
1. Production Code (Core & Main Methods) -> ENGLISH
- Target: ONLY add comments to Core Methods (critical logic, interfaces, complex algorithms) and Main Methods (entry points, public APIs).
- Language: ENGLISH ONLY.
- Style:
- Exported methods: GoDoc style (e.g.,
// FunctionName does X...). - Complex logic: Concise inline English explanations.
- Exported methods: GoDoc style (e.g.,
- Skip: Trivial getters/setters, simple logic, or boilerplate.
2. Test Code (Test Cases) -> CHINESE
- Target: Every added or modified test case/function.
- Language: CHINESE ONLY.
- Content:
- Explain the Scenario (测试场景).
- Explain the Verification Logic (验证逻辑).
- Explain any Mock Data purpose (模拟数据用途).
- Example:
// TestUserLogin_Success 测试用户成功登录的场景 // 步骤: // 1. 模拟数据库返回有效用户 // 2. 调用 Login 方法 // 3. 验证返回的 Token 不为空 func TestUserLogin_Success(t *testing.T) { ... }
3. General Rules
- No Logic Changes: strictly ONLY add comments. Do not modify the code structure or logic.
- Conciseness: Avoid redundant comments (e.g.,
i++ // increment i).
Process
- Identify Type: Is this Production Code or Test Code?
- Select Language: English for Production (Core/Main), Chinese for Tests.
- Filter: For Production, only target Core/Main methods. For Tests, target all modified cases.
- Apply: Insert comments.
Example Interaction
User: "Add comments to this PR." Agent:
- Finds
core/user.go: Adds English comments toLoginandRegister(Core methods). - Finds
core/user_test.go: Adds Chinese comments toTestLoginexplaining the test steps.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です