test-context

Loads stored test pattern learnings and scans local test files to produce structured test context.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/muselesscreator/ui-skills --skill test-context-muselesscreator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-context
Source: https://github.com/muselesscreator/ui-skills/tree/main/test-context
Command: npx skills add https://github.com/muselesscreator/ui-skills --skill test-context-muselesscreator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing or fixing tests in an unfamiliar repository often means guessing at naming conventions, mock patterns, and assertion styles, which produces inconsistent tests that fail code review. ## Core Features & Use Cases - Stored Learnings Retrieval: Loads repo-specific test pattern learnings from a wiki collection or flat learning files depending on the repository type. - Live Test Scan: Scans nearby test files to capture naming conventions, import patterns, mock strategies, fixture factories, and assertion styles. - Structured Context Output: Writes a structured markdown context block to a timestamped file so calling skills like write-unit-tests or cleanup-e2e-tests can read the exact conventions. - Use Case: Before generating a new unit test, a parent skill invokes this sub-skill to gather how the repo mocks stores, builds test data, and handles async assertions, ensuring the generated test matches existing style. ## Quick Start Ask the AI to gather the test conventions and mock patterns for this repository before writing new unit tests.

Frequently Asked Questions about test-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I match existing test conventions when writing new tests?

Scan nearby test files for naming patterns, import styles, mock setups, and assertion approaches, then mirror them in new tests. This skill automates that scan and combines it with stored repo learnings into a structured context block.

How to gather mock and fixture patterns from a codebase?

Inspect existing test files to see how stores, APIs, and routers are mocked and how test data factories are built. The live scan step captures these patterns with code examples from actual files in the repository.

Can this skill be invoked directly by users?

No, it is an internal sub-skill marked with internal: true. It is called by write-unit-tests, write-e2e-tests, cleanup-unit-tests, and cleanup-e2e-tests to supply test context.

What happens if no test learnings exist for a repo?

The skill emits a warning suggesting /wiki-index for work repos or /learn-repo for OSS checkouts, then proceeds with only the live scan of local test files.

Where is the generated test context output stored?

The structured context block is written to ~/.claude/skill-output/$REPO/$BRANCH/test-context-$TS.md, and the full path is echoed so the calling skill reads the exact file.