SKILL

concise-comments

简洁代码注释和文档字符串的规则,并提供精简冗长内容的处理。适用于编写或审查代码,或被要求减少注释冗余、精简过度注释的代码、压缩膨胀的文档字符串时。由 /la:pr 和 /la:process-reviews 引用。

译文已校对
查看英文原文

Rules for concise code comments/docstrings, plus a pass to trim verbose ones. Use when writing or reviewing code, or when asked to reduce comment verbosity / trim over-commented code / cut docstring bloat. Referenced by /la:pr and /la:process-reviews.

适用对象:软件开发与测试。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Concise comments & docstrings
  • The test
  • For / not for
  • Limits (defaults; exceed only with a stated reason)
  • Delete on sight
  • The pass (/la:concise-comments)

Preflight: run la-doctor --plugin once per session before using any la- or dr- command; if it fails, stop and show the user its output. Prevention: follow these when writing. Cleanup: run the pass below when invoked as /la:concise-comments. Keep a comment only if a competent reader of THIS codebase couldn't infer it from the code and names. Otherwise delete it, or cut it to the one missing fact in one line. For: the non-obvious why (constraint, invariant, footgun, edge-case gotcha) and a one-line what on public APIs. Not for: design narrative, alternatives-considered, defending the approach, repro steps, byte-count walkthroughs, ticket history, or restating the code. Those go in the PR description, the issue, or a test. Inline comment: 1 line. Needing 3+ lines to justify a line of code → rename things or move the rationale out. Function/method docstring: 1-line summary; +≤3 lines only for genuinely subtle behaviour. Module docstring: ≤8 lines. Test docstring: 1 line, or none if the name says it. Section banner: ≤1 label line, no --- paragraphs. Say it once at the definition; don't re-explain at every call site. Restates the code (# strip prefix above x.split(...)). Ticket-ID noise

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
MotleyAI/living-architecture
源文件
plugin/skills/concise-comments/SKILL.md
固定版本
d515fa3449c9734b464fc67d231a6e6b051106fc
阅读完整原作者说明 ↗

准备条件

  • 本条仅收录原作者的技能元数据;请阅读完整说明,确认依赖、许可与使用条件。

第一件可以尝试的小事

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

对应 AI 工具说明

作者有说明不等于本站实机验证。没有证据时,不自动标为兼容、安全或免费。

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:MotleyAI/living-architecture · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T18:02:05.973Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。