write-tests

作成者: huggingface

Write failing tests from requirements. Invoke for each todo before /implement.

npx skills add https://github.com/huggingface/openenv --skill write-tests

/write-tests

Write failing tests that encode acceptance criteria.

Usage

/write-tests
/write-tests Add logout button to header

When to Use

  • After creating a todo that requires implementation
  • Before running /implement
  • When you have clear acceptance criteria

When NOT to Use

  • Implementation already exists (tests would pass immediately)
  • You're exploring or prototyping (not TDD mode)
  • Just adding to existing test coverage

What It Does

  1. Analyzes the current todo/requirement
  2. Reads existing tests to understand patterns
  3. Writes test files that verify acceptance criteria
  4. Verifies tests FAIL (proves they test something real)
  5. Returns test file paths for /implement

Output

The tester agent will produce:

## Tests Written

### Files Created/Modified
- `tests/test_client.py`

### Tests Added
| Test | Verifies |
|------|----------|
| `test_client_reset_returns_observation` | Reset returns valid observation |
| `test_client_step_advances_state` | Step mutates state correctly |
| `test_client_handles_invalid_action` | Error handling for bad input |

### Verification
All tests FAIL as expected (no implementation yet).

### Next Step
Run `/implement` to make these tests pass.

Rules

  1. Read existing tests first to understand patterns and conventions
  2. Test behavior, not implementation - write from user's perspective
  3. Integration tests first, then unit tests if needed
  4. Each test verifies ONE thing clearly
  5. Run tests to verify they fail before returning

Anti-patterns (NEVER do these)

  • Writing tests that pass without implementation
  • Testing implementation details instead of behavior
  • Writing overly complex test setups
  • Adding implementation code (that's /implement's job)
  • Writing tests that duplicate existing coverage

Completion Criteria

Before returning, verify:

  1. Tests compile/run successfully (pytest can collect them)
  2. Tests FAIL (no implementation yet)
  3. Test names clearly describe what they verify
  4. Tests follow existing project patterns (see tests/ for examples)

huggingfaceのその他のスキル

cpu-kernels
huggingface
C++ CPUカーネルをSIMDイントリンシクス(AVX2/AVX512)を用いて記述、最適化、ベンチマークするためのガイダンスを提供します。Hugging Faceカーネルエコシステム向けです。含まれるもの…
official
generate-openenv-env
huggingface
具体的なユースケース(例:「ライブラリtextarena用のenvを生成する」)からOpenEnv環境を生成します。新しい環境の設計や実装を求められた際に使用します。
official
hf-mcp
huggingface
Hugging Face HubをMCPサーバーツール経由で利用します。モデル、データセット、Spaces、論文を検索できます。リポジトリの詳細を取得し、ドキュメントを取得し、計算ジョブを実行し、Gradioを使用します…
official
trl-training
huggingface
TRL(Transformers Reinforcement Learning)を使用してトランスフォーマー言語モデルをトレーニングおよびファインチューニングします。SFT、DPO、GRPO、KTO、RLOO、および報酬モデルのトレーニングをサポートしています…
official
deploy-hf
huggingface
OpenEnv環境をHugging Face Spacesにデプロイします。デプロイ、Hugging Faceへのプッシュ、またはスペースの更新を求められたときに使用します。
official
hf-space-recovery
huggingface
Diagnose and recover failing or stuck Hugging Face Space deployments for OpenEnv environments. Use when deploying envs from `envs/` to the Hub (`openenv`…
official
pre-submit-pr
huggingface
プルリクエストを送信する前に変更を検証します。lint、テスト、アライメントレビュー、RFC分析を含む包括的なチェックを実行します。作成前に使用…
official
example-skill
huggingface
アクションスモークテスト用のフィクスチャスキルの例
official