← 返回 Skills 市场
sky-lv

Skylv Test Case Generator

作者 SKY-lv · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
47
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install skylv-test-case-generator
功能描述
Auto-generates unit tests and integration tests from source code. Supports Jest, Pytest, Mocha. Triggers: write tests, generate tests, unit test, test covera...
使用说明 (SKILL.md)

Test Writer

Overview

Analyzes source code and auto-generates comprehensive unit and integration tests.

When to Use

  • User asks to "write tests" or "add test coverage"
  • User wants to "test this function"

How It Works

Step 1: Detect test framework

Check: package.json (jest/mocha), pytest.ini, pyproject.toml, conftest.py

Step 2: Parse source

Read source files. Identify: function signatures, parameters, return types, error handling, edge cases.

Step 3: Generate test cases

For each function generate: happy path, edge cases (empty/null/zero), error cases, boundary cases.

Step 4: Write test file

JavaScript: tests/filename.test.js or filename.test.js Python: tests/test_filename.py

Templates

Jest

describe('functionName', () => { test('should return expected result', () => { expect(functionName(input)).toBe(expected); }); test('should throw for invalid input', () => { expect(() => functionName(invalid)).toThrow(); }); });

Pytest

def test_function_normal(): assert function_name(input) == expected

def test_function_invalid(): with pytest.raises(ErrorType): function_name(invalid)

Tips

  • Target 80%+ coverage on critical functions
  • Cover all branches and error paths
  • Mock external dependencies (API, filesystem, DB)
安全使用建议
This appears safe for a test-generation workflow. Install it if you are comfortable with the assistant reading source files and creating test files, and review all generated tests before execution or commit.
功能分析
Type: OpenClaw Skill Name: skylv-test-case-generator Version: 1.0.0 The skill bundle is a standard utility for generating unit and integration tests in JavaScript and Python. The instructions in SKILL.md are purely functional, guiding the AI agent to detect frameworks, parse source code, and apply standard testing templates (Jest/Pytest) without any evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
The stated purpose is to generate unit and integration tests, and the instructions focus on detecting test frameworks, reading source structure, and creating test files.
Instruction Scope
The skill instructs the agent to read project files and write test files; this is expected for test generation, but users should review generated changes before running or committing them.
Install Mechanism
No install specification, required binaries, environment variables, credentials, or code files are present.
Credentials
The requested local project access is proportionate to generating tests and there is no evidence of external transmission or unrelated system access.
Persistence & Privilege
The artifacts do not describe background execution, persistent memory, privilege escalation, or ongoing autonomous behavior.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install skylv-test-case-generator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /skylv-test-case-generator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Test Writer (skylv-test-writer) version 1.0.0 - Auto-generates unit and integration tests for JavaScript and Python code - Supports Jest, Pytest, and Mocha frameworks; detects relevant config files automatically - Handles happy path, edge, error, and boundary cases for test generation - Provides templates and tips to maximize coverage and robustness - Triggers: "write tests", "generate tests", "test coverage", "testing scaffold"
元数据
Slug skylv-test-case-generator
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Skylv Test Case Generator 是什么?

Auto-generates unit tests and integration tests from source code. Supports Jest, Pytest, Mocha. Triggers: write tests, generate tests, unit test, test covera... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 47 次。

如何安装 Skylv Test Case Generator?

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

Skylv Test Case Generator 是免费的吗?

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

Skylv Test Case Generator 支持哪些平台?

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

谁开发了 Skylv Test Case Generator?

由 SKY-lv(@sky-lv)开发并维护,当前版本 v1.0.0。

💬 留言讨论