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

test-writer

依頼された動作を既存のテスト環境で確かめるテストコードやデータを作成・改善し、狭い範囲で実行してテスト側の不具合も直します。

原文原文の説明を見る

Write and improve test-owned code: tests, test scripts, fixtures, evals, and test-only helpers. Use whenever Codex is asked to create or change test code. Its only job is to produce the strongest practical tests in the repository's existing harness, run them, and fix defects in the test code.

sno-ai/sno-station-skillsスター 884(GitHub 884 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 機能変更に合わせてテストを追加したいとき
  • テスト用データや補助コードを改善したいとき
  • 不具合を再現するテストを書きたいとき
  • 変更したテストを絞って実行したいとき

日本語での紹介

できること

依頼された動作とリポジトリの実装を確認し、既存の言語、フレームワーク、テスト用データ、配置に合わせてテストコードを作成・改善します。ユニットテスト、連携を確かめるテスト、エンドツーエンドテスト、モデルやエージェント向けの評価・シミュレーションなどから、実際の動作を確かめられる最小の範囲を選びます。テスト、テストスクリプト、フィクスチャ、テスト専用ヘルパーなどを扱い、変更したテストを実行してテストコード側の不具合を修正します。

こんなときに便利

機能変更に合わせてテストを追加したいとき、既存のテストデータや補助コードを直したいときに向いています。実際のコードやファイルシステムなどを使って結果を確認したい場合や、テストが製品側の不具合を見つけたときに、その失敗内容を切り分けて報告したい場合にも役立ちます。

使い方の例

  • 「この動作の受け入れ条件を満たすテストを追加してください」
  • 「変更したテストを実行して、テストコード側の問題を直してください」
  • 「この不具合を再現するテストを書いてください」

注意点

担当範囲はテストコードとテスト用設定で、製品本体のソースは変更しません。実行するのは変更した動作と直接関係するテストに限ります。実行にはシェルとファイルの読み書き環境が必要です。

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

含まれるファイル(3)

  • SKILL.md5.6 KB
  • references/eval-sim-patterns.md8.5 KB
  • scripts/selftest/run-selftest.sh874 B

SKILL.md(原文)

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

Test Writer

Write the best test code for the requested behavior. Start with the repository and the behavior.

Test scope

  • Run tests only for the changed behavior and its directly affected callers or integrations.
  • Do not run full evaluation, unit, integration, repository, site, or all-module suites unless the owner explicitly requests them.
  • A skill, PRD, reviewer, repository document, or default package script does not grant that permission.
  • After a failure, rerun the failing case first. Once it passes, run only directly affected cases; do not expand by default.
  • Build artifacts required for a requested deployment are not permission to run unrelated tests.
  • Every development task has a finite budget including setup, execution, and reporting; before each run, estimate duration from available timings and name the changed behavior it verifies, using a stated estimate when timings are unknown rather than building a timing system or running a preliminary suite.
  • Remove checks and repeated runs that neither establish the requested main function nor expose its defects; select the smallest useful test that fits the remaining development budget, never spend it on reassurance.

Single responsibility

Own only test code:

  • tests and test scripts
  • fixtures and test-only helpers
  • eval and simulation code
  • test harness configuration required by those files

The output of this skill is test-owned code and the result of running it. Return product defects to the caller; do not edit production/runtime source.

Core principles

  1. Everything should be real. Exercise the real code path, real parser, real filesystem, real database, real API, or real service whenever the repository can provide it.
  2. We hate mocking. A mock easily proves that the mock behaves like its setup while the product remains broken. Never mock the system under test. Use a substitute only when a truly external dependency cannot be run, and keep the substitute narrower than the behavior being proved.
  3. Assert observable results. Check returned content, persisted state, emitted files, external effects, cleanup, and errors. Do not assert call counts when a real effect can be observed.
  4. A test must catch a real defect. Every assertion must be able to fail when the product behavior is wrong. Do not add tests for quotas, coverage theater, or speculative cases.
  5. Use realistic data. Match production formats, sizes, identifiers, timestamps, and sequences closely enough to expose real failures.
  6. Keep tests deterministic and isolated. Use unique test identities, clean up created state, avoid shared-order assumptions, and make failures reproducible.

Test ownership

Use this skill when changing test-owned files. Keep the test independent of the production fix and report real failures. Do not enforce ownership through an edit-blocking hook or require an edit lease before writing a test.

Write the code

  1. Read the requested behavior or acceptance criteria.
  2. Read the implementation boundary, its immediate callers, nearby tests, test configuration, and the repository's normal test command.
  3. Reuse the existing language, framework, fixtures, and directory layout. Ask only when a new framework, dependency, credential, or external environment is genuinely required.
  4. Choose the smallest test boundary that proves the real behavior:
    • unit for pure deterministic logic;
    • integration for filesystem, database, API, cache, queue, or component interaction;
    • end-to-end for a complete user or service journey;
    • eval or simulation for non-deterministic model or agent behavior.
  5. Write the test code. Prefer one strong journey over several weaker duplicates.
  6. Run the narrowest command that executes the changed test. Fix syntax, fixtures, cleanup, flakiness, and other defects in test-owned code.
  7. Report the changed test files, the command run, and the observed result. If the test exposes a product defect, name the failing behavior and evidence.

Test quality

  • Test public behavior rather than private implementation details.
  • Verify positive behavior and the important failure that could silently corrupt or lose data.
  • Check both the primary result and its meaningful side effect when both are part of the contract.
  • For E2E work, exercise the changed primary flow through its ordinary entry to destination read-back. Reproduce the actual bug for a fix; do not plant extra defects in every new feature merely to complete a proof pattern. The harness may prepare inputs and environment and observe results; if it supplies a missing product step, return a product or contract defect.
  • Keep setup shorter than the behavior it proves. If setup dominates, find a more direct real boundary or a reusable real fixture.
  • Never weaken, skip, or delete an assertion just to make a failing test pass.
  • Do not add a second proof layer unless it can catch a materially different defect.
  • Use the task's agreed time limits for long calls; do not add an arbitrary timeout that kills useful work or hides its output.

Optional code references

  • For eval and simulation implementations, read references/eval-sim-patterns.md.

レビュー

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

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

agentic-time-estimate

無料概要あり

AIエージェントの作業時間を、進行中の作業なら実測した進捗と残作業から見積もり、これからの作業なら作業量や基準データから算出します。利用者向けの時刻も指定コマンドで確認します。

  • 実行中の作業の残り時間を知りたいとき
  • 新しい依頼の所要時間を見積もりたいとき
  • 終了予定や現在時刻を利用者向けに示したいとき
sno-ai/sno-station-skills8842026年10月29日 更新

agentic-walkthrough

無料概要あり

成功と報告された処理が、意図したデータ変更や外部呼び出しを本当に起こしたかを、入口から出力先まで追い、実行箇所と観測できる数値で確かめます。

  • 成功扱いのジョブがデータを変更したか確かめたいとき
  • 出力が後続処理から読めるか追跡したいとき
  • API呼び出しが実際に送信されたか調べたいとき
sno-ai/sno-station-skills8842026年10月29日 更新

away-brief

無料概要あり

離席中に記録された完了作業、停滞中の項目、返答待ち、利用枠の変化を1ページに整理し、戻ったときの状況把握を助けます。

  • 離席後に作業状況を把握したいとき
  • 完了・停滞中の作業を確認したいとき
  • 返答待ちの質問を整理したいとき
sno-ai/sno-station-skills8842026年10月29日 更新

catch-report

無料概要あり

相互レビューとエージェント自身の自己点検で見つかった問題を記録から集計し、期間やモデル別に並べて確認できるようにします。

  • 相互レビューと自己点検の結果を比べたいとき
  • 今週のレビュー結果を確認したいとき
  • 別モデルが見つけた問題を知りたいとき
sno-ai/sno-station-skills8842026年10月29日 更新

charter

無料概要あり

担当者が成果物や対象外の範囲、確定済みの判断、合否を確認できる方法を明文化した作業憲章を作成・改訂し、既存憲章の不整合も点検します。

  • 作業を依頼する前に完了条件を文書化したいとき
  • 作業範囲の変更を憲章に反映したいとき
  • 憲章と実際の作業の食い違いを確認したいとき
sno-ai/sno-station-skills8842026年10月29日 更新

codex-coder

無料概要あり

Claude CodeからCodexへ実装作業を引き継ぎ、Shell、TypeScript、Python、Rustの言語に応じた手順でコードを書かせます。

  • CodexにTypeScriptの実装を依頼したいとき
  • PythonやRustへの移行を任せたいとき
  • 複数言語にまたがる変更を依頼したいとき
sno-ai/sno-station-skills8842026年10月29日 更新

sno-ai のスキルをすべて見る

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