test

Run tests iteratively fixing code or tests until all pass, then commit.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "test" with this command: npx skills add seabbs/claude-code-config/seabbs-claude-code-config-test

Run tests iteratively fixing code or tests until all pass, then commit.

Arguments: $ARGUMENTS (optional scope)

  • commit: Test only staged files

  • pr: Test all files changed in the current PR

  • all: Run full test suite

  • If no argument provided:

  • If in a PR branch: defaults to 'pr'

  • Otherwise: defaults to 'commit'

Phase 1: Scope and Test Discovery

  • Determine scope based on $ARGUMENTS

  • Discover test framework (pytest, testthat, jest, Pkg.test, etc.)

  • Identify test file patterns (test_*.py, .test.js, test-.R)

  • Check for untested new features and flag them

Phase 2: Create Missing Tests

  • For new features without tests:

  • Follow existing test patterns in the codebase

  • Write tests covering happy path, edge cases, error handling

  • For statistical models, test parameter recovery from simulated data

Phase 3: Iterative Test Fixing

  • Run relevant tests based on scope

  • For each failure, determine if it's a code issue or test issue and fix accordingly

  • Re-run after each fix, verify no other tests broke

Phase 4: Final Verification

  • Run full test suite for changed files one more time

  • Check test coverage if tools available

Phase 5: Commit Changes

  • Stage all files and generate commit message:

  • test: add tests for [feature] or fix: resolve test failures in [component]

Important

  • Use judgement on whether to fix code or tests

  • Don't blindly make tests pass, ensure fixes are meaningful

  • For R: Use expect_identical over expect_equal where appropriate

  • Stop if encountering flaky tests or environment issues

Auto-Exit When Standalone

IMPORTANT: If this command is being run as a standalone request, automatically exit after completing all phases successfully.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

taskfile-automation

No summary provided by upstream source.

Repository SourceNeeds Review
1.2K-seabbs
Coding

academic-writing-standards

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

analyzing-research-papers

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

r-development

No summary provided by upstream source.

Repository SourceNeeds Review