run-puzzle-tests
について
このスキルは、WSL Rを使用してjigsawRテストスイートを3つのスコープオプション(完全、フィルター済み、または単一テスト)で実行し、結果を解釈します。ポストエディット検証、コミット前チェック、デバッグを目的として設計されており、`--vanilla`モードを決して使用しないことでrenv互換性を保証します。開発者はこれを使用して、合格/不合格/スキップのステータスを迅速に特定し、特定のテスト失敗の原因を突き止めます。
クイックインストール
Claude Code
推奨npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/run-puzzle-testsこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします
ドキュメント
Run Puzzle Tests
Run jigsawR test suite + interpret results.
Use When
- Post any R src edit
- Post new puzzle type|feature
- Pre-commit → verify nothing broke
- Debug specific fail
In
- Required: Scope (
full|filtered|single) - Optional: Filter pattern (
"snic","rectangular") - Optional: Test file path (single mode)
Do
Step 1: Choose Scope
| Scope | Use when | Duration |
|---|---|---|
| Full | Before commits, after major changes | ~2-5 min |
| Filtered | Working on one puzzle type | ~30s |
| Single | Debugging a specific test file | ~10s |
→ Scope chosen by workflow: full pre-commit, filtered for type work, single for debug.
If err: unsure → default full. Slower but catches cross-type regressions.
Step 2: Create+Exec Test Script
Full:
Create /tmp/run_tests.R:
devtools::test()
R_EXE="/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe"
cd /mnt/d/dev/p/jigsawR && "$R_EXE" -e "devtools::test()"
Filtered:
"$R_EXE" -e "devtools::test(filter = 'snic')"
Single:
"$R_EXE" -e "testthat::test_file('tests/testthat/test-snic-puzzles.R')"
→ Test out w/ pass/fail/skip.
If err:
- NEVER
--vanilla; renv needs.Rprofile - renv errs →
renv::restore()first - Complex cmds fail Exit 5 → write script file
Step 3: Interpret Results
Summary line:
[ FAIL 0 | WARN 0 | SKIP 7 | PASS 2042 ]
- PASS: Succeeded
- FAIL: Need investigation
- SKIP: Skipped (missing optional pkg like
snic) - WARN: Warns (review, not blocking)
→ Summary parsed → PASS, FAIL, SKIP, WARN counts. FAIL=0 = clean.
If err: no summary → runner crashed pre-complete. Check R errs above. Output truncated → redirect: "$R_EXE" -e "devtools::test()" > test_results.txt 2>&1.
Step 4: Investigate Fails
If fail:
- Read msg → file, line, expected vs actual
- New fail or pre-existing?
- Assertion → read test + tested fn
- Error → check fn signature changed?
# Run just the failing test with verbose output
"$R_EXE" -e "testthat::test_file('tests/testthat/test-failing.R', reporter = 'summary')"
→ Root cause id'd. Real regression (fix code) or env issue (dep, path).
If err: msg unclear → add browser()|print() + re-run via testthat::test_file() for interactive debug.
Step 5: Verify Skip Reasons
Skips normal when optional deps missing:
snic→skip_if_not_installed("snic")- OS-specific →
skip_on_os() - CRAN-only →
skip_on_cran()
Confirm legitimate, not masking real fails.
→ All skips accounted by legit reasons. None mask actual fails.
If err: skip suspicious → temp remove skip_if_*() + run → see if pass or hidden fail.
Check
- All pass (FAIL=0)
- No unexpected warns
- Skip matches expected (only optional dep skips)
- Test count not decreased (no accidentally removed)
Traps
--vanilla: Breaks renv. Never w/ jigsawR.- Complex
-estrings: Shell escape → Exit 5. Use script files. - Stale pkg state: Run
devtools::load_all()|document()before test if NAMESPACE changed. - Missing test deps: Some need Suggests pkgs. Check
DESCRIPTION. - Parallel issues: Tests interfere → run sequential w/
testthat::test_file().
→
generate-puzzle— gen puzzles → verify behavior matches testsadd-puzzle-type— new types need comprehensive suiteswrite-testthat-tests— general R test patternsvalidate-piles-notation— test PILES parse standalone
GitHub リポジトリ
関連スキル
evaluating-llms-harness
テストこのClaudeスキルは、lm-evaluation-harnessを実行し、MMLUやGSM8Kなど60以上の標準化学術タスクでLLMをベンチマークします。開発者がモデルの品質を比較し、トレーニングの進捗を追跡し、学術的な結果を報告するために設計されています。このツールはHuggingFaceやvLLMモデルを含む様々なバックエンドをサポートしています。
cloudflare-cron-triggers
テストこのスキルは、cron式を使用してWorkersをスケジュールするためのCloudflare Cron Triggersの実装に関する包括的な知識を提供します。定期的なタスクの設定、メンテナンスジョブ、自動化されたワークフローの構築を網羅し、無効なcron式やタイムゾーン問題といった一般的な課題への対処法も含みます。開発者はこれを使用して、スケジュールされたハンドラーの設定、cronトリガーのテスト、WorkflowsやGreen Computeとの連携を構成できます。
webapp-testing
テストこのClaude Skillは、Playwrightベースのツールキットを提供し、Pythonスクリプトを通じてローカルWebアプリケーションのテストを可能にします。フロントエンドの検証、UIデバッグ、スクリーンショット撮影、ログ表示を実現し、サーバーライフサイクルを管理します。ブラウザ自動化タスクにご利用いただけますが、コンテキストの汚染を避けるため、スクリプトのソースコードを読むのではなく直接実行してください。
finishing-a-development-branch
テストこのスキルは、開発者がテストの合格を確認し、構造化された統合オプションを提示することで、完成した作業を仕上げることを支援します。実装が完了した後のマージ、PR作成、ブランチの整理といったワークフローを案内します。コードが準備できてテスト済みの際に使用し、開発プロセスを体系的に完了させましょう。
