Agent SkillsAutomattic/studio › testing-php

testing-php

GitHub

用于检测 PHP 文件语法错误的技能。通过查找项目中的 PHP 文件并运行 php -l 进行检查,仅修复语法问题,不改动业务逻辑,最多尝试3次修复循环,最后报告通过或失败结果。

packages/data-liberation-agent/skills/testing-php/SKILL.md Automattic/studio

Trigger Scenarios

需要验证 PHP 代码是否存在语法错误 在提交或合并前进行代码质量检查

Install

npx skills add Automattic/studio --skill testing-php -g -y
More Options

Non-standard path

npx skills add https://github.com/Automattic/studio/tree/trunk/packages/data-liberation-agent/skills/testing-php -g -y

Use without installing

npx skills use Automattic/studio@testing-php

指定 Agent (Claude Code)

npx skills add Automattic/studio --skill testing-php -a claude-code -g -y

安装 repo 全部 skill

npx skills add Automattic/studio --all -g -y

预览 repo 内 skill

npx skills add Automattic/studio --list

SKILL.md

Frontmatter
{
    "name": "testing-php",
    "description": "Guidelines for running PHP linting to catch syntax errors",
    "disable-model-invocation": true
}

When to use me

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

Step 1: Identify PHP files

Find all PHP files in the project, excluding vendor/, node_modules/, and build/ directories:

find . -name "*.php" -not -path "*/vendor/*" -not -path "*/node_modules/*" -not -path "*/build/*"

Step 2: Run PHP syntax check

Check each PHP file for syntax errors using php -l:

php -l <file>
  • A file with valid syntax prints No syntax errors detected in <file> and exits 0.
  • A file with syntax errors prints the error message with line number and exits non-zero.
  • Fix any syntax errors found by editing the file, then re-run php -l to confirm.

Rules

  • Syntax only: This skill checks for PHP syntax errors. Do not run PHPCS 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

Same Skill Collection

apps/cli/ai/skills/annotate/SKILL.md
apps/cli/ai/skills/block-content/SKILL.md
apps/cli/ai/skills/hosting-plans-helper/SKILL.md
apps/cli/ai/skills/liberate/SKILL.md
apps/cli/ai/skills/need-for-speed/SKILL.md
apps/cli/ai/skills/plugin-recommendations/SKILL.md
apps/cli/ai/skills/rank-me-up/SKILL.md
apps/cli/ai/skills/site-spec/SKILL.md
apps/cli/ai/skills/taxonomist/SKILL.md
apps/cli/ai/skills/visual-design/SKILL.md
apps/cli/ai/skills/visual-polish/SKILL.md
apps/cli/ai/skills/wpcom-remote-management/SKILL.md
packages/data-liberation-agent/skills/adapt/SKILL.md
packages/data-liberation-agent/skills/creating-blocks/SKILL.md
packages/data-liberation-agent/skills/creating-themes/SKILL.md
packages/data-liberation-agent/skills/design-foundations/SKILL.md
packages/data-liberation-agent/skills/diagnose/SKILL.md
packages/data-liberation-agent/skills/editing-blocks/SKILL.md
packages/data-liberation-agent/skills/editing-themes/SKILL.md
packages/data-liberation-agent/skills/generating-patterns/SKILL.md
packages/data-liberation-agent/skills/migrate/SKILL.md
packages/data-liberation-agent/skills/model-local-data/SKILL.md
packages/data-liberation-agent/skills/qa/SKILL.md
packages/data-liberation-agent/skills/rebuild-section/SKILL.md
packages/data-liberation-agent/skills/testing-js/SKILL.md
packages/data-liberation-agent/skills/testing-wp-runtime/SKILL.md
skills/studio-cli/SKILL.md
packages/data-liberation-agent/skills/compose-page-blocks/SKILL.md
packages/data-liberation-agent/skills/design-qa/SKILL.md
packages/data-liberation-agent/skills/match-page/SKILL.md
packages/data-liberation-agent/skills/match-section/SKILL.md
packages/data-liberation-agent/skills/replicate-theme/SKILL.md
packages/data-liberation-agent/skills/replicate-with-blocks/SKILL.md

Metadata

Files
0
Version
0d55cb5
Hash
2fac26f1
Indexed
2026-08-20 12:16

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 06:23
浙ICP备14020137号-1 $방문자$