闲社服务运行正常AI智能体自动化平台
e

Elixir代码审查

技能标识:elixir-code-review

Reviews Elixir code for idiomatic patterns, OTP basics, and documentation. Use when reviewing .ex/.exs files, checking pattern matching, GenServer usage, or module documentation.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.2.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

Elixir代码审查

Elixir 代码审查

快速参考

问题类型参考文档
命名、格式、模块结构references/code-style.md
With子句、守卫、解构
references/pattern-matching.md | | GenServer、Supervisor、Application | references/otp-basics.md | | @moduledoc、@doc、@spec、doctests | references/documentation.md |

审查清单

代码风格

  • - [ ] 模块名使用大驼峰命名,函数名使用蛇形命名
  • [ ] 管道链以原始数据开头,而非函数调用
  • [ ] 私有函数分组在公有函数之后
  • [ ] 无参数函数调用中不使用不必要的括号

模式匹配

  • - [ ] 函数在适当情况下使用模式匹配而非条件判断
  • [ ] With子句包含错误情况的else处理
  • [ ] 尽可能使用守卫而非运行时检查
  • [ ] 解构在函数头部而非函数体内使用

OTP基础

  • - [ ] GenServers使用handle_continue处理耗时的初始化工作
  • [ ] Supervisors使用适当的重启策略
  • [ ] GenServer回调中无阻塞调用
  • [ ] 正确使用call与cast(同步与异步)

文档

  • - [ ] 所有公有函数包含@doc和@spec
  • [ ] 模块包含描述其用途的@moduledoc
  • [ ] 纯函数在适当情况下包含doctests
  • [ ] 真正公有函数不使用@doc false

安全性

  • - [ ] 不对用户输入使用String.toatom/1(使用toexistingatom/1)
  • [ ] 不对不可信输入使用Code.evalstring/1
  • [ ] 不使用不带:safe选项的:erlang.binarytoterm/1

有效模式(请勿标记)

  • - 用于模式匹配的空函数子句 - def foo(nil), do: nil 是有效的守卫
  • 对单一转换使用|> - 可读性选择,并非错误
  • 回调实现上的@doc false - 回调在行为层面已记录文档
  • 无@spec的私有函数 - 内部函数@spec为可选
  • 使用Kernel.apply/3 - 对已知模块/函数进行动态分派有效

上下文敏感规则

问题仅在以下情况标记
缺少@spec函数是公有的且已导出
通用rescue
存在特定异常类型 | | 嵌套case/cond | 超过2层深度 |

何时加载参考文档

  • - 审查模块/函数命名 → code-style.md
  • 审查with/case/cond语句 → pattern-matching.md
  • 审查GenServer/Supervisor代码 → otp-basics.md
  • 审查@doc/@moduledoc → documentation.md

提交发现前

在报告任何问题前,请加载并遵循审查验证协议。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 elixir-code-review-1776115931 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 elixir-code-review-1776115931 技能

通过命令行安装

skillhub install elixir-code-review-1776115931

下载

⬇ 下载 elixir-code-review v1.2.0(免费)

文件大小: 6.57 KB | 发布时间: 2026-4-14 12:00

v1.2.0 最新 2026-4-14 12:00
Elixir Code Review Skill 1.2.0 – Enhanced guidance and checklist for reviewing Elixir code.

- Adds a comprehensive SKILL.md including idiomatic patterns, OTP basics, and documentation standards.
- Features a detailed, easy-to-follow review checklist covering style, pattern matching, OTP, documentation, and security.
- Includes a table of context-sensitive rules and clearly marked valid patterns that should not be flagged.
- Provides quick-reference links to core Elixir code review resources for targeted evaluation.
- Requires following a review verification protocol before submitting any findings.
返回顶部