← 返回 Skills 市场
Test And Fix
作者
Bovin Phang
· GitHub ↗
· v1.0.0
· MIT-0
125
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install test-and-fix
功能描述
执行项目校验命令(lint、type-check、test、build),分析失败原因,安全修复问题,并将总结报告保存为 Markdown 文件。当用户要求检查、验证、测试代码改动时自动激活。
使用说明 (SKILL.md)
测试并修复
在以下场景使用该 Skill:
- 用户希望 Claude 对前端改动进行校验
- 重构后需要补一轮安全检查
- 需要修复 lint、类型检查、单测或构建失败的问题
必需流程
- 从 package.json 或仓库文档中识别可用命令。
- 优先按以下顺序执行:
- lint
- type-check
- unit tests
- build
- 仔细阅读失败输出。
- 先做范围最小且正确的修复。
- 每次关键修复后重新执行受影响命令。
- 最后按以下格式总结:
输出格式
# 测试与修复报告
> 生成时间: YYYY-MM-DD HH:mm
> 评审工具: frontend-craft
## 执行结果
| 命令 | 状态 | 说明 |
|------|------|------|
| lint | ✅ 通过 / ❌ 失败 | ... |
| type-check | ✅ 通过 / ❌ 失败 | ... |
| test | ✅ 通过 / ❌ 失败 | ... |
| build | ✅ 通过 / ❌ 失败 | ... |
## 发现的问题与修复
### 问题 1: ...
- **根因**: ...
- **修复**: ...
- **变更文件**: ...
## 剩余风险或未覆盖项
- ...
报告文件输出
修复完成后,必须将报告内容使用 Write 工具保存为 Markdown 文件:
- 目录:项目根目录下的
reports/(如不存在则创建) - 文件名:
test-fix-YYYY-MM-DD-HHmmss.md(使用当前时间戳) - 保存后告知用户报告文件路径
强约束
- 不要盲目关闭规则来消除报错
- 除非有明确理由,不要为了通过检查而降低类型安全
- 不要因为附近测试失败就顺手重写无关模块
安全使用建议
This skill is internally consistent for running checks and making small fixes, but it will modify repository files and create a report in reports/. Before enabling or running it: (1) ensure the agent's write/commit rights are what you expect — prefer a dedicated branch or sandbox so changes can be reviewed; (2) have backups or use a code review/PR workflow so changes are not pushed blindly; (3) be prepared that running tests/builds may require environment variables, secrets, or external services — do not provide sensitive credentials unless you trust the agent and review requests; (4) confirm what the platform 'Write' tool does (where files are saved and whether changes are committed); and (5) if you want stricter control, instruct the agent to open a patch/PR rather than directly committing changes.
功能分析
Type: OpenClaw Skill
Name: test-and-fix
Version: 1.0.0
The skill bundle is a standard developer utility designed to automate linting, type-checking, testing, and building processes. The instructions in SKILL.md guide the agent to identify commands from package.json, perform minimal fixes, and generate a report in the reports/ directory. There are no indicators of malicious intent, data exfiltration, or unauthorized command execution beyond the stated purpose of project validation.
能力评估
Purpose & Capability
The name/description match the runtime instructions: identify available commands (package.json or docs), run lint/type-check/tests/build, analyze failures, apply minimal fixes, and save a Markdown report. It doesn't request unrelated binaries, credentials, or installs.
Instruction Scope
SKILL.md directs the agent to read package.json, run project checks, modify project files to fix issues, and create a reports/ Markdown file via a 'Write' tool. This stays within the stated purpose, but it grants the agent broad discretion to edit source files (no explicit constraints like 'make edits in a branch' or 'open a PR'). The doc also doesn't mention handling tests that require external services or secrets (databases, API keys), which may come up at runtime.
Install Mechanism
No install spec and no code files — instruction-only skill. No downloads or package installs are requested.
Credentials
The skill declares no environment variables or credentials, which is proportional to its stated task. Be aware that running tests or builds in some projects may require environment variables or service credentials at runtime; the instructions do not request or document those, so the agent may need to prompt for them.
Persistence & Privilege
always is false and nothing requests permanent platform-level privileges. The skill writes report files to the project (reports/), which is appropriate for its function; it does not modify other skills or system-wide configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install test-and-fix - 安装完成后,直接呼叫该 Skill 的名称或使用
/test-and-fix触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Version 1.1.0
- 全新增加自动化测试与修复流程,自动激活于校验、验证、测试等需求场景。
- 执行 lint、type-check、unit test、build 等命令,按顺序定位与修复常见问题。
- 生成详细的修复报告(Markdown 格式),包含执行结果、发现的问题、风险与修复明细。
- 修复报告自动存储于项目根目录的 reports 目录,附带时间戳,便于追踪记录。
- 强化改动约束,防止为消除报错盲目关闭规则或降低类型安全。
元数据
常见问题
Test And Fix 是什么?
执行项目校验命令(lint、type-check、test、build),分析失败原因,安全修复问题,并将总结报告保存为 Markdown 文件。当用户要求检查、验证、测试代码改动时自动激活。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 125 次。
如何安装 Test And Fix?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install test-and-fix」即可一键安装,无需额外配置。
Test And Fix 是免费的吗?
是的,Test And Fix 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Test And Fix 支持哪些平台?
Test And Fix 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Test And Fix?
由 Bovin Phang(@bovinphang)开发并维护,当前版本 v1.0.0。
推荐 Skills