Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Decides comment intent and content quality, writing bilingual code comments that explain why.
68% 82%+14 ptsof test cases passed
Passed 18 of 22 test cases with the skill, and 15 of 22 without it.
This test ran on v6. v7 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
description: >- 錯誤/不正確/不恰當的註解案例索引: 「錯置類」——註解未緊鄰目標代碼(把宣告註解誤寫成檔頭註解、 與目標宣告之間隔著其他陳述式、放進宣告內部描述整個函式、重構後殘留原地), 「層級錯置」——函式 JSDoc 夾帶描述內部陳述式的實作段落(案例六), 「排版類」——【反模式】長註解按固定字數硬切、句子被切斷(案例七), 以及重構時寫進註解的操作日誌(SSOT 標籤、移動/抽離紀錄、集中動機) 與設計原則口號(漂移、SSOT、移動紀錄、任務報告;關鍵字僅為例示,凡描述代碼被編輯過程者皆屬之)收錄於本檔; 其餘類型(行內註解、假雙語、無意義註解、@property 等)依主題分流至對應參考文件。 tags:
彙整「錯誤/不正確/不恰當的註解」案例:錯置類(註解與目標代碼的綁定錯誤,案例一~四)、 層級錯置(描述內部陳述式的實作段落寫進宣告 JSDoc,案例六)、 排版類(【反模式】長註解按字數硬切,案例七) 與內容類(重構操作日誌與設計原則口號,案例五)收錄於本檔; 其餘類型已各有專屬參考文件,於文末索引分流。
IDE 與 AI 透過「註解緊接的下一個宣告」判斷關聯對象。一旦註解與目標之間插入 import、常數或其他宣告,
關聯就會斷掉或指向錯誤對象——症狀是 IntelliSense 沒有提示、AI 改錯地方。
先分清兩種註解(錯置多半源自混淆兩者):
| 類型 | 位置 | 描述對象 |
|---|---|---|
| 檔頭註解 (file header) | 檔案最上方、import 之上 | 整個檔案(檔案級資訊) |
| 宣告註解 (JSDoc) | 緊鄰單一宣告上方 | 某個 class/function/interface |
判斷方式(依上表): 內容在描述某個宣告(如「單一 ignore 檔案的封裝類別」)→ 這是宣告註解, 必須放在該宣告正上方;不得寫在檔頭位置——即使檔案只有一個 class、看起來很像檔頭。
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.