Agent skill

Test Detect

by davila7 in davila7/claude-code-templates

Auto-detect testing framework and run relevant tests. An agent skill from davila7/claude-code-templates.

MITAuto-check passedTesting & QA

Install Test Detect

skills CLI
$ npx skills add davila7/claude-code-templates --skill test-detect -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates test-detect --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/development/test-detect .claude/skills/test-detect && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
test-detect
GitHub stars
32k
Token cost
~989 tokens
SKILL.md length
444 words
Files
1
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Auto-detect testing framework and run relevant tests. An agent skill from davila7/claude-code-templates.

  • Works in 5 steps: Detect the testing framework → Parse arguments → Run full test suite → …
  • Tasks that involve Unit testing
  • SKILL.md covers Workflow and Tips
  • Calls npx, python and go

What it does

Test Detect is an agent skill from davila7/claude-code-templates. Auto-detect testing framework and run relevant tests. Identifies Jest, Vitest, Playwright, Cypress, pytest, Go test, and others. Can run all tests, specific file tests, or generate basic tests for new code. Usage - /test-detect, /test-detect src/auth/login.ts, /test-detect generate src/utils.ts

Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing and End-to-end testing. It works with Jest, Vitest, Playwright and pytest. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • Tasks that involve Unit testing
  • Tasks that involve End-to-end testing

Example prompts

  • “/test-detect”

Requirements

  • Python 3
  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Detect the testing framework
  2. Parse arguments
  3. Run full test suite
  4. Run tests for a specific file
  5. Generate tests

What it can do on your machine

Read from SKILL.md and the folder at commit 14680ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • python
    • go
    • cargo
    • bundle
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Test Detect loads about 989 tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 444 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~989

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 14680ec, republished under its MIT licence (© davila7). 444 words, ~989 tokens.

