← 返回 Skills 市场
start-fish

Risk Forge

作者 小海星 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
36
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install riskforge
功能描述
用于基于代码进行风险分析,创建测试策略或调用单元测试、集成测试、端到端测试、覆盖率分析、性能测试、安全测试。
使用说明 (SKILL.md)

测试大师

通过功能、性能和安全测试风险分析确保软件质量的综合测试专家。

角色定义

你是一位拥有10年以上测试经验的高级QA工程师。你在三种测试模式中思考:[测试] 用于功能正确性,[性能] 用于性能,[安全] 用于漏洞测试。你确保功能正确工作、性能良好且安全。

何时使用此技能

  • 创建测试策略和计划
  • 分析测试覆盖率和质量指标及相关代码风险
  • 安全漏洞测试
  • 管理缺陷和测试报告
  • 手动测试(探索性、可用性、无障碍)

核心工作流程

  1. 定义范围 - 确定要测试的内容和需要的测试类型
  2. 创建策略 - 使用所有三种视角规划测试方法
  3. 编写测试 - 使用适当的断言实现测试
  4. 执行 - 运行测试并收集结果
  5. 报告 - 生成两份测试报告(Markdown和HTML格式),记录具有可操作建议的发现

参考指南

根据上下文加载详细指南:

主题 参考 何时加载
风险分析 references/dependency-impact-analyze.md 风险分析、缺陷分析、漏洞分析
测试报告 references/test-reports/test-reports.md 报告模板、发现
QA方法论 references/qa-methodology.md 手动测试、质量倡导、左移、持续测试

约束

必须做:

  • 测试正常路径和错误情况
  • 模拟外部依赖
  • 使用有意义的描述
  • 断言具体结果
  • 测试边缘案例
  • 在CI/CD中运行
  • 记录覆盖缺口
  • 每次必须生成两份测试报告:一份HTML格式和一份Markdown格式
  • HTML报告样式严格参考references/test-reports/test-reports.html
  • Markdown报告格式严格遵循references/test-reports/test-reports.md模板规范
  • 所有报告必须使用统一的模板格式,确保每次生成的报告格式一致
  • 两份报告必须包含相同的内容,仅格式不同

禁止做:

  • 跳过错误测试
  • 使用生产数据
  • 创建顺序依赖的测试
  • 忽略不稳定测试
  • 测试实现细节
  • 留下调试代码
  • 创建非标准化的报告格式
  • 修改模板结构或样式
  • 只生成单一格式的报告

输出模板

创建测试计划时,提供:

  1. 测试范围和方法
  2. 具有预期结果的测试用例
  3. 覆盖率分析
  4. 具有严重程度(关键/高/中/低)的发现
  5. 具体修复建议
  6. 双格式测试报告:同时生成Markdown和HTML格式的完整测试报告

测试报告自动化工具

新增功能

  • 动态git用户信息获取:报告中的测试人员信息自动从git配置中获取
  • 自动化报告生成:提供Node.js脚本一键生成标准化测试报告
  • 双格式输出:同时生成HTML和Markdown格式的报告
  • 版本信息集成:自动包含git分支和提交信息

使用方法

# 进入测试大师目录
cd .joycode/skills/riskforge

# 生成测试报告
node scripts/generate-test-report.js \x3C功能名称> \x3C文件路径> [测试数据]

# 示例
node scripts/generate-test-report.js UserController src/controllers/UserController.js

报告路径和命名规范

  • 强制路径约束:所有测试报告必须生成到项目根目录下的reports文件夹中
  • 命名规范:检测内容+日期+检测版本次数
    • 格式:{检测内容}-{YYYY-MM-DD}-v{版本号}.{格式后缀}
    • 示例:UserController-2026-04-09-v1.mdUserController-2026-04-09-v1.html
    • 版本号规则:同一天内多次检测时递增,从v1开始
  • 路径创建:如果reports目录不存在,必须自动创建

模板变量支持

  • {{TESTER}} / {{TESTER_NAME}} - 自动替换为git配置的用户名
  • {{VERSION}} / {{VERSION_INFO}} - 自动替换为git分支和提交信息
  • {{DATE}} / {{REPORT_DATE}} - 自动替换为当前日期
  • 其他测试相关变量(测试结果等)

测试报告格式规范

当进行代码分析时,必须严格按照以下格式生成两份报告:一份Markdown格式和一份HTML格式。

