Webアプリのアクセシビリティを点検し、WCAG 2.2のA・AA違反の検出から、フレームワーク別の修正案、再検証、監査報告書の作成まで支援するスキル。
- 公開前にアクセシビリティを点検したいとき
- 配色やキーボード操作を修正したいとき
- 関係者向けの監査報告書作成
不具合を再現するテストを先に失敗させ、修正後の成功と、修正を外した際の再失敗まで確認します。テストが問題を実際に検出していることを実行結果で確かめます。
Turns a suspected bug into a proven one. Verify the cause against reality before claiming it, write a test that FAILS on the current code, apply the fix, watch it pass — then revert the fix and confirm the test goes red again, because a test that passes both ways proves nothing. Invoked bare after a debugging conversation, it takes the target from context rather than asking. Use when fixing a bug, investigating an incident, hardening a flaky area, or when asked to "add tests that reveal the bug". Triggers on "/red-green-proof", "prove the bug", "red-green", "make the test fail first", "is that test load-bearing", "reveal the bug with a test".
実行スコア 未検証
インストール方法を見る不具合の原因を実際のコードやログなどで確認し、修正前に失敗するテストを作ります。最小限の修正で成功させた後、修正を一時的に外して再び失敗することまで検証します。同じテストと判定条件を使い、問題そのものを検出しているかを実行結果で確かめます。
バグ修正や障害調査に加え、修正後に追加した再発防止テストの有効性を確認したい場面に向いています。不安定なテストでは、失敗時の乱数の種や実行順序などを残してから調査します。原因は確認済み・推測・不明を区別して報告します。
対象コードとテストを実行できる環境が必要です。修正を一時的に取り除く工程があり、検証後に復元して全体テストと型チェックを実行します。直接再現できない場合は、構造の検査やモデルによるテストなどの種別と限界を明記します。MIT Licenseで提供されています。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
A bug is not fixed because the tests pass. A bug is fixed when a test fails without your fix and passes with it, and you have watched it do both.
Use this skill when a bug, incident, flaky test, or unproven regression test is under investigation. It applies a strict red-green-red loop: establish the cause, observe a focused test fail, make the smallest fix, then remove the fix and observe the test fail again. The final revert is the proof that the test is actually coupled to the defect.
Keep evidence for each phase separate. A test command that exits zero is not evidence that it exercised the defect; record the assertion and the observed failure or success. Do not proceed when the current phase is unobserved.
Before changing code, identify the exact test command and expected red signal. After the fix, run that same command without changing its assertions. During the revert, use the same command again and preserve the failure output. Restore the fix before running the broader suite.
Report each investigation with: (1) target and cause, labeled Proven,
Inferred, or Unknown; (2) the red command and actual failure before the
fix; (3) green and revert-red results with actual output; and (4) final suite
status and remaining uncertainty.
Most "regression tests" written after a fix never had the chance to fail. They are decoration. This skill is the discipline that separates a real test from a decorative one.
With an argument, that is the target: /red-green-proof the status endpoint reports finished runs as running.
With no argument, take the target from the conversation. The usual case is that you have just spent a long stretch investigating something — the bug is already on screen. Do not ask what to work on. Scan back through the session and pick, in this order:
State your pick in one line and start:
Target: the buffer discards events when the flush write fails (
checkpointBuffer.ts:271). Verifying before writing the test.
Only ask the user if two or more candidates are genuinely equal in priority — then list them as a short numbered choice and stop. If several related defects came up, handle them one at a time through the full loop rather than batching; each needs its own red.
If nothing in the conversation qualifies, say so and ask for a target rather than inventing one.
Run these in order. Do not skip 1, and never skip 4.
Before you write a line of test code, establish what actually happened using evidence you can point at: the real record from the database or API, the real log line, the actual source of the function you are blaming.
Say which of these you have:
State the label out loud. If the honest answer is Unknown, say so and name the one artifact that would settle it. A confident wrong cause costs more than an admitted gap, because it sends the fix to the wrong place.
Two traps worth naming:
git log -S '<the exact line>' and read the commit. If a test already asserts the current behaviour, someone may have wanted it. Understand why before you invert it.The test must fail against the code as it is right now, before any fix exists.
Name it after the defect, not the function: reveals bug: stale status shadows a terminal event, not test inferStatus.
Assert the observable consequence a user or caller would see — the wrong status, the lost record, the 500 — not an internal call count. Call counts pass for the wrong reasons.
If it does not fail, you have not reproduced the bug. Go back to step 1.
Smallest change that makes the failing test pass. If the fix needs to be large, the test was probably too broad — narrow it and split.
Put the buggy code back, run the test, and watch it fail. Then restore the fix.
cp path/to/fixed.ts /tmp/fix.bak
# revert the fix (edit, patch, or git stash the single file)
<run the specific test> # MUST fail here
cp /tmp/fix.bak path/to/fixed.ts
<run the specific test> # green again
If it stayed green, the test is fake. Not "probably fine" — fake. Rewrite it and repeat.
This is not paranoia. It catches a specific, common failure: a test that exercises a path adjacent to the bug rather than the bug. Two real examples:
await between each writer's read and its write. Both ran to completion atomically, never interleaved, and the test passed with the lock removed. Fix: add latency between read and write, mirroring the real network gap.null rather than throwing. The error path never ran. Fix: inject a real 500.Both looked correct on the page. Only the revert exposed them.
The full suite, plus type checks. A fix that corrects one behaviour often contradicts a test that pinned the old one — which is a finding, not an annoyance. Go read that test and decide deliberately (see step 1).
Sometimes the buggy code cannot be invoked: it is a closure inside a 3,000-line factory, a route handler, a private method. Do not fake a behavioural test. Pick one of these and label it in the file header:
| Type | Use when | Honesty requirement |
|---|---|---|
| Extract, then test | The logic can be moved to a module with injected dependencies | Preferred. Do this if the extraction is small. |
| Structural test | The call site cannot be reached, but the invariant is visible in the source | Scan the source and assert the property (e.g. "every write cycle sits inside the lock"). It will name offenders itself. Say in the header that it is structural and should be replaced when the code becomes reachable. |
| Model test | Testing an interaction between components you cannot both instantiate | Mirror the real code field-for-field, cite the file:line it models, and note in the header that it is a model. Extra important to run step 4 — models are where fake tests hide. |
| Characterization test | Documenting current behaviour you are not fixing yet | Name it as such. Do not call it a regression test. Flag that it will invert when the bug is fixed. |
When you present the work, include:
Do not describe a test as "revealing the bug" unless you have seen it red.
Red first, green second, red again on purpose, then green — and say which parts you actually proved.
Originally created and maintained by RooAGI as the rooagi-red-green-proof
skill. Copyright © 2026 RooAGI. Contributed under the MIT License.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Webアプリのアクセシビリティを点検し、WCAG 2.2のA・AA違反の検出から、フレームワーク別の修正案、再検証、監査報告書の作成まで支援するスキル。
Webページの見出しやボタン、料金表示などの変更を検証するために、仮説・評価指標・必要人数・実施期間を整理し、A/Bテストの設計から結果分析まで支援します。
有料広告の見出しや本文を媒体ごとの文字数に合わせて作成し、配信実績を基にした改善案や比較テスト用の文案展開、文字数・表現の検証まで進めるスキル。
コード変更を本番障害、保守性、セキュリティの三つの視点で厳しくレビューし、見落としや弱い前提を洗い出して、重要度とマージ判断をまとめるスキル。
AIの回答で引用されることを目指し、記事の根拠や著者情報、構造を点検・改善します。監査レポートの作成に加え、見つけた引用を記録し、ページ別の状況を集計します。
デプロイや削除、支払いなど重要なエージェント操作に、改ざんを検知できる署名付き記録を作成します。記録の要否を判断し、発行から証明書だけでのオフライン検証まで扱います。