Agent skill

Testing Fundamentals

by DanielPodolsky in DanielPodolsky/ownyourcode

Guides test strategy for unit, integration, and E2E testing.

MITAuto-check passedTesting & QA

Install Testing Fundamentals

skills CLI
$ npx skills add DanielPodolsky/ownyourcode --skill testing-fundamentals -a claude-code

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

GitHub CLI
$ gh skill install DanielPodolsky/ownyourcode testing-fundamentals --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/DanielPodolsky/ownyourcode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/fundamentals/testing .claude/skills/testing-fundamentals && 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
testing-fundamentals
GitHub stars
290
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
439 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Guides test strategy for unit, integration, and E2E testing.

  • Works in 5 steps: Testing Implementation, Not Behavior → Over-Mocking → Testing Third-Party Libraries → …
  • Junior asks how do I test
  • SKILL.md covers When to Apply, The Testing Pyramid, Stack-Specific Framework Guide and What to Test (The 3 Questions), plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Testing Fundamentals is an agent skill from DanielPodolsky/ownyourcode. Guides test strategy for unit, integration, and E2E testing. Use when junior asks "how do I test", "write tests", "what should I test", "test coverage", "mocking", or works with Vitest, Jest, Playwright. Provides testing pyramid and AAA patterns.

Its SKILL.md is about 1.5k 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, End-to-end testing and Test strategy. It works with Jest, Vitest, Playwright and Vite. The repository describes itself as: Claude Code workflow for AI-mentored development. Work efficiently with Spec-Driven Development and the 6 Gates. Built to fight cognitive offloading — for developers using AI to… The licence is MIT.

When your agent uses it

  • Junior asks how do I test
  • What should I test
  • Works with Vitest

Example prompts

  • “how do I test”
  • “write tests”
  • “what should I test”
  • “/testing-fundamentals”

Requirements

  • Python 3
  • Node.js

Workflow steps

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

  1. Testing Implementation, Not Behavior
  2. Over-Mocking
  3. Testing Third-Party Libraries
  4. Brittle Selectors
  5. Testing Everything

What it can do on your machine

Read from SKILL.md and the folder at commit bd1f17c. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

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

  • Network

    No URLs in SKILL.md.

    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

Testing Fundamentals loads about 1.5k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 439 words of instructions outside code blocks.

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

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 DanielPodolsky/ownyourcode at commit bd1f17c, republished under its MIT licence (© DanielPodolsky). 439 words, ~1,473 tokens.

