ワンクリックで
test-add
Add unit tests for a specific source file or function. Use when the user asks to add tests, write tests, or improve test coverage.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Add unit tests for a specific source file or function. Use when the user asks to add tests, write tests, or improve test coverage.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run performance benchmarks measuring function execution time and analysis pipeline throughput.
Refactor recently written or changed code for quality and efficiency. Use after writing or editing code to clean it up.
Run unit tests for the project. Use when the user asks to test, verify, or check code correctness.
| name | test-add |
| description | Add unit tests for a specific source file or function. Use when the user asks to add tests, write tests, or improve test coverage. |
| argument-hint | <source-file-path> |
| disable-model-invocation | true |
| allowed-tools | Read, Glob, Grep, Bash(npx tsc *), Bash(npx mocha *) |
Generate unit tests for a source file in this project.
Read the source file at $ARGUMENTS to understand its exports and logic.
Determine which functions are pure (no VSCode API dependency) and testable without mocking.
vscode.Range, vscode.Diagnostic, vscode.TextDocument, etc.Determine the test file path:
src/<module>/<file>.ts → Test: src/test/<module>/<file>.test.tsWrite tests following these conventions:
suite() and test() (NOT describe/it)assert from "assert"Verify:
npx tsc -p . --outDir out
npx mocha --ui tdd --require out/test/vscode-mock.js "out/test/<module>/**/*.test.js"
src/test/
├── vscode-mock.ts # VSCode API mock (loaded via --require)
├── parser/ # Tests for src/parser/
├── analyzer/ # Tests for src/analyzer/
├── codeActions/ # Tests for src/codeActions/
├── rules/ # Tests for src/rules/
├── benchmark/ # Performance benchmarks
└── fixtures/ # Test data