← Back to Skills Marketplace
Test And Fix
by
Bovin Phang
· GitHub ↗
· v1.0.0
· MIT-0
125
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install test-and-fix
Description
执行项目校验命令(lint、type-check、test、build),分析失败原因,安全修复问题,并将总结报告保存为 Markdown 文件。当用户要求检查、验证、测试代码改动时自动激活。
README (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(使用当前时间戳) - 保存后告知用户报告文件路径
强约束
- 不要盲目关闭规则来消除报错
- 除非有明确理由,不要为了通过检查而降低类型安全
- 不要因为附近测试失败就顺手重写无关模块
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install test-and-fix - After installation, invoke the skill by name or use
/test-and-fix - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Version 1.1.0
- 全新增加自动化测试与修复流程,自动激活于校验、验证、测试等需求场景。
- 执行 lint、type-check、unit test、build 等命令,按顺序定位与修复常见问题。
- 生成详细的修复报告(Markdown 格式),包含执行结果、发现的问题、风险与修复明细。
- 修复报告自动存储于项目根目录的 reports 目录,附带时间戳,便于追踪记录。
- 强化改动约束,防止为消除报错盲目关闭规则或降低类型安全。
Metadata
Frequently Asked Questions
What is Test And Fix?
执行项目校验命令(lint、type-check、test、build),分析失败原因,安全修复问题,并将总结报告保存为 Markdown 文件。当用户要求检查、验证、测试代码改动时自动激活。 It is an AI Agent Skill for Claude Code / OpenClaw, with 125 downloads so far.
How do I install Test And Fix?
Run "/install test-and-fix" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Test And Fix free?
Yes, Test And Fix is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Test And Fix support?
Test And Fix is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Test And Fix?
It is built and maintained by Bovin Phang (@bovinphang); the current version is v1.0.0.
More Skills