Unit Test Automation
PassAudited by ClawScan on May 10, 2026.
Overview
This skill is a coherent frontend unit-test setup helper, but it will modify project files, install packages, add Claude command prompts, and create a Git hook that users should review.
Before installing, review the generated package.json/lockfile changes, Vitest config, .claude/commands files, and .husky/pre-commit hook. Leave AUTO_GEN_TEST disabled unless you intentionally want commits to trigger Claude-based test generation.
Findings (4)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
The setup may install packages and run local commands in the project directory.
The skill intentionally runs local package-manager and Git commands. This is expected for test setup, but users should notice because it can change project dependencies and inspect repository state.
**Shell Execution**: Runs `npm/yarn/pnpm` commands to install dependencies, and runs `git` commands to detect staged files.
Run it only in the intended project, review dependency and lockfile changes, and confirm generated files before committing.
New third-party development dependencies may be added to the project.
The skill installs third-party testing packages without pinned versions in the instructions. This is normal for frontend setup, but it relies on the package registry and the project’s package manager behavior.
Install dev dependencies (`-D`) using the corresponding package manager. Skip already-installed dependencies.
Review package.json and lockfile diffs after setup, and pin or audit dependency versions according to the project’s standards.
Invoking the generated command may cause Claude Code to read substantial project source code to create tests.
The generated Claude command can scan the project’s source directory by default when invoked. This is purpose-aligned for test generation, but it may expose source code to the agent/provider during command use.
**No arguments**: `/gen-unit-test` → equivalent to `/gen-unit-test src/`
Use the command on specific files or directories when possible, and avoid invoking it on repositories containing code that should not be sent to the model provider.
Future commits may run test checks, and if AUTO_GEN_TEST=1 is enabled, may invoke Claude Code automatically to generate tests.
The skill creates a persistent pre-commit hook that can run future automation. The Claude auto-generation path is documented as disabled by default, so this is a review note rather than evidence of hidden behavior.
Write `.husky/pre-commit` (dual-layer guard) ... When `AUTO_GEN_TEST=1`, detect missing tests and invoke Claude Code to auto-generate them.
Inspect the generated .husky/pre-commit file, keep AUTO_GEN_TEST unset unless you want automatic generation, and remove the hook if it does not fit your workflow.
