From yoink
Generates pytest tests for Python library functions, discovers real tests for reference, validates against original library, rewrites imports for yoink stubs, and sanity checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/yoink:curate-testsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Do not invoke this skill unless explicitly requested.** It is called by `/yoink:yoink` or run standalone by the user.
Do not invoke this skill unless explicitly requested. It is called by
/yoink:yoinkor run standalone by the user.
Prerequisite: /yoink:setup must have been run first (reference dir and real library must exist).
Parse your prompt to identify:
Package: line or --package argumentTask: line or prompt bodyNaming convention:
yoink_<package>/where<package>has hyphens replaced by underscores (e.g., packagelitellm->yoink_litellm/).
--skip-test-discoverer is present then skip to step 2.Use the yoink:test-discoverer agent to search for relevant tests from the original library's test suite.
Pass input as JSON:
{
"package_name": "<PACKAGE>",
"target_function": "<TARGET_FUNCTION>"
}
Discovered tests are reference material only. They exist so the test-generator can study real-world patterns and assertions. They are never executed during validation or any later step -- only generated tests are run.
Use the yoink:test-generator agent to write original pytest tests for the target function.
Pass input as JSON:
{
"package_name": "<PACKAGE>",
"target_function": "<TARGET_FUNCTION>"
}
Run only the generated tests using the script below against the installed real library. Do NOT run discovered tests -- they are reference only and may depend on API keys, network access, or fixtures that are not available.
uv run ${CLAUDE_PLUGIN_ROOT}/scripts/run_tests.py --project-dir . 2>&1
After validation passes, rewrite imports in generated tests so they target yoink_<package>/:
uv run ${CLAUDE_PLUGIN_ROOT}/scripts/rewrite_imports.py --package <PACKAGE> --target-dir yoink_<PACKAGE>/tests/generated
Run the test suite against the empty yoink_<package>/ to confirm tests fail:
uv run ${CLAUDE_PLUGIN_ROOT}/scripts/run_tests.py --project-dir . --summary-only
Score should be ~0.0 (tests should fail against empty yoink_<package>/).
npx claudepluginhub theogbrand/yoink --plugin yoinkDesigns pytest test suites for Python libraries with fixtures, parametrization, mocking, Hypothesis property-based testing, and CI configuration. For creating tests, improving coverage, or setting up testing infrastructure.
Generates pytest test suites from source code, covering happy paths, edge cases, error conditions, async flows, with fixture scaffolding and focused mocks.
Guides Python testing with pytest, TDD, fixtures, mocking, parametrization, and coverage. Useful when writing Python code or reviewing test suites.