testing-js

Guidelines for checking JavaScript files for syntax errors

npx skills add https://github.com/automattic/data-liberation-agent --skill testing-js

When to use me

Use this skill when validating JavaScript files for syntax errors. Do not use this skill for PHP validation.

Step 1: Identify JavaScript files

Find all JS files in the project, excluding node_modules/, build/, and dist/ directories:

find . -name "*.js" -not -path "*/node_modules/*" -not -path "*/build/*" -not -path "*/dist/*"

Step 2: Check syntax

Use Node to check each JS file for syntax errors:

node --check <file>
  • A file with valid syntax exits 0 with no output.
  • A file with syntax errors prints the error with line number and exits non-zero.
  • Fix any syntax errors found by editing the file, then re-check.

Rules

  • Syntax only: This skill checks for JavaScript syntax errors. Do not run ESLint or other coding standard tools.
  • Max 3 cycles: Run at most 3 fix-then-retest cycles per file. If issues remain after 3 cycles, report them as unresolved.
  • Never modify business logic: Only fix syntax errors. Do not change how the code works.
  • Report format: After testing, report results as:
    • PASS: No syntax errors
    • FAIL: List remaining errors with file, line, and message

More skills from automattic

dn-info
automattic
Get detailed information about a registered domain using the dn CLI. Use when the user wants to see domain details like expiration date, nameservers, contacts,…
official
wordpress-plugin-publish
automattic
Use this skill when publishing, submitting, reuploading, verifying, packaging, checking, demoing, or releasing WordPress.org plugins with Pressship. It covers…
official
dev
automattic
Development workflows for WordPress ActivityPub plugin including wp-env setup, testing commands, linting, and build processes. Use when setting up development…
official
gitattributes
automattic
Use when auditing or updating .gitattributes export-ignore coverage so dev-only files (lint configs, CI, tests, docs, build tooling) don't ship in the…
official
integrations
automattic
Third-party WordPress plugin integration patterns. Use when adding new integrations, debugging compatibility with other plugins, or working with existing…
official
design-systems
automattic
Bold aesthetic direction guidance for web design. Use when making creative decisions about typography, color, motion, spatial composition, and overall visual…
official
site-specification
automattic
Extract comprehensive site specifications from simple descriptions. Use when analyzing a user's theme request to determine site type, audience, tone, layout…
official
wordpress-block-theming
automattic
WordPress Full Site Editing (FSE) theme architecture. Use when generating theme.json, block templates, template parts, patterns, and functions.php for…
official