Back to Skills

run-puzzle-tests

pjt222
Updated 6 days ago
20 views
17
2
17
View on GitHub
Testingaitestingdesign

About

This skill runs the jigsawR test suite through WSL R execution, supporting full tests, pattern filtering, or single file runs. It interprets test results and identifies failures while properly handling renv dependencies. Use it after code changes, before commits, or when debugging specific test failures to maintain code quality.

Quick Install

Claude Code

Recommended
Primary
npx skills add pjt222/agent-almanac -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/pjt222/agent-almanac
Git CloneAlternative
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/run-puzzle-tests

Copy and paste this command in Claude Code to install this skill

Documentation

行拼測

行 jigsawR 測組釋果。

  • 改 R 源後→用
  • 增新拼類/功後→用
  • 提前驗無破→用
  • 除特測敗→用

  • :測範(fullfilteredsingle
  • :濾式(filtered 模,如 "snic""rectangular"
  • :特測檔徑(single 模)

一:擇範

用時
提前、大改後~2-5 分
一拼類工~30 秒
除特測~10 秒

得:按工選範—提前用全、特類用濾、除錯用單。

敗:未定→默全。久而捕跨類退。

二:建行測本

全組

建本檔(如 /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()"

"$R_EXE" -e "devtools::test(filter = 'snic')"

單檔

"$R_EXE" -e "testthat::test_file('tests/testthat/test-snic-puzzles.R')"

得:測出含過/敗/跳。

敗:

  • --vanilla;renv 需 .Rprofile
  • renv 誤→先 renv::restore()
  • 複命 Exit 5→寫至本檔

三:解果

求總行:

[ FAIL 0 | WARN 0 | SKIP 7 | PASS 2042 ]
  • PASS:成
  • FAIL:敗(須查)
  • SKIP:跳(常因缺可選包如 snic
  • WARN:警(察非阻)

得:總行解 PASS、FAIL、SKIP、WARN。FAIL = 0 為清。

敗:總行不見→測器或於完前崩。察上 R 級誤。出截→重定至檔:"$R_EXE" -e "devtools::test()" > test_results.txt 2>&1

四:查敗

若敗:

  1. 讀敗訊—含檔、行、期 vs 實
  2. 察新敗或舊存
  3. 斷敗→讀測與被測函
  4. 誤敗→查函簽改否
"$R_EXE" -e "testthat::test_file('tests/testthat/test-failing.R', reporter = 'summary')"

得:諸敗本因明。或為退(碼修)或為境問題(缺依、徑)。

敗:訊不明→測中加 browser()/print()testthat::test_file() 互動除。

五:驗跳因

跳於缺可選依為常:

  • snic 包測跳於 skip_if_not_installed("snic")
  • 特 OS 跳於 skip_on_os()
  • 僅 CRAN 跳於 skip_on_cran()

確跳因正當、非藏真敗。

得:諸跳有正因(可選不裝、平台、僅 CRAN)。無跳藏實敗。

敗:跳可疑→暫除 skip_if_*()、行測察過或露藏敗。

  • 諸測過(FAIL = 0)
  • 無非期警
  • 跳數合期(僅可選依跳)
  • 測數不減(無誤除)

  • --vanilla:破 renv 啟。jigsawR 永勿用
  • -e:殼義漏致 Exit 5。用本檔
  • 舊包態:改 NAMESPACE 影碼後先 devtools::load_all()devtools::document()
  • 缺測依:察 DESCRIPTION Suggests
  • 並測擾:序行用 testthat::test_file()

  • generate-puzzle
  • add-puzzle-type
  • write-testthat-tests
  • validate-piles-notation

GitHub Repository

pjt222/agent-almanac
Path: i18n/wenyan-ultra/skills/run-puzzle-tests
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

Related Skills

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

cloudflare-cron-triggers

Testing

This skill provides comprehensive knowledge for implementing Cloudflare Cron Triggers to schedule Workers using cron expressions. It covers setting up periodic tasks, maintenance jobs, and automated workflows while handling common issues like invalid cron expressions and timezone problems. Developers can use it for configuring scheduled handlers, testing cron triggers, and integrating with Workflows and Green Compute.

View skill

webapp-testing

Testing

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

View skill

finishing-a-development-branch

Testing

This skill helps developers complete finished work by verifying tests pass and then presenting structured integration options. It guides the workflow for merging, creating PRs, or cleaning up branches after implementation is done. Use it when your code is ready and tested to systematically finalize the development process.

View skill