SkillPedia Skills Encyclopedia
中文 EN

技能 2026-10-05 09:21 UTC

agent-skills

由提交人 maheshbohara 提交,主要更新类型为:问题缺陷修复与稳定性提升。提交说明:Fix wp-performance: `wp doctor check` needs --all or check names (#114)。解决了已知运行时异常与边界错误,提升系统稳定性。

maheshbohara 3cf7f6f WordPress/agent-skills

Commit提交信息原文

Fix wp-performance: `wp doctor check` needs --all or check names (#114)

## Problem

The `wp-performance` skill tells agents to run `wp doctor check` with no
arguments as the first diagnostic step. That command runs no checks and
exits with an error:

```
$ wp doctor check
Error: Please specify one or more checks, or use --all.
```

The guard is in [`src/Command.php`
L120-L123](https://github.com/wp-cli/doctor-command/blob/116316d/src/Command.php#L120-L123)
of `wp-cli/doctor-command`, and it is present in every release tag back
to v0.1.0. An agent following the skill hits the error at step 2 ("Fast
wins").

Fixes #113.

## Changes

- `skills/wp-performance/SKILL.md`: step 2 now uses `wp doctor check
--all` (with `--spotlight` as an option) and shows the named-check form
for a perf-focused run. The Verification bullet uses `--all` too.
- `skills/wp-performance/references/wp-cli-doctor.md`: "Recommended
usage" lists `--all`, the three perf-related checks by name, and `--all
--spotlight`, and notes that one of `--all` or a check name is required.
- `eval/scenarios/performance-profile-slow-endpoint.json`: step 4 and
the matching success criterion expect `--all` or named checks instead of
the bare command.

## Testing

- `node shared/scripts/validate-skills.mjs` passes.
- Ran the old and new commands against a local WordPress 7.1 site:

| doctor-command | WP-CLI | `wp doctor check` | Named checks | `--all` |
|---|---|---|---|---|
| v2.1.0 to v2.3.0 | 2.12.0 | error, exit 1 | 3 checks run, exit 0 | 16
checks run |
| v3.0.0 | 3.0.0-alpha nightly | error, exit 1 | 3 checks run, exit 0 |
16 checks run |

- The same guard is in the tagged source of every other release back to
v0.1.0.