create-tests-extract — Claude Code skill: what it does, how to install
create-tests-extract extracts heavy inline test blocks into adjacent files while preserving access to private module items.
no license 113 installs ★ 5 updated 2026-08-31
npx skills add ulpi-io/skills --skill create-tests-extract -a claude-codeWhat create-tests-extract does
This skill slims down production source files without degrading test strictness, specifically targeting Rust codebases. Instead of throwing tests into a top-level integration folder, it prefers an adjacent module like foo_tests.rs wired with #[cfg(test)]. That keeps super::* visibility working so unit tests continue checking private helpers.
The routine inspects the source, selects the smallest extraction boundary, moves test-only helpers alongside test functions, and wires the module. Once moved, it runs the narrowest targeted test suite to confirm nothing broke.
It only reorganizes existing test suites: creating fresh test cases or repairing failing logic falls outside its scope.
What it helps with
- relocate bulky inline test suites out of core source files
- keep private visibility intact without turning unit tests into integration checks
- move test-specific helpers and fixtures into dedicated files
- run focused test suites immediately after file reorganizations
Example prompts for the agent
- Extract the inline test module from src/parser.rs into an adjacent file
- Move the heavy #[cfg(test)] block out of this file while keeping private access
- Clean up storage.rs by moving its test suite next to it and running checks
How to install create-tests-extract
1Skills CLI (Vercel)
npx skills add ulpi-io/skills --skill create-tests-extract -a claude-code2Manually: put the files in place
~/.claude/skills/create-tests-extract/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/create-tests-extract/
1Skills CLI (Vercel)
npx skills add ulpi-io/skills --skill create-tests-extract -a codex2Manually: put the files in place
.agents/skills/create-tests-extract/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ulpi-io/skills --skill create-tests-extract -a cursor2Manually: put the files in place
.cursor/skills/create-tests-extract/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ulpi-io/skills create-tests-extract2Manually: put the files in place
.github/skills/create-tests-extract/SKILL.md1Skills CLI (Vercel)
npx skills add ulpi-io/skills --skill create-tests-extract -a gemini-cli2Platform CLI
gemini skills install https://github.com/ulpi-io/skills --path create-tests-extractManually: put the files in place
.devin/skills/create-tests-extract/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ulpi-io/skills --skill create-tests-extract -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about create-tests-extract
How to install create-tests-extract in Claude Code?
Run npx skills add ulpi-io/skills --skill create-tests-extract -a claude-code in your terminal.
What does create-tests-extract do?
It splits large inline test blocks out of production code into adjacent module files, keeping imports and private item access unchanged.
Why does it avoid extracting directly into the top-level tests/ folder?
Top-level tests/ suites run as external crates and only see public interfaces. Placing unit tests there would break access to private internals.