zxz-test
v1.0.1审查近期代码变更,检查 bug、安全隐患并提出改进建议。针对 git diff 中的暂存或未暂存更改提供可操作的反馈。
Security Scan
OpenClaw
Suspicious
high confidencePurpose & Capability
The name/description and SKILL.md are consistent: the skill is limited to reading recent git changes and producing review comments. However, the metadata lists no required binaries even though the instructions explicitly require running `git diff` (i.e., the skill implicitly needs git and shell access). This is an inconsistency (missing declared dependency).
Instruction Scope
The runtime instructions are narrowly scoped to running `git diff --staged` / `git diff`, analyzing the produced diff, and producing line-specific findings. They do not direct the agent to read unrelated files, environment variables, or to send data to external endpoints. The only scope concern is the un-declared assumption that the agent can execute shell/git in the repository.
Install Mechanism
Instruction-only skill with no install spec or code files — lowest installation risk. Nothing is downloaded or written to disk by an install step.
Credentials
The skill declares no required environment variables or credentials, which is appropriate for a local git diff reviewer. Note: because it reads diffs, it can expose any secrets present in the diff; this is a normal capability for a code-review tool but worth being aware of.
Persistence & Privilege
always is false and there is no install behavior. The skill does not request persistent system presence or attempt to modify other skills or global agent settings.
What to consider before installing
This skill appears to do what it says (review staged/unstaged git diffs), but before installing or invoking it: 1) confirm the agent environment provides git and shell access (the SKILL.md assumes `git diff` will run — the skill metadata should declare git as a required binary); 2) be aware the skill will read your repository's working tree and diffs, so do not run it in a workspace containing secrets you don't want exposed; 3) because it's instruction-only and can execute git, ensure you trust the agent runtime (it will access local files) — if possible, run it in a controlled checkout or CI context; and 4) consider asking the publisher to update the skill metadata to list `git` as a required binary to remove the current inconsistency.Like a lobster shell, security has layers — review code before you run it.
latest
快速代码审查
审查当前代码变更,提供简洁、可操作的反馈。
步骤
-
执行
git diff --staged获取暂存区的变更。如果为空,回退到git diff获取未暂存的变更。如果两者都为空,告知用户没有可审查的变更。 -
按以下分类分析 diff:
Bug 与逻辑错误
- 边界错误、空值访问、竞态条件
- 布尔逻辑错误或遗漏的边界情况
- 资源泄漏(未关闭的句柄、缺失的清理逻辑)
安全问题
- 注入漏洞(SQL、XSS、命令注入)
- 硬编码的密钥或凭证
- 不安全的反序列化或输入处理
性能问题
- 热路径中不必要的内存分配
- N+1 查询或缺失的索引
- 异步上下文中的阻塞调用
代码质量
- 死代码或不可达分支
- 应该复用的重复逻辑
- 具有误导性的命名或不清晰的意图
-
按文件分组展示发现的问题,格式如下:
path/to/file.ext- [Bug] 第 42 行:问题描述及修复建议
- [安全] 第 78 行:问题描述及修复建议
-
最后用一句话总结:发现的问题总数,以及这些变更是否可以安全提交。
准则
- 只标记真实问题,不要挑剔代码风格、格式或提出不必要的建议。
- 要具体——引用 diff 中的确切行号和变量名。
- 如果变更没有问题,简要说明即可,不要凭空制造问题。
- 保持审查简洁,重质量不重数量。
Comments
Loading comments...
