一键导入
unit-testing
Creates and runs unit tests for individual functions and modules. Use when writing or running unit tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates and runs unit tests for individual functions and modules. Use when writing or running unit tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Creates and runs integration tests for component interactions. Use when testing multiple modules working together.
Explores user intent, requirements and design before implementation. Use this before any creative work - creating features, building components, or modifying behavior.
Reviews code for best practices, security issues, and performance. Use when user asks to review, analyze, or audit code.
Generates clear, descriptive commit messages by analyzing git diffs. Use when writing commit messages or reviewing staged changes.
| name | unit-testing |
| description | Creates and runs unit tests for individual functions and modules. Use when writing or running unit tests. |
Focuses on testing individual units of code in isolation.
When creating unit tests:
Identify test cases
Write test structure
#[test]
fn test_function_name_scenario() {
// Arrange
let input = ...;
// Act
let result = function(input);
// Assert
assert_eq!(result, expected);
}
Best practices
Input: Create unit tests for add function Output: Tests covering positive numbers, negative numbers, zeros, and overflow cases.