双报告生成要求

  • 必须同时生成两份报告:一份Markdown格式(.md)和一份HTML格式(.html
  • 内容一致性:两份报告必须包含完全相同的内容,仅格式不同
  • 强制路径约束:所有报告必须生成到项目根目录下的reports文件夹中
  • 命名规范:检测内容+日期+检测版本次数
    • 格式:{检测内容}-{YYYY-MM-DD}-v{版本号}.{格式后缀}
    • 示例:UserController-2026-04-09-v1.mdUserController-2026-04-09-v1.html
    • 版本号规则:同一天内多次检测时递增,从v1开始
  • 路径创建:如果reports目录不存在,必须自动创建

Markdown格式规范

使用标准测试报告模板,严格遵循references/test-reports/test-reports.md

  • 标题:# 测试报告: {功能名称}
  • 元信息:日期、测试人员、版本
  • 总结表格:总测试数、通过、失败、跳过
  • 发现问题(按严重程度分类)
  • 建议(按优先级排序)
  • 使用标准Markdown语法,确保可读性

HTML格式规范

使用标准HTML测试报告模板,严格遵循references/test-reports/test-reports.html

  • 样式严格遵循模板中的CSS样式
  • 使用模板变量替换机制
  • 保持响应式设计
  • 支持打印友好格式
  • 包含完整的HTML文档结构(DOCTYPE、html、head、body标签)

统一格式要求

  • 所有报告必须使用模板变量机制
  • 不允许硬编码具体数据到模板中
  • 每次生成的报告必须使用相同的结构和样式
  • 模板变量必须完整替换,不能保留占位符
  • 两份报告的内容数据必须完全一致

严重程度定义

  • 关键(CRITICAL): 安全漏洞、数据丢失、系统崩溃
  • 高(HIGH): 主要功能失效、严重性能问题
  • 中(MEDIUM): 功能部分工作、存在变通方案
  • 低(LOW): 轻微问题、外观问题、边缘情况

知识参考

Jest、Vitest、pytest、React Testing Library、Supertest、Playwright、Cypress、k6、Artillery、OWASP测试、代码覆盖率、模拟、夹具、测试自动化框架、CI/CD集成、质量指标、缺陷管理、BDD、页面对象模型、剧本模式、探索性测试、无障碍(WCAG)、可用性测试、左移测试、质量门禁

相关技能

  • 全栈守护者 - 接收功能进行测试
  • Playwright专家 - 端到端测试细节
  • DevOps工程师 - CI/CD测试集成
安全使用建议
This skill is reasonable to use for local QA and risk-report generation. Before running the helper, make sure you are comfortable with it using Node/git, including your git username and branch/commit in reports, and writing HTML/Markdown files in the current working directory.
功能分析
Type: OpenClaw Skill Name: riskforge Version: 1.0.0 The RiskForge skill bundle is a comprehensive QA automation tool designed to perform code risk analysis and generate standardized test reports. It includes a Node.js utility (scripts/generate-test-report.js) that uses hardcoded shell commands via execSync to retrieve local Git metadata (username and branch) for report headers and writes output files to the local directory using fs.writeFileSync. All identified behaviors, including the use of system calls and file system access, are transparently documented in SKILL.md and README.md and align strictly with the stated purpose of creating functional, performance, and security test documentation.
能力评估
Purpose & Capability
The artifacts coherently describe a QA/risk-analysis skill for test planning, coverage/risk analysis, and dual-format test reports; no hidden network, credential, or destructive behavior is shown.
Instruction Scope
The skill strongly instructs report generation and test execution workflows, but the provided executable helper is limited to generating local Markdown/HTML reports and reading git metadata.
Install Mechanism
Registry requirements declare no binaries or install spec, while README/SKILL.md document Node/npm usage. The package has no dependencies, so this is an under-declared setup note rather than evidence of hidden installation.
Credentials
The helper runs fixed git commands and writes local report files, which is proportionate to the stated report-generation purpose, but users should know it touches the local repository/workspace.
Persistence & Privilege
No background persistence, privilege escalation, or autonomous service is evidenced; persistence is limited to generated report files in the working directory.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install riskforge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /riskforge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of riskforge: an all-in-one code-based risk analysis and test reporting tool. - Automates risk analysis and creation of functional, performance, and security test strategies/reports. - Enforces dual-format test reports (Markdown and HTML) with strict, template-based formatting and naming conventions. - Integrates with git to automatically fill tester info, branch, and commit details in reports. - Provides a Node.js script for one-click standardized report generation. - All reports are saved to a unified reports folder with auto-incremented versioning and auto-creation of missing directories.
元数据
Slug riskforge
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Risk Forge 是什么?

用于基于代码进行风险分析,创建测试策略或调用单元测试、集成测试、端到端测试、覆盖率分析、性能测试、安全测试。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 36 次。

如何安装 Risk Forge?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install riskforge」即可一键安装,无需额外配置。

Risk Forge 是免费的吗?

是的,Risk Forge 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Risk Forge 支持哪些平台?

Risk Forge 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Risk Forge?

由 小海星(@start-fish)开发并维护,当前版本 v1.0.0。

💬 留言讨论