Download SKILL.mdSave it as .claude/skills/testing-fundamentals/SKILL.md (or your agent's skills folder).
name
testing-fundamentals
description
Guides test strategy for unit, integration, and E2E testing. Use when junior asks "how do I test", "write tests", "what should I test", "test coverage", "mocking", or works with Vitest, Jest, Playwright. Provides testing pyramid and AAA patterns.

Testing Fundamentals Review

"If you can't test it, you don't understand it. Tests are proof of understanding."

When to Apply

Activate this skill when:

  • Reviewing test files (*.test.ts, *.spec.ts, *.test.js)
  • Junior asks about testing strategy
  • Completing a feature without tests
  • Discussing coverage or test quality

The Testing Pyramid

        ▲
       ╱ ╲     E2E (10%)
      ╱   ╲    Playwright - Full user flows
     ╱─────╲
    ╱       ╲  Integration (20%)
   ╱         ╲ Vitest + RTL - Component interactions
  ╱───────────╲
 ╱             ╲ Unit (70%)
╱               ╲ Vitest - Functions, utils, logic
─────────────────
  • Unit Tests (70%): Fast, isolated, test one thing
  • Integration Tests (20%): Components working together
  • E2E Tests (10%): Critical user journeys only

Stack-Specific Framework Guide

StackUnit/IntegrationE2E
Vite + ReactVitest + React Testing LibraryPlaywright
Create React AppJest + RTLPlaywright
Next.jsVitest or Jest + RTLPlaywright
Node.jsVitest (native ESM)-
Pythonpytest-
Gogo test-

Why Vitest for Vite?

  • 10-20x faster than Jest in watch mode
  • Native ESM support
  • Same config as Vite (vite.config.ts)
  • Compatible with Jest API

What to Test (The 3 Questions)

  1. Happy Path: Does it work when everything goes right?
  2. Edge Cases: What happens with empty, null, max values?
  3. Error States: Does it fail gracefully?
Good Tests Check:
  • Component renders without crashing
  • User interactions work (click, type, submit)
  • Error states display correctly
  • Loading states appear and disappear
  • Data flows correctly through the component
Bad Tests Check:
  • Implementation details (internal state, method calls)
  • Styling or CSS classes
  • Third-party library internals
  • Snapshot tests of large components (brittle)

Common Mistakes (Anti-Patterns)

1. Testing Implementation, Not Behavior
typescript
// ❌ BAD: Testing internal state
expect(component.state.isLoading).toBe(true);

// ✅ GOOD: Testing what user sees
expect(screen.getByText('Loading...')).toBeInTheDocument();
2. Over-Mocking
typescript
// ❌ BAD: Mock everything
jest.mock('./utils');
jest.mock('./api');
jest.mock('./hooks');
// What are you even testing at this point?

// ✅ GOOD: Mock only external boundaries
vi.mock('./api'); // Mock the API, test the rest
3. Testing Third-Party Libraries
typescript
// ❌ BAD: Testing that React Query works
expect(useQuery).toHaveBeenCalledWith('users');

// ✅ GOOD: Testing YOUR code's behavior
await waitFor(() => {
  expect(screen.getByText('User Name')).toBeInTheDocument();
});
4. Brittle Selectors
typescript
// ❌ BAD: Breaks if you change CSS
screen.getByClassName('btn-primary-large-blue');

// ✅ GOOD: Semantic and stable
screen.getByRole('button', { name: 'Submit' });
5. Testing Everything
typescript
// ❌ BAD: 100% coverage goal
// Results in tests that exist just for coverage

// ✅ GOOD: Strategic coverage
// Test critical paths, edge cases, complex logic

Socratic Questions

Ask these instead of giving answers:

  1. Strategy: "What's the most critical user flow that needs testing?"
  2. Coverage: "If this test passes but the feature is broken, how would you know?"
  3. Edge Cases: "What inputs could break this? Empty? Null? 10,000 items?"
  4. Isolation: "Are you testing YOUR code or a library's code?"
  5. Value: "Would this test catch a real bug?"

Show full SKILL.md (144 more words)Show less

Test Structure (AAA Pattern)

typescript
describe('LoginForm', () => {
  it('shows error when password is too short', async () => {
    // Arrange
    render(<LoginForm />);

    // Act
    await userEvent.type(screen.getByLabelText('Password'), '123');
    await userEvent.click(screen.getByRole('button', { name: 'Login' }));

    // Assert
    expect(screen.getByText('Password must be at least 8 characters')).toBeInTheDocument();
  });
});

Red Flags to Call Out

FlagQuestion
No tests for feature"What tests prove this works?"
Only happy path tested"What if the API fails? What if input is empty?"
Mocking everything"What are you actually testing here?"
Testing implementation"Would this test break if you refactored but behavior stayed the same?"
getByClassName usage"Is there a more semantic way to select this element?"
Large snapshot tests"Will you actually review this diff when it changes?"

MCP Usage

Context7 - Framework Docs
Fetch: Vitest documentation
Fetch: React Testing Library queries
Fetch: Playwright best practices
Octocode - Real Examples
Search: "vitest react testing library" in popular repos
Search: "playwright e2e test login" for E2E patterns

Test Naming Convention

typescript
// Pattern: it('should [expected behavior] when [condition]')

it('should display error message when password is invalid')
it('should redirect to dashboard when login succeeds')
it('should disable submit button when form is submitting')

Interview Gold

"I implemented comprehensive testing with 85% coverage focusing on critical user flows. I used Vitest for unit tests, React Testing Library for component integration tests, and Playwright for E2E tests covering login, checkout, and payment flows."

Tests are interview talking points. Every test you write is proof you understand the code.

© DanielPodolsky, 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 .claude/skills/fundamentals/testing of DanielPodolsky/ownyourcode.

Open the folder on GitHubat commit bd1f17c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in DanielPodolsky/ownyourcode, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Testing Fundamentals 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.

Testing Fundamentals compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Testing Fundamentals this skillDanielPodolsky/ownyourcode2901 repos~1.5kAutomated safety check: PassMIT
Designing TestsCloudAI-X/claude-workflow-v21.4k1 repos~1.5kAutomated safety check: PassMIT
Playwright Testingchongdashu/vibejam-starter-pack149—~2.1kAutomated safety check: PassNone
Playwright Testingchongdashu/vibejam-starter-pack149—~2.2kAutomated safety check: PassNone
Web Testing with Playwright and Vitestwithkynam/vibecode-pro-max-kit1.1k—~892Automated safety check: PassApache-2.0
React Testingaffaan-m/ECC276k1 repos~3.3kAutomated safety check: PassMIT

Similar skills

  • 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
  • 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
  • Playwright Testing

    chongdashu/vibejam-starter-pack

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

    149 GitHub stars~2.2k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Web Testing with Playwright and Vitest

    withkynam/vibecode-pro-max-kit

    Covers web testing from unit to E2E, load, visual, accessibility and security checks, with Playwright, Vitest and k6 guides plus a Playwright setup script.

    1.1k GitHub stars~892 tokensUpdated 3 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…

    276k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Senior QA

    alirezarezvani/claude-skills

    Generates unit tests, integration tests, and E2E tests for React/Next.js applications.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed

More from DanielPodolsky/ownyourcode

All 19 skills in this repo
  • Accessibility Fundamentals

    DanielPodolsky/ownyourcode

    Reviews accessibility including WCAG, ARIA, keyboard navigation.

    290 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Backend Fundamentals

    DanielPodolsky/ownyourcode

    Reviews API design, REST conventions, and backend architecture.

    290 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Database Fundamentals

    DanielPodolsky/ownyourcode

    Reviews schema design, SQL queries, ORM patterns. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Documentation Fundamentals

    DanielPodolsky/ownyourcode

    Guides documentation standards including READMEs, JSDoc, and code comments.

    290 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Error Handling Fundamentals

    DanielPodolsky/ownyourcode

    Guides error handling for async operations and API calls. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Frontend Fundamentals

    DanielPodolsky/ownyourcode

    Reviews React/Vue component architecture, state, and hooks. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~874 tokens
    Auto-check passed

Categories

Questions about Testing Fundamentals

What does Testing Fundamentals do?

Guides test strategy for unit, integration, and E2E testing. Testing Fundamentals is an agent skill from DanielPodolsky/ownyourcode. Guides test strategy for unit, integration, and E2E testing.

When should I use Testing Fundamentals?

Testing Fundamentals fits situations like: junior asks how do I test; what should I test; works with Vitest.

How do I install Testing Fundamentals in Claude Code?

Run `npx skills add DanielPodolsky/ownyourcode --skill testing-fundamentals -a claude-code`. Or copy the skill folder (.claude/skills/fundamentals/testing in DanielPodolsky/ownyourcode) into .claude/skills/testing-fundamentals in your project. Claude Code loads it when a task matches its description.

How do I install Testing Fundamentals in Codex?

Run `npx skills add DanielPodolsky/ownyourcode --skill testing-fundamentals -a codex`. Or copy the skill folder (.claude/skills/fundamentals/testing in DanielPodolsky/ownyourcode) into .agents/skills/testing-fundamentals in your project. Codex loads it when a task matches its description.

Can I use Testing Fundamentals 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 DanielPodolsky/ownyourcode --skill testing-fundamentals -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing-fundamentals, .gemini/skills/testing-fundamentals, .github/skills/testing-fundamentals and .opencode/skills/testing-fundamentals in your project.

What does Testing Fundamentals need to run?

SKILL.md names no scripts, command-line tools or credentials: Testing Fundamentals is instructions for the agent only. Our summary lists: Python 3; Node.js.

Does Testing Fundamentals access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Testing Fundamentals 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 Testing Fundamentals use?

Testing Fundamentals 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 Testing Fundamentals use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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 Testing Fundamentals?

Skills that share tags, products or a category with Testing Fundamentals: Designing Tests (CloudAI-X/claude-workflow-v2, 1.4k stars), Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars), Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars) and Web Testing with Playwright and Vitest (withkynam/vibecode-pro-max-kit, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Testing Fundamentals?

DanielPodolsky (a GitHub user) maintains it in DanielPodolsky/ownyourcode, which has 290 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 27, 2026.

Source: DanielPodolsky/ownyourcode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.