Generate tests module
Skill radumarias/xorio-claude-plugin/skills/generate-tests-module
Generate unit and integration tests for a specific module, directory, or file. Analyzes existing code and creates idiomatic tests.From its SKILL.md
npx -y skills add radumarias/xorio-claude-plugin --skill generate-tests-moduleAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, as published. Nobody here has run it
Generate Tests for a Module
Generate unit and integration tests for a specific file, directory, or module.
Workflow
Step 1: Validate Target
Verify that $ARGUMENTS specifies a valid path. If no path is provided, ask the user for one.
Check the path exists (file or directory). If it's a directory, it will be scanned recursively for source files.
Step 2: Detect Languages and Frameworks
From the target files, detect:
Languages:
.rsfiles orCargo.tomlin parent hierarchy → Rust.ts/.tsxfiles orpackage.jsonin parent hierarchy → TypeScript.pyfiles orpyproject.toml/setup.pyin parent hierarchy → Python
Frameworks (check dependency files for these strings):
Cargo.tomlcontainsegui→ egui (only if target files import/use egui)package.jsoncontainsreact→ React (only if target files import react)package.jsoncontainsvue→ Vue.js (only if target files import vue)package.jsoncontainsthree→ Three.js (only if target files import three)package.jsoncontainsspark→ SparkJS (only if target files import spark)Dockerfileordocker-compose.ymlin target path → Docker- AWS SDK imports in target files → AWS
Step 3: Load Standards
Read ONLY the matching standards files:
- Language:
${CLAUDE_PLUGIN_ROOT}/skills/tests/references/test-standards-{language}.md - Framework:
${CLAUDE_PLUGIN_ROOT}/skills/tests/references/test-standards-{framework}.md
Only load framework standards if the target files actually use that framework.
Step 4: Analyze
Launch the test-analyzer agent with:
- Scope: "module" — include the target path
- The matching language + framework standards content
- Instruction to analyze only the specified module
Step 5: Present Gap Analysis
Show the user the prioritized gap list ranked by risk:
- Critical gaps first
- Include existing test coverage summary
- Note any test infrastructure found (helpers, fixtures)
Ask which gaps to generate tests for.
Step 6: Generate Tests
Launch the test-generator agent with:
- The user's selected gaps
- The matching language + framework standards content
- The key file paths from the analyzer
- The target module path for context
Step 7: Validate and Report
Run ONLY the language-specific validation commands:
- Rust:
cargo test -p <crate>,cargo clippy --all-targets,cargo fmt --check - TypeScript:
npm test,npx tsc --noEmit - Python:
pytest <test_file>,mypy,ruff - Docker:
hadolint,docker build
Report:
- Tests generated (file paths and test names)
- Validation results
- Any issues encountered