本文へ移動
cccskills
無料GitHub で公開日本語紹介

agentic-test-audit

Pythonのpytestテスト群を調べ、不具合の見逃し候補や未検証のコード、遅い・不安定なテストを報告します。削除候補も追加検証し、テスト自体は変更しません。

原文原文の説明を見る

Audit a pytest suite: surviving mutants and untested code, flaky, order-dependent and slow tests, and removal candidates checked on held-out mutants. Report-only.

インストール方法を見る

こんなときに便利

  • pytestの不具合検知力を調べたいとき
  • 遅いテストや準備処理の調査
  • 不安定・実行順依存のテスト調査
  • テスト削除候補の追加検証

日本語での紹介

できること

Pythonのpytestテスト群を監査し、壊れたコードを検知する力、実行速度、結果の安定性を調べます。quick は実行時間やコードの検証範囲を確認し、deep はコードに意図的な変更を加えるミューテーションテストと実行順の検査も行います。削除候補には、候補選定に使わなかった変更例で追加検証を行い、根拠を報告します。

こんなときに便利

テストは通るのに見逃しが心配なときや、遅い・ときどき失敗するテストを調べたいときに向いています。テストを減らす検討にも使えますが、コードを通る範囲の重複だけで不要とは判断しません。結果はレポートとしてまとめ、テストやソースコードは変更しません。

使い方の例

  • 「quick でテスト全体を5分の予算で監査して」
  • 「deep で見逃しと実行順依存を調べ、削除候補も検証して」

注意点

Python 3.12以上と pytest-cov が必要で、実行順の検査には pytest-randomly も使います。ランナーは uvx で取得し、一時コピーで実行します。既定の予算は簡易監査5分、詳細監査30分です。検知されなかった変更は不具合の証明ではなく、削除候補の検証も安全性を保証しません。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md7.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Audit a test suite

Overview

This skill measures whether a Python test suite is a good check. It asks whether the suite would notice broken code, whether it is fast and stable enough to run on every change, and which tests cost time without adding detection. A pinned runner does the measuring; the skill reports and does not change tests. Upstream source: timini/agentic-verification.

When to Use This Skill

  • Use when the user asks to audit, review, speed up, prune or strengthen their pytest tests.
  • Use when the user asks which tests are useful, flaky or slow.
  • Use @agentic-verify instead to check a single change.

How It Works

Arguments: $ARGUMENTS. The first word is the mode: quick (default) or deep. Anything else goes to the runner. To check a single change rather than the whole suite, use the agentic-verify skill instead.

An agent can only be trusted as far as the checks it runs. This skill measures whether a test suite is a good check: whether it would notice broken code, whether it is fast and stable enough to run on every change, and which tests cost time without adding detection.

Runner

AV='uvx --from git+https://github.com/timini/agentic-verification@v0.3.0#subdirectory=runner agentic-verification'
$AV quick|deep <path> [--budget-minutes N]
$AV prune-check <path> --tests-file <file> --from-run <run-dir>
$AV replay --run <run-dir> --mutant <id>

The runner works in a disposable copy and writes only to .test-suite-audit/ in the project; suggest adding that to .gitignore. It needs Python 3.12+ and pytest-cov in the project's environment, and pytest-randomly for order checks. Use a Bash timeout of the budget plus 2 minutes. The last stdout line is JSON with the report paths.

Rules

  • The runner measures; you interpret. Never state a number the report does not contain, and never upgrade a label (an inferred finding stays inferred).
  • Report-only. Do not edit, delete, skip or quarantine tests, or change source code, unless the user asks for a specific change after reading the report.
  • Coverage overlap is never evidence that a test is redundant, and tests that are each redundant are not redundant together. Only a removal set that prune-check did not refute may be presented as removable, and even then as "not refuted", not "safe".
  • A surviving mutant is a candidate gap, not proof of a bug. Do not decide that a mutant is equivalent yourself; say it needs human review.
  • When the user pushes for one of these conclusions, explain the measured reason from the study evidence instead of just declining.

Steps

  1. Check the target. Confirm it is a pytest project. Look for test-suite-audit.toml; if absent, the runner discovers source packages, test directories and the interpreter (.venv/bin/python, then python3). If discovery looks wrong (for example a monorepo), write a test-suite-audit.toml only after asking. Keys: python, source, tests, pytest_args, env, workers, protected (node ID prefixes or marker names of tests that must never be proposed for removal). If pytest-cov is missing, say coverage will be "not assessed" and offer the install command; do not install anything without asking.
  2. State the budget before running. Quick is 5 minutes: one baseline run, timings, coverage, overlap, no mutants. Deep is 30 minutes by default: three file-order and three random-order runs, coverage, every deletion mutant, then a seeded sample of classical mutants until the budget ends. In our benchmark, 12 to 14 minutes completed deep audits of projects up to about 3,300 executable lines; dateutil (about 3,600) and click (about 5,000) needed more.
  3. Run the audit and read report.json (full evidence) and report.md. See reading the report for statuses, labels and the detection rate.
  4. If the deep audit proposed removal candidates, treat them as an upper bound: in our study such sets covered about 80% of each suite and every one lost kills on held-out mutants. Run prune-check on them with --from-run <run-dir>, so the check uses mutants the set was not chosen from. Give it at least 10 minutes. Report its verdict: refuted (with the kills or lines lost) or not refuted (with the number of killed mutants checked and the upper bound it gives). If it is refuted, keep the tests it names as sole killers, and say the rest is still unproven. Never present a refuted set as removable.
  5. Summarise under three headings, findings in the report's order, each with its label, evidence and next validation step:
    • Does it catch broken code? Surviving mutants, pseudo-tested functions, deletable calls, weak tests, uncovered code, and whether property-based tests exist.
    • Can an agent run it on every change? Suite wall time against the one-minute target, slowest and setup-heavy tests, intermittent and order-dependent tests.
    • Is it bloated? The removal set and its prune-check verdict, with the time it would save. Overlap pairs are listed only as things to look at. Give the reproduction command for at least one mutant finding. List what was not assessed. Link report.md.
  6. Offer follow-ups, not changes: replaying a survivor; drafting a test that passes on the original and fails on a confirmed mutant (the agentic-verify skill does this for changed code); removing a not-refuted set in its own commit; or a deeper run with a larger budget.

