Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ulpi-io/skills --skill create-tests-extract -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/create-tests-extract/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/create-tests-extract/

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.

Similar skills

All skills for Testing and QA →

From the same set49

The whole set →
normalize-skill-for-claude normalize-skill-for-claude is a Claude Code skill that audits an existing skill, plans changes, and rewrites its metadata, body, and references for routing. CX Codex +1 118installs normalize-agent-for-claude normalize-agent-for-claude audits AGENT.md files and optimizes them for Claude Code runtime by separating role identity from procedures. CX Codex +1 117installs bugfix-crate The bugfix-crate skill works through an existing Rust crate issue file one finding at a time, testing each change and recording its outcome. CX Codex +1 117installs review-crate review-crate reads every file in a Rust crate, runs tests, and reports bugs with exact line numbers. Use it to catch logic errors, panics, race conditions, and validation gaps that unit tests miss. CX Codex +1 115installs browse-aeo browse-aeo audits how ready a page is for citation in AI answers, then checks its visibility across Google AI Overviews and Perplexity. CX Codex +1 111installs browse-seo browse-seo runs technical on-page SEO audits against live rendered pages via the browse CLI and outputs prioritized action items. CX Codex +1 111installs browse-geo browse-geo — a skill for Claude Code, Codex, Cursor and other platforms: runs a query set across Google AI Overviews, Perplexity, and ChatGPT Search, then outputs a cross-engine citation matrix for a target domain. CX Codex +1 110installs browse-config browse-config generates Camoufox configurations for the browse CLI via interactive chat prompts instead of manual JSON editing. CX Codex +1 107installs

Project sponsors

Companies that keep this analytics open