leonj1/external-claude-skills/test-pattern-detector
Claude Code and agent skill by leonj1/external-claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Delegates test pattern detection to a lightweight agent. Use when you need to understand existing test conventions without loading test files into context.
Install
npx vskill@latest install leonj1/external-claude-skills/test-pattern-detectorSKILL.md
The same SKILL.md was published earlier as majiayu000/claude-skill-registry/test-pattern-detector.
Test Pattern Detector Skill
This skill delegates test pattern detection to a specialized lightweight agent, keeping your context lean.
When to Invoke This Skill
Invoke this skill when ANY of these conditions are true:
- Writing new tests: You need to match existing test naming and structure conventions
- Setting up test files: You need to know the correct imports, setup/teardown patterns
- Choosing test location: You need to know if tests go alongside source or in separate directory
- Mocking patterns: You need to understand how the project handles mocks and fixtures
- Test framework usage: You need to see how describe/it/test blocks are structured
Why Use This Skill?
Without this skill: You would read 2-3 full test files (100-300 lines each) to understand patterns.
With this skill: The test-pattern-detector agent (haiku model) samples test files and returns a concise 40-60 line summary.
Context savings: 60-80% reduction in test-pattern-related context usage.
Invocation
When you need test pattern information, invoke the agent:
For specific language focus:
What test-pattern-detector Will Do
The agent will:
- Find test files: Locate .test.ts, test_.py, *_test.go, etc.
- Sample 3 files: Select representative unit, integration, and setup-heavy tests
- Read first 80 lines: Extract patterns without full file context
- Identify conventions: Naming, structure, fixtures, mocking, imports
- Return summary: Concise structured output with example patterns
Expected Output
You will receive a structured summary like:
import { render, screen } from '@testing-library/react'; import { createMockUser } from '../fixtures/user';
describe('UserProfile', () => { it('should display user name', () => { render(<UserProfile user={createMockUser()} />); expect(screen.getByText('John')).toBeInTheDocument(); }); });
Example Usage
Scenario: You need to write tests for a new UserService.
Without skill: Read 3 existing test files (450 lines total) to understand conventions.
With skill:
Result: You know the naming convention, import pattern, and fixture usage in 50 lines of context.
Do NOT Invoke When
- You already know the test patterns from earlier in the conversation
- The user has explicitly described how tests should be written
- You're modifying an existing test file (read that file directly)
- The project has no existing tests (nothing to detect)
Consumers
This skill is particularly useful for:
test-creator- Writing new tests that match conventionsbdd-test-runner- Validating test infrastructure setupcoder- Adding tests alongside new implementationsrefactorer- Ensuring refactored code has matching test patterns
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/test-pattern-detector/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/leonj1/external-claude-skills/test-pattern-detector)