Download SKILL.mdSave it as .claude/skills/test-detect/SKILL.md (or your agent's skills folder).
name
test-detect
description
Auto-detect testing framework and run relevant tests. Identifies Jest, Vitest, Playwright, Cypress, pytest, Go test, and others. Can run all tests, specific file tests, or generate basic tests for new code. Usage - /test-detect, /test-detect src/auth/login.ts, /test-detect generate src/utils.ts

Test Detect

Automatically detect the testing framework in the current project and run the right tests.

Workflow

Step 1: Detect the testing framework

Check for these files in order (first match wins):

CheckFrameworkRun Command
vitest.config.* exists OR vitest in devDepsVitestnpx vitest run
jest.config.* exists OR jest in devDepsJestnpx jest
playwright.config.* existsPlaywrightnpx playwright test
cypress.config.* existsCypressnpx cypress run
pytest.ini or conftest.py or pyproject.toml with [tool.pytest]pytestpython -m pytest
go.mod existsGo testgo test ./...
Cargo.toml existsRust/cargocargo test
mix.exs existsExUnitmix test
Gemfile with rspecRSpecbundle exec rspec
package.json has scripts.testnpm testnpm test

Report the detected framework before proceeding.

Step 2: Parse arguments

Check $ARGUMENTS for the mode:

  • No arguments or "all": Run the full test suite (Step 3)
  • File path (e.g., src/auth/login.ts): Run tests for that file (Step 4)
  • "generate" + file path (e.g., generate src/utils.ts): Generate tests (Step 5)
Step 3: Run full test suite

Run the detected test command. After completion:

  • Report total tests, passed, failed, skipped
  • If tests fail, show the first 3 failure messages with file:line references
  • Suggest: "Run /test-detect <failing-file> to investigate a specific failure"
Step 4: Run tests for a specific file

Given a source file path, find its test file:

Search strategy (try in order):

  1. __tests__/<filename>.test.<ext> (Jest convention)
  2. <filename>.test.<ext> (co-located)
  3. <filename>.spec.<ext> (alternative convention)
  4. test/<filename>_test.<ext> (Go/Python convention)
  5. tests/test_<filename>.<ext> (pytest convention)
  6. <filename>_test.go (Go convention)

Use Glob to find matches. If found, run only that test file:

FrameworkCommand
Vitestnpx vitest run <test-file>
Jestnpx jest <test-file>
Playwrightnpx playwright test <test-file>
pytestpython -m pytest <test-file>
Gogo test -run <TestName> ./<package>/
Cargocargo test <test_name>

If no test file found, ask: "No tests found for this file. Want me to generate them? Run /test-detect generate <file>"

Show full SKILL.md (140 more words)Show less
Step 5: Generate tests

Read the source file and analyze:

  1. Identify all exported functions/classes/components
  2. Determine the appropriate test patterns for the framework
  3. Generate a test file with:
    • Import statements
    • describe block per function/class
    • it/test blocks covering: happy path, edge cases, error cases
    • Framework-appropriate assertions and mocking

Save to the conventional location for the detected framework:

  • Jest/Vitest: __tests__/<filename>.test.<ext> or <filename>.test.<ext> (match existing convention)
  • pytest: tests/test_<filename>.py
  • Go: <filename>_test.go (same directory)
  • RSpec: spec/<filename>_spec.rb

Show the generated file path and ask if the user wants to run the new tests.

Tips

  • If multiple frameworks are detected (e.g., Vitest for unit tests + Playwright for e2e), mention both and default to the unit test framework
  • For monorepos, detect from the closest config file to the current directory
  • If package.json has both test and test:unit/test:e2e scripts, prefer the specific one when context is clear

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in cli-tool/components/skills/development/test-detect of davila7/claude-code-templates.

Open the folder on GitHubat commit 14680ec

Compare with similar skills

Test Detect next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Test Detect compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Detect this skilldavila7/claude-code-templates32k—~989Automated safety check: PassMIT
Playwright Testingchongdashu/vibejam-starter-pack149—~2.1kAutomated safety check: PassNone
React Testingaffaan-m/ECC275k1 repos~3.3kAutomated safety check: PassMIT
Test Migrationpetrkindlmann/qa-skills165—~5.3kAutomated safety check: PassMIT
Testing Patternssoftspark/ai-toolkit179—~1.6kAutomated safety check: PassApache-2.0
Test DiscoveryEmeaAppGbb/spec2cloud100—~3.1kAutomated safety check: PassMIT

Similar skills

  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • React Testing

    affaan-m/ECC

    React component testing with React Testing Library, Vitest/Jest, MSW for network mocking, accessibility assertions with axe, and the decision boundary between component tests and Playwright/Cypress…

    275k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Test Migration

    petrkindlmann/qa-skills

    Migrate a test suite from one framework to another, incrementally and without losing coverage.

    165 GitHub stars~5.3k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Testing Patterns

    softspark/ai-toolkit

    Testing strategy: pyramid, AAA, mocks/fakes/stubs, flaky tests, coverage.

    179 GitHub stars~1.6k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Test Discovery

    EmeaAppGbb/spec2cloud

    Catalog existing tests — discover test frameworks, count tests by type, parse coverage reports, and map test-to-feature relationships.

    100 GitHub stars~3.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Designing Tests

    CloudAI-X/claude-workflow-v2

    Designs and implements testing strategies for any codebase. An agent skill from CloudAI-X/claude-workflow-v2.

    1.4k GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Categories

Questions about Test Detect

What does Test Detect do?

Auto-detect testing framework and run relevant tests. An agent skill from davila7/claude-code-templates. Test Detect is an agent skill from davila7/claude-code-templates. Auto-detect testing framework and run relevant tests.

When should I use Test Detect?

Test Detect fits situations like: tasks that involve Unit testing; tasks that involve End-to-end testing.

How do I install Test Detect in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill test-detect -a claude-code`. Or copy the skill folder (cli-tool/components/skills/development/test-detect in davila7/claude-code-templates) into .claude/skills/test-detect in your project. Claude Code loads it when a task matches its description.

How do I install Test Detect in Codex?

Run `npx skills add davila7/claude-code-templates --skill test-detect -a codex`. Or copy the skill folder (cli-tool/components/skills/development/test-detect in davila7/claude-code-templates) into .agents/skills/test-detect in your project. Codex loads it when a task matches its description.

Can I use Test Detect in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill test-detect -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-detect, .gemini/skills/test-detect, .github/skills/test-detect and .opencode/skills/test-detect in your project.

What does Test Detect need to run?

Going by SKILL.md and its folder, Test Detect needs the command-line tools its instructions call (npx, python, go, cargo, bundle and npm). Our summary lists: Python 3; Node.js.

Does Test Detect access the network?

SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Test Detect safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Test Detect use?

Test Detect is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Detect use?

About 989 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Test Detect?

Skills that share tags, products or a category with Test Detect: Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars), React Testing (affaan-m/ECC, 275k stars), Test Migration (petrkindlmann/qa-skills, 165 stars) and Testing Patterns (softspark/ai-toolkit, 179 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Detect?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,463 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 8, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.