create-verification-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate a verification skill
创建验证Skill
A coding agent that changes an app should be able to prove the change the
way a user would see it. This skill writes that proof recipe for one
project as a skill, , built on e2e. The
config launches the app, drives it live, tests pin what must
hold, bug bashes it, and keeps the evidence. Write
the output for the next agent, not for a human. It will be read cold,
mid-task, by an agent that has never seen the app.
.agents/skills/verify-<app>/e2e mcpe2e explore.e2e/The e2e skill is the reference for everything e2e does. Read it first and
link to it rather than restate it. It is in
the project once or ran,
and prints it from the installed package. Topics
named below (, , , , ,
, ) are its reference files.
.agents/skills/e2e/SKILL.mdnpx e2e initnpx skills add tester-army/e2enpx e2e guide <topic>setupwriting-testsmcpexplorebug-bashrunningdebugging修改应用的编码Agent应当能够以用户的视角证明变更的正确性。本Skill基于e2e为单个项目生成该验证流程的Skill,存放于。配置会启动应用,实时驱动应用,测试固定必须满足的条件,执行Bug Bash,目录留存证据。输出内容是写给下一个Agent的,而非人类读者。它会被从未接触过该应用的Agent在任务中途直接读取。
.agents/skills/verify-<app>/e2e mcpe2e explore.e2e/e2e Skill是所有e2e相关操作的参考文档。请先阅读并链接到它,而非重复表述。执行或后,它会存在于项目的路径下,也可以通过从已安装的包中打印。下文提到的主题(、、、、、、)均为其参考文件。
npx e2e initnpx skills add tester-army/e2e.agents/skills/e2e/SKILL.mdnpx e2e guide <主题>setupwriting-testsmcpexplorebug-bashrunningdebugging1. Interview the repo, not the user
1. 调研代码库,而非询问用户
Answer these from the codebase and ask the user only what you cannot
observe.
| Question | Where the answer is | What it decides |
|---|---|---|
| Surface | What a user touches. A web UI, an iOS or Android app, an API | One skill per primary surface; name the others for a later run. Web goes through |
| Run | The documented dev command, its ports, env vars, seed data, auth | The target's |
| e2e state | | Nothing there means |
| Observe | The trace page, screenshots, video, the report, and what the app leaves behind in files, rows, sent messages, logs | The side-effect stores the Evidence section names. Find them now |
| Isolate | Can two instances run side by side? | Port |
| Name | The package name or the repo name | |
If the checkout does not build or start as-is, fix that first or report it
precisely before generating. A skill written against a broken base teaches
wrong steps. An irrelevant missing asset (a static dir the API never
serves, a sample config) may be created by the generated skill, marked as
verification scaffolding and removed in Cleanup.
An existing is read before anything is written. Keep its
SKILL.md and feature files, add the features the map lacks, and change an
existing file only where the app contradicts it.
verify-<app>/从代码库中寻找这些问题的答案,仅在无法观察到时才询问用户。
| 问题 | 答案来源 | 决定内容 |
|---|---|---|
| 呈现层 | 用户接触的部分:Web UI、iOS或Android应用、API | 每个主要呈现层对应一个Skill;其他呈现层可标注出来供后续运行处理。Web端通过 |
| 运行方式 | 文档记录的开发命令、端口、环境变量、种子数据、认证方式 | 目标的 |
| e2e状态 | | 若以上均不存在,需先执行 |
| 可观测内容 | 追踪页面、截图、视频、报告,以及应用在文件、数据行、发送的消息、日志中留下的痕迹 | 副作用存储的位置将作为「证据」部分的条目名称,请现在就找出它们 |
| 隔离性 | 两个实例能否并行运行? | |
| 名称 | 包名或代码库名称 | |
如果检出的代码无法直接构建或启动,请先修复该问题,或在生成Skill前准确报告。基于损坏的基础编写的Skill会传授错误的步骤。无关的缺失资源(如API从未提供服务的静态目录、示例配置)可由生成的Skill创建,标记为验证脚手架,并在清理步骤中移除。
在写入任何内容前,先读取已有的目录。保留其中的SKILL.md和功能文件,补充功能地图中缺失的功能,仅在应用实际情况与现有文件冲突时才修改已有文件。
verify-<app>/2. Generate the skill
2. 生成Skill
Write with YAML frontmatter.
and a naming the app, the surface, and
when to reach for it; without frontmatter the skill never registers. When
the project has , link it the way does, a
relative symlink to
. Every section says what the interview
found, no placeholders.
.agents/skills/verify-<app>/SKILL.mdname: verify-<app>description.claude/skills/e2e init.claude/skills/verify-<app>../../.agents/skills/verify-<app>| Section | Holds |
|---|---|
| Read first | One line that sends the reader to the e2e skill and names the config file and |
| Launch | The exact command that starts the app for verification and how readiness shows. With a target |
| Doctor | One read-only check that answers "is this instance worth driving?". |
| Drive | Two lanes and when to use each. Live over MCP: |
| Evidence | What a proof keeps and where. Every run writes |
| Bug bash | How this app is bashed (topic |
| Cleanup | What to tear down. The runner stops the app it started and |
| Helpers | Any script the skill ships is executable and its invocation is in the skill body. A helper the reader has to reverse-engineer is not a helper. Most projects need none; the e2e CLI is the helper |
Proof standards, for the Evidence section: exercise the real user path,
not internal setters or test-only endpoints; capture the action and the
resulting state, not only the final screen; verify side effects (files
written, rows inserted, messages sent) in the stores the interview found;
mock only where a production boundary already isolates the external
system. When the safe path is a dry run or a test mode, verify what it
skips by watching files, network, and refs rather than trusting its name.
编写带有YAML frontmatter的文件。包含和字段,描述中需说明应用名称、呈现层以及适用场景;没有frontmatter的Skill将无法注册。如果项目中有目录,按照的方式建立链接:创建相对符号链接指向。每个部分都需基于调研所得的实际信息编写,不得使用占位符。
.agents/skills/verify-<app>/SKILL.mdname: verify-<app>description.claude/skills/e2e init.claude/skills/verify-<app>../../.agents/skills/verify-<app>| 章节 | 内容 |
|---|---|
| 前置阅读 | 一行内容,引导读者查阅e2e Skill,并说明本Skill所使用的配置文件和 |
| 启动 | 用于验证的应用启动的确切命令,以及如何判断应用已就绪。如果目标配置了 |
| 诊断(Doctor) | 一项只读检查,用于回答“这个实例是否值得驱动?”的问题。 |
| 驱动 | 两种驱动方式及各自的适用场景。MCP实时驱动: |
| 证据 | 验证需要留存的内容及存储位置。每次运行都会生成 |
| Bug Bash | 如何对该应用进行Bug Bash(主题 |
| 清理 | 需要拆除的内容。运行器会停止它自己启动的应用, |
| 辅助工具 | Skill附带的任何脚本都必须是可执行的,且调用方式需在Skill正文中说明。需要读者反向工程才能使用的辅助工具不算合格的辅助工具。大多数项目不需要额外的辅助工具;e2e CLI就是辅助工具 |
(证据章节的)验证标准:测试真实的用户路径,而非内部设置方法或仅测试用的端点;捕获操作过程和最终状态,而非仅最终屏幕;在调研发现的存储位置验证副作用(写入的文件、插入的数据行、发送的消息);仅在生产环境已有边界隔离外部系统的地方才使用mock。如果安全路径是试运行或测试模式,需通过观察文件、网络和引用来验证它跳过了什么,而非仅信任其名称。
3. Seed the feature map
3. 初始化功能地图
Create plus one file per
user-facing feature you can identify, the top three to five first, from
routes, navigation, commands, or docs. Follow
references/example/verify-playground/,
the skill this generator produced and ran for the e2e playground app. The
index is a table of feature, route, test file, and status ( or
). Each feature file has these H2s, from the user's point of
view.
.agents/skills/verify-<app>/features/README.mdtesteduntested| H2 | Holds |
|---|---|
| What the feature is made of, one line each |
| Route, navigation, the account it needs |
| The test file that pins it, the locators that matter (checked with |
| The observable end state that means it works, on screen and in the side-effect store |
| One or two |
| What reads as broken but is not; what the local app cannot do |
The map is the project's maintained verification source, and the bug bash
reads its charters. A proof that drives one convenient entry point is
incomplete when the map lists others, and a bug bash that skips a mapped
feature reports the gap. A feature without a test gets one in step 4 or is
marked in the index.
untested创建文件,并为你能识别的每个用户可见功能创建单独的文件,优先处理前3到5个核心功能,可从路由、导航、命令或文档中梳理。参考references/example/verify-playground/——这是本生成器为e2e playground应用生成并运行过的Skill示例。索引文件是一个包含功能、路由、测试文件和状态(或)的表格。每个功能文件都从用户视角包含以下二级标题。
.agents/skills/verify-<app>/features/README.mdtesteduntested| 二级标题 | 内容 |
|---|---|
| 该功能的组成部分,每行一个 |
| 路由、导航路径、所需的账号权限 |
| 对应该功能的测试文件、关键定位器(已通过 |
| 证明功能正常的可观测最终状态,包括屏幕上的表现和副作用存储中的变化 |
| 该功能的一到两个 |
| 看起来像bug但实际不是的情况;本地应用无法实现的功能 |
功能地图是项目维护的验证基准,Bug Bash会读取其中的探索章程。如果功能地图列出了多个入口点,仅测试一个方便的入口点的验证是不完整的;如果Bug Bash跳过了已映射的功能,需报告该缺口。没有对应测试的功能要么在第4步补充测试,要么在索引中标记为。
untested4. Prove the generated skill before handing it over
4. 交付前验证生成的Skill
Run its own instructions end to end once, from a shell in the project.
- Doctor: the call the skill names, then the smoke test; both exit
npx e2e list.0 - Drive one mapped feature through its test file. One is enough; the map exists so later runs cover the rest. A missing test: write it now from the feature file, with locators checked over MCP.
- Bug bash one charter from the map: , plus
npx e2e explore '<charter>' --config <bug-bash config> --agent <persona> --max-steps 3 --output .e2e/bugbash/<slug>when the charter names one. Read its--session <name>and triage; do not verify every finding now. This proves the model, the config, and the output directory, not the app. Without a model, skip this step and say in the handover that the bug bash is unproven.Findings - Cleanup, then confirm the evidence still exists at the named location. A cleanup that eats the proof fails this step.
Fix what fails, and run Cleanup after every failed iteration too, so
broken attempts do not strand ports and processes. A generated skill that
was never executed is a draft, not a deliverable. Leave the project as the
user had it. The generated skill, its feature map, the gitignore line, and
any test you added are the change; output and the bug-bash config
stay untracked unless the user asks otherwise.
.e2e/在项目的shell中完整执行一次该Skill自身的操作流程。
- 诊断:运行Skill中指定的命令,然后执行冒烟测试;两者的退出码都应为
npx e2e list。0 - 通过测试文件驱动一个已映射的功能。只需一个即可;功能地图的存在是为了让后续运行覆盖其余功能。如果缺少对应测试:请根据功能文件立即编写,且定位器需通过MCP验证。
- 对功能地图中的一个探索章程执行Bug Bash:运行,如果章程指定了会话,需加上
npx e2e explore '<章程>' --config <bug-bash配置文件> --agent <角色> --max-steps 3 --output .e2e/bugbash/<slug>参数。读取其--session <名称>(发现)并进行分类;无需现在验证每一个发现。这一步是为了验证模型、配置和输出目录是否正常,而非验证应用本身。如果没有配置模型,跳过此步骤,并在交付时说明Bug Bash未经验证。Findings - 执行清理,然后确认证据仍存在于指定位置。如果清理操作删除了验证证据,则本步骤失败。
修复失败的问题,每次迭代失败后也要运行清理,避免失败的尝试遗留端口和进程。从未执行过的生成Skill只是草稿,而非可交付成果。保持项目的原始状态,和用户拿到时一致。生成的Skill、功能地图、gitignore新增行,以及你添加的任何测试文件属于变更内容;输出目录和bug-bash配置文件默认不被跟踪,除非用户另有要求。
.e2e/5. Hand over
5. 交付
Tell the user what landed. The skill path, the features mapped and which
have tests, the charters, what the proof run showed, and the evidence
paths. Running the map keeps it honest. When a route or label changes and
a test fails, the feature file changes in the same commit. Rerun this skill
when the app grows a feature the map lacks; section 1 says how an existing
map is treated.
告知用户生成的内容。包括Skill路径、已映射的功能及哪些已有测试、探索章程、验证运行的结果,以及证据路径。定期运行功能地图能保证其准确性。当路由或标签变更导致测试失败时,功能文件需在同一次提交中更新。当应用新增了功能地图中没有的功能时,重新运行本Skill;第1节说明了如何处理已有的功能地图。
Rules
规则
- Generate from what you observed. A section that could apply to any app is not finished.
- One sentence from the e2e skill beats a paragraph of your own. Link the topic.
- Never put a secret in the generated skill or the map. Name the
credential (topic ).
setup - Do not commit on the user's behalf. List what you created.
- 基于你观察到的实际内容生成。适用于任何应用的通用章节是不合格的。
- 引用e2e Skill中的一句话胜过自己写一段。请链接到对应的主题。
- 绝对不要在生成的Skill或功能地图中放入密钥。只需命名凭证即可(主题)。
setup - 不要替用户提交代码。列出你创建的所有内容。