Skip to content
Back to skills

Testing

BSecurity

WRITE, RUN, or DEBUG tests -- pytest, Jest/RTL, Playwright E2E, deployment config. NOT for finding coverage gaps (use test-coverage) or CI pipeline config (use deployment).

  • 9 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 5, 2026
ai-agentstypescriptpythongobashreacttestingdebuggingdatabase

Security analysis

B84/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 3 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add atretyak1985/swarmery --skill testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Testing
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/atretyak1985-testing/badge)](https://www.skillsdirectory.com/skills/atretyak1985-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: testing
description: "WRITE, RUN, or DEBUG tests -- pytest, Jest/RTL, Playwright E2E, deployment config. NOT for finding coverage gaps (use test-coverage) or CI pipeline config (use deployment)."
version: "1.0.0"
owner: "swarmery-core"
allowed-tools: Read, Write, Bash, Grep, Glob
color: teal
docs:
  status: reviewed
  source_sha: 86527cbef0ee
  updated: 2026-08-06
---

# Purpose

Write tests, run test suites, and debug test failures across the project's repositories (`.claude/project.json` → `repos`). Typical layout: a device/edge repo `<device>` (Python/pytest), the main app `apps/<mainApp>` (TypeScript/Jest + RTL, Playwright E2E), and an infrastructure repo (deployment config via template render + dry-run); placeholders come from `project.json → mainApp` / `device`.

# Rules (never violate)

1. Verify the source module exists (Glob/Read) before writing a test — never test a module you cannot locate.
2. Always run a test after writing it; never return a test that was not executed and passing.
3. Test behavior, not implementation; no vacuous assertions (`expect(true).toBe(true)`).
4. A single test file stays under 200 lines — split by feature area if larger.
5. Check prerequisites before integration/E2E runs: `make test-all` needs a database, `npm run test:e2e` needs a running app.
6. Never delete a flaky test or run `npm install`/`pip install` without user approval.
7. Always pass a worker limit — a runner without one starts a worker per CPU core, and several sessions on one machine then exhaust it. Jest/Vitest `--maxWorkers=${SWARMERY_TEST_WORKERS:-2}`, Playwright `--workers=${SWARMERY_TEST_WORKERS:-2}`, turbo `--concurrency=1`, nx `--parallel=1`, `go test -p ${SWARMERY_TEST_WORKERS:-2}`. Through a package manager, pass it to the script: `npm test -- --maxWorkers=${SWARMERY_TEST_WORKERS:-2}`, `pnpm turbo run test --concurrency=1 -- --maxWorkers=${SWARMERY_TEST_WORKERS:-2}`. Keep worker flags away from `typecheck`/`lint` tasks — run those in a separate command. The core `test-worker-budget.sh` hook enforces this; the rule is the fallback where the hook is not installed.

# Resources

- Read `resources/writing-test-patterns.md` when writing tests: philosophy (AAA, TDD), the testing pyramid, the framework/location/naming table, and code patterns for pytest, Jest, RTL, Playwright, and deployment config dry-runs.
- Read `resources/running-and-debugging.md` when running suites or debugging failures: per-repo commands, the 4-step debug procedure, self-check, common mistakes, escalation, and failure modes.

# How to use

## What it does

A hands-on test engineer: writes new tests, runs existing suites, and debugs failures across a multi-repo project — pytest, Jest with React Testing Library, Playwright browser flows, deployment config through template renders and dry-run installs. It picks the right framework, file location, and naming convention for the repo, then runs the test to prove it passes.

## When to use it

- Tests needed for a module you just implemented, or added to existing code.
- Running a suite for pass/fail; a failing or flaky test needing its root cause found and fixed.

Not for: finding what lacks tests (`test-coverage`), CI test jobs (the project's infra pack skills), lint/type checking (`code-standards`/`code-quality`), or live-app debugging (`troubleshooting`).

## How to invoke

```
Skill(skill: "core:testing")
```

State the goal (`write`, `run`, or `debug`) and the target (module path, test file, or test name), plus the repository if ambiguous.

## Worked example

```
Skill(skill: "core:testing")
"Write unit tests for the coordinate formatter in apps/<mainApp>."

→ Confirms the repo uses Jest, reads src/lib/utils/formatCoordinates.ts,
  writes src/lib/utils/__tests__/formatCoordinates.test.ts with AAA-style
  cases for the normal path and the zero-value edge case, then runs
  `npx jest src/lib/utils/__tests__/formatCoordinates.test.ts`.
```

You end up with a passing test file and the runner output showing 2 passed. For `debug`, you get the root cause plus a full-suite re-run to catch regressions.

## Related

`test-coverage` (what needs tests; owns the coverage targets), `code-standards` (naming and quality conventions), `troubleshooting` (the application misbehaving, not the test).

Files in this skill

  • SKILL.md3.5 KB
  • resources/running-and-debugging.md5 KB
  • resources/writing-test-patterns.md5.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.