Agent Skills
› Automattic/studio
› testing-js
testing-js
GitHub用于检查JavaScript文件语法错误的技能,通过Node.js验证代码合法性并修复基础语法问题。
Trigger Scenarios
用户请求检查JS文件语法
需要验证项目内JavaScript文件是否存在语法错误
Install
npx skills add Automattic/studio --skill testing-js -g -y
SKILL.md
Frontmatter
{
"name": "testing-js",
"description": "Guidelines for checking JavaScript files for syntax errors",
"disable-model-invocation": true
}
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
Version History
- 0d55cb5 Current 2026-08-20 12:16


