Frontend Testing

VerifiedSafe

Guidance for writing or modifying Vitest/React Testing Library tests in web/ and packages/dify-ui/, and for frontend test strategy. Excludes code review, Python, and E2E.

Sby Skills Guide Bot
TestingIntermediate
8/29/2026
Claude Code
#vitest#react-testing-library#frontend#test-strategy#regression-testing

Recommended for

Automated summary

Guides the writing and changing of Vitest and React Testing Library tests under `web/` and `packages/dify-ui/` by pointing to the repository's existing test policy.

Strengths

  • Lays out a five-step workflow: identify the observable contract and regression risk, pick the smallest boundary owning the behavior, write the failing case first, run the focused spec then the affected suite, and report remaining risk.
  • Explicitly treats deleting low-value tests as equally valid to adding missing behavior coverage.
  • Points to authoritative command and policy docs: `web/docs/test.md` and `packages/dify-ui/docs/testing.md`.
  • Scopes itself tightly and names what it does not cover, avoiding misuse.

Limitations

  • The skill adds no requirements of its own; all policy lives in `web/docs/test.md`, which is not reproduced here.
  • It excludes Python tests, Cucumber/Playwright E2E, and frontend code-review-only requests.
  • Browser and visual risk are only mentioned as something to report, with no concrete guidance on how to assess them.
When to use it

Use it when writing or changing Vitest or React Testing Library tests under `web/` or `packages/dify-ui/`, or when the user explicitly asks for a frontend test strategy.

When not to use it

Do not use it for frontend code-review-only requests, general testability discussion, Python tests, or Cucumber/Playwright E2E.

Security analysis

Safe
Quality score86/100

The skill contains only documentation and workflow guidance for frontend testing. It declares no tools, executes no commands, accesses no secrets, and has no destructive or exfiltration behavior.

No concerns found

How this analysis is made

Examples

New behavior coverage
Add a Vitest test for the new retry toggle in web/app/components/settings — pick the smallest boundary that actually owns the behavior.
Strategy review
Review our current frontend test strategy under web/ and tell me which tests are low-value and should be deleted.
Failing test first
I'm changing the dify-ui form validation; write the failing RTL test first, then implement one coherent scenario and run the focused spec.

name: frontend-testing description: Use when writing or changing Vitest or React Testing Library tests under web/ or packages/dify-ui/, or when the user explicitly requests frontend test strategy, including evaluation of an existing strategy. Do not use for frontend code-review-only requests, general testability discussion, Python tests, or Cucumber/Playwright E2E.

Frontend Testing

web/docs/test.md is the single policy owner. Read it before changing frontend tests; this skill adds no separate requirements.

  1. Identify the observable contract and regression risk.
  2. Choose the smallest boundary that includes the behavior owner.
  3. Establish the failing case first when practical, then implement one coherent scenario.
  4. Run the focused spec before the affected suite and relevant static checks.
  5. Report the behavior verified and any remaining browser, visual, or end-to-end risk.

Recommend deleting low-value tests as readily as adding missing behavior coverage. Use web/docs/test.md for policy and Web commands; use packages/dify-ui/docs/testing.md for Dify UI commands.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/frontend-testing-mte1lkja/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/frontend-testing-mte1lkja' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/frontend-testing-mte1lkja/download' --output '.skill-downloads/frontend-testing-mte1lkja/SKILL.md.part' && mv '.skill-downloads/frontend-testing-mte1lkja/SKILL.md.part' '.skill-downloads/frontend-testing-mte1lkja/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/frontend-testing-mte1lkja/SKILL.md' && test -s '.skill-downloads/frontend-testing-mte1lkja/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/frontend-testing' && cp -R '.skill-downloads/frontend-testing-mte1lkja' '.claude/skills/frontend-testing'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/frontend-testing-mte1lkja'

openskills read 'frontend-testing-mte1lkja'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/frontend-testing-mte1lkja/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills