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.

What this means

The setup may install packages and run local commands in the project directory.

Why it was flagged

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.

Skill content
**Shell Execution**: Runs `npm/yarn/pnpm` commands to install dependencies, and runs `git` commands to detect staged files.
Recommendation

Run it only in the intended project, review dependency and lockfile changes, and confirm generated files before committing.

What this means

New third-party development dependencies may be added to the project.

Why it was flagged

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.

Skill content
Install dev dependencies (`-D`) using the corresponding package manager. Skip already-installed dependencies.
Recommendation

Review package.json and lockfile diffs after setup, and pin or audit dependency versions according to the project’s standards.

What this means

Invoking the generated command may cause Claude Code to read substantial project source code to create tests.

Why it was flagged

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.

Skill content
**No arguments**: `/gen-unit-test` → equivalent to `/gen-unit-test src/`
Recommendation

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.

What this means

Future commits may run test checks, and if AUTO_GEN_TEST=1 is enabled, may invoke Claude Code automatically to generate tests.

Why it was flagged

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.

Skill content
Write `.husky/pre-commit` (dual-layer guard) ... When `AUTO_GEN_TEST=1`, detect missing tests and invoke Claude Code to auto-generate them.
Recommendation

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.