Skill · em Corrigir bugs

test-detect

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

Procedência

Antes de instalar

1 arquivo · 3,9 KB · só texto, nenhum script

Instalar na sua CLI

O comando baixa a versão fixada (commit 57f899e) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.

Claude Code

Neste projeto: instala em .claude/skills/test-detect/.

d=".claude/skills/test-detect"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/development/test-detect"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.claude/skills/test-detect/.

d="$HOME/.claude/skills/test-detect"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/development/test-detect"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Codex

Neste projeto: instala em .agents/skills/test-detect/.

d=".agents/skills/test-detect"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/development/test-detect"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.agents/skills/test-detect/.

d="$HOME/.agents/skills/test-detect"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/development/test-detect"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Antigravity

Neste projeto: instala em .agents/skills/test-detect/.

d=".agents/skills/test-detect"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/development/test-detect"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.gemini/antigravity-cli/skills/test-detect/.

d="$HOME/.gemini/antigravity-cli/skills/test-detect"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/development/test-detect"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Peça ao Rook

Já usa o Rook Labs? Cole no chat do Rook: instale a skill https://rooklabs.sh/marketplace/cct.test-detect

Prévia do SKILL.md

---
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):

| Check | Framework | Run Command |
|-------|-----------|-------------|
| `vitest.config.*` exists OR `vitest` in devDeps | **Vitest** | `npx vitest run` |
| `jest.config.*` exists OR `jest` in devDeps | **Jest** | `npx jest` |
| `playwright.config.*` exists | **Playwright** | `npx playwright test` |
| `cypress.config.*` exists | **Cypress** | `npx cypress run` |
| `pytest.ini` or `conftest.py` or `pyproject.toml` with `[tool.pytest]` | **pytest** | `python -m pytest` |
| `go.mod` exists | **Go test** | `go test ./...` |
| `Cargo.toml` exists | **Rust/cargo** | `cargo test` |
| `mix.exs` exists | **ExUnit** | `mix test` |
| `Gemfile` with `rspec` | **RSpec** | `bundle exec rspec` |
| `package.json` has `scripts.test` | **npm test** | `npm 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
…

Ver todo o marketplace