首页龙虾技能列表 › Test Generator — 技能工具

Test Generator — 技能工具

v2.0.1

[自动翻译] Automated test case generator. Unit tests, integration tests, end-to-end tests, mock objects, test fixtures, coverage analysis, edge case generation.

0· 1,100·0 当前·0 累计
by @ckchzh·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/18
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
medium confidence
The skill appears to do what it says (generate test templates and provide a small CLI), but there are small documentation mismatches and a truncated source file in the package that limits a complete review.
评估建议
This skill is generally coherent with its purpose: it generates test templates and provides a simple CLI that logs entries to a data directory. Before installing, consider: 1) Review the full scripts/test-generator.sh file — the provided bundle is truncated in the review copy, so unseen code could change the assessment. 2) Be aware the tool writes to ~/.local/share/test-generator (or TEST_GENERATOR_DIR) and appends every invocation to history.log; if you prefer not to keep command history, set a...
详细分析 ▾
用途与能力
Name/description match the provided scripts: scripts produce unit/integration/e2e/mock test templates and a small CLI for logging data. However, SKILL.md claims "pure bash, no external dependencies" while scripts (scripts/test-generator.sh) use python3 heredocs to render templates. The mismatch is likely a documentation oversight but is worth noting.
指令范围
SKILL.md instructs only CLI usage and setting TEST_GENERATOR_DIR; the runtime scripts only read/write files within the tool's data directory and append to a history.log. The tool does not itself make network calls or request secrets. Generated test templates reference external frameworks/endpoints (pytest, jest, Playwright, selenium, database connections, localhost:3000) but those are artifacts for the user to run later — the skill does not execute them. A portion of scripts/test-generator.sh is truncated in the provided bundle, preventing a full line-by-line review of all runtime behavior.
安装机制
No install spec is present (instruction-only install), so nothing is downloaded at install time. The packaged scripts live in the skill bundle; there are no external install URLs or extraction steps.
凭证需求
The skill requests no environment variables or credentials. It uses TEST_GENERATOR_DIR (or XDG_DATA_HOME/HOME) for data storage which is proportional to a CLI data-logging tool. It writes only to its own data directory and history.log; no unrelated secrets or system config paths are requested.
持久化与权限
always:false and no special privileges requested. The skill writes files only under its own data directory (~/.local/share/test-generator by default) and does not modify other skills or system-wide agent settings.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv2.0.12026/3/18
● 无害

安装命令 点击复制

官方npx clawhub@latest install test-generator
镜像加速npx clawhub@latest install test-generator --registry https://cn.clawhub-mirror.com

技能文档

A general-purpose CLI utility tool for data entry, management, and retrieval. Provides commands to run tasks, configure settings, check status, initialize the workspace, list/add/remove/search entries, export data, and view system info — all from the terminal.

Command Reference

The script (test-generator) supports the following commands via its case dispatch:

CommandDescriptionExample Output
run Execute the main function with a given argumentRunning:
configShow configuration file pathConfig: $DATA_DIR/config.json
statusDisplay current operational statusStatus: ready
initInitialize the data directory and workspaceInitialized in $DATA_DIR
listList all entries from the data logPrints contents of data.log or (empty)
add Add a new timestamped entry to the data logAdded:
remove Remove an entry from the data logRemoved:
search Search entries in the data log (case-insensitive)Matching lines or Not found:
exportExport all data log contents to stdoutFull contents of data.log
infoShow version and data directory pathVersion: 2.0.0 \Data: $DATA_DIR
helpShow full help text with all commands
versionPrint version stringtest-generator v2.0.0

Data Storage

  • Data directory: $TEST_GENERATOR_DIR or ~/.local/share/test-generator/
  • Data log: $DATA_DIR/data.log — stores all entries added via the add command, each prefixed with a date stamp
  • History log: $DATA_DIR/history.log — every command invocation is timestamped and logged for auditing
  • All directories are auto-created on first run via mkdir -p

Requirements

  • Bash 4+ (uses set -euo pipefail)
  • No external dependencies — pure bash, no API keys, no network calls
  • Works on Linux and macOS
  • grep (for the search command)

When to Use

  • Quick data logging — Need to record notes, test results, or observations from the command line? Use test-generator add "your note here" for instant timestamped logging.
  • Simple searchable notebook — Accumulated entries can be searched with test-generator search , making it a lightweight grep-able journal for tracking test runs or results.
  • Data export for pipelines — Use test-generator export to pipe all logged data into downstream tools or redirect to a file for reporting.
  • System status checks in scriptstest-generator status provides a quick health-check output suitable for CI/CD monitoring scripts or cron jobs.
  • Workspace initialization — Run test-generator init when setting up a new machine or environment to bootstrap the data directory structure.

Examples

Initialize the workspace

test-generator init
# Output: Initialized in /home/user/.local/share/test-generator

Add entries

test-generator add "Unit test suite passed - 47 tests, 0 failures"
# Output: Added: Unit test suite passed - 47 tests, 0 failures

test-generator add "Integration test: API endpoint /users returned 200" # Output: Added: Integration test: API endpoint /users returned 200

List all entries

test-generator list
# Output:
# 2026-03-18 Unit test suite passed - 47 tests, 0 failures
# 2026-03-18 Integration test: API endpoint /users returned 200

Search entries

test-generator search "API"
# Output: 2026-03-18 Integration test: API endpoint /users returned 200

Check status and info

test-generator status
# Output: Status: ready

test-generator info # Output: Version: 2.0.0 | Data: /home/user/.local/share/test-generator

Configuration

Set the TEST_GENERATOR_DIR environment variable to change the data directory:

export TEST_GENERATOR_DIR="/path/to/custom/dir"

Default: ~/.local/share/test-generator/


Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务