一键导入
summarize-testdata-changes
Instructions for summarizing changes to Carbon testdata files (`toolchain/*/testdata`).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Instructions for summarizing changes to Carbon testdata files (`toolchain/*/testdata`).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Instructions for registering, mapping, constant evaluating, and lowering builtin functions in the Carbon toolchain.
Instructions for declaring, formatting, emitting, testing, and styling diagnostic messages (errors, warnings, notes) in the Carbon toolchain.
Guidelines and restrictions on shell commands and file manipulation tools for AI assistants.
Instructions that **MUST** be followed when using Bazel or Bazelisk to build, test, and debug in the Carbon repository.
Instructions for using Jujutsu (jj) for version control in the Carbon repository.
Instructions for running prek, the Carbon pre-submit/style/lint checker, that *MUST* be run before submitting an change.
| name | Summarize testdata changes |
| description | Instructions for summarizing changes to Carbon testdata files (`toolchain/*/testdata`). |
This skill provides instructions for creating a comprehensive report summarizing
changes to Carbon testdata files (toolchain/*/testdata) and associating them
with related code changes.
Produce a report that:
Use your VCS (Git or Jujutsu) or query Github to identify changes. For large changes, it is recommended to use the included helper script to extract test input changes.
git diff --stat -- ':!toolchain/*/testdata'
git diff -- ':!toolchain/*/testdata'git diff --name-only 'toolchain/*/testdata'jj --no-pager diff --stat '~toolchain/*/testdata'
'~toolchain/*/testdata' is critical if it
contains wildcards.--git to get standard
unified diff format: jj --no-pager diff --git '~toolchain/*/testdata'jj --no-pager diff --name-only 'toolchain/*/testdata'gh pr diffgh pr diff --name-only | grep '^toolchain/.*/testdata'If you are summarizing changes in a specific revision (for example, @-) or
pull request (for example, #1234), add -r <rev> or <pr_number> to the
commands:
git diff <rev>^ <rev> ... (or use git show <rev>)jj --no-pager diff -r <rev> ...gh pr diff <pr_number>To easily identify changes, use the included Python helper script to extract all text additions and removals from the diff, categorized by Input, STDERR, and STDOUT changes. This script reads a unified diff from stdin.
# For Git:
git diff -- 'toolchain/*/testdata' | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
# For Jujutsu (jj):
jj diff --git 'toolchain/*/testdata' | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
# For a specific revision with jj:
jj diff -r @- --git 'toolchain/*/testdata' | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
# For a specific PR with Github:
gh pr diff 1234 | python3 .agents/skills/summarize_testdata_changes/scripts/parse_diff.py
CHECK lines.
// CHECK), along with diagnostic output changes where relevant// CHECK:STDERR) with no corresponding changes to test inputs// CHECK:STDOUT)
CHECK
lines.// CHECK)
or diagnostic output (lines prefixed with // CHECK:STDERR):
// CHECK:STDOUT):
As a final validation step:
Use the following template for the generated report:
# `testdata` Change Summary
## Code Changes
[One paragraph summarizing changes outside of testdata.]
## Test Changes
### [Group Name]
[Description of the group.]
[Change 1: diff context OR link]
[Change 2: diff context OR link]
...
## Diagnostic Changes
### [Group Name]
[Description of the group.]
[Change 1: diff context OR link]
[Change 2: diff context OR link]
...
## [Output Type] Changes
### [File Path]
[Description of the group.]
[Example diff context]
Changes of this kind were found in [Number] files. Examples: [List of files]
...
Skip sections that would be empty.