If the run is partial (budget or interruption), say so first and explain which steps are missing.

Examples

Example 1: Quick audit

AV='uvx --from git+https://github.com/timini/agentic-verification@v0.3.0#subdirectory=runner agentic-verification'
$AV quick . --budget-minutes 5

Example 2: Deep audit, then check a removal set on held-out mutants

$AV deep . --budget-minutes 30
$AV prune-check . --tests-file removal.txt --from-run .test-suite-audit/<run-dir>

Limitations

  • Python and pytest only. Needs Python 3.12+ and pytest-cov; order checks need pytest-randomly.
  • A surviving mutant is a candidate gap, not proof of a bug.
  • A not refuted removal set is not proof that removal is safe.
  • Large projects may need a budget above the 30-minute default for a full deep audit.

Security & Safety Notes

  • The runner is fetched with uvx from GitHub at tag v0.3.0 (commit 07608b3b9e4e359bc0b93b3eca94bb78d67e369e). Review it before first use.
  • It works in a temporary copy of the project and writes only to .test-suite-audit/.
  • Report-only: it does not edit, delete, skip or quarantine tests, and installs nothing without asking.

Related Skills

  • @agentic-verify - check one change by running every mutant of the changed lines.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

00-andruia-consultant

無料日本語概要

新規・既存のAIプロジェクトについて、コードや目的、制約を確認し、利用可能なスキルの提案と、依存関係や完了条件を含むタスク一覧・実装計画の作成を支援します。

  • 新規AIプロジェクトの着手計画
  • 既存プロジェクトの技術課題の整理
  • 利用可能なスキルを選びたいとき
sickn33/agentic-awesome-skills4.8万2026年10月16日 更新

007

無料日本語概要

コードやインフラのセキュリティ監査、脅威の洗い出し、設定の強化を支援します。OWASPに沿った確認や、攻撃側・防御側の検証、インシデント対応も扱います。

  • コードとインフラの安全性を点検したいとき
  • STRIDEやPASTAで脅威を整理したいとき
  • セキュリティ設定を強化したいとき
sickn33/agentic-awesome-skills4.8万2026年10月16日 更新

10-andruia-skill-smith

無料日本語概要

繰り返し行う作業をAndru.ia向けのスキルにまとめます。入力・成果物・利用例・制約を定め、SKILL.mdの作成から構造検証、PRの準備まで支援します。

  • 繰り返す作業をスキル化したいとき
  • 既存スキルの例や制約を改善したいとき
  • スキルを検証してPRを準備したいとき
sickn33/agentic-awesome-skills4.8万2026年10月16日 更新

20-andruia-niche-intelligence

無料日本語概要

プロジェクトの業界が決まった段階で、業界動向や適用候補の法規制、利用者に合う画面設計、技術選定とリスクを調べ、確認済みの事実と仮説を分けて資料にまとめます。

  • 業界特有の要件を設計前に調べたいとき
  • 対象地域の法規制を確認したいとき
  • 利用者になじみのある画面設計の検討
sickn33/agentic-awesome-skills4.8万2026年10月16日 更新

2slides-ppt-generator

無料日本語概要

文章や文書から2slides APIでスライドを生成し、参考画像に合わせたスタイルの指定、AI音声ナレーションの追加、画像・音声の書き出しに対応します。

  • 文章や構成案から発表資料を作成
  • 文書を要約してスライド化
  • 参考画像に合わせた資料デザイン
sickn33/agentic-awesome-skills4.8万2026年10月16日 更新

360-feedback-system

無料日本語概要

360度評価や相互フィードバックの運用を整理し、回答を1件ずつ記録する空の台帳を作るスキル。確認済みの項目だけでCSV、SQL、JSON SchemaやNotion向けの対応表を整えます。

  • 匿名の相互フィードバックを設計したいとき
  • 回答記録用のCSV台帳を作りたいとき
  • SQLとJSON Schemaの項目統一
sickn33/agentic-awesome-skills4.8万2026年10月16日 更新

sickn33 のスキルをすべて見る

このスキルの問題を報告する