testunit-skill

testunit-skill is a skill for Claude Code, Codex from LambdaTest/agent-skills. It costs 70 tokens per session (760 once invoked), scanned A, original, MIT.

A Ruby testing add-on that generates tests with Test::Unit, Ruby’s built-in xUnit-style testing library. It uses test case classes and assertions to check expected results and errors.

In plain words
What is it for?
Use it to create Ruby unit tests for methods, including checks for values, object types, matching text, and raised errors.
Why use it?
It helps you write consistent unit tests without having to remember Test::Unit’s class structure and assertion methods.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create Ruby unit tests for methods, including checks for values, object types, matching text, and raised errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lambdatest/agent-skills/testunit-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LambdaTest/agent-skills --skill testunit-skill
Clone the repo
git clone --depth 1 https://github.com/LambdaTest/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testunit-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/lambdatest/agent-skills/testunit-skill/github.svg)](https://agentmods.dev/skills/lambdatest/agent-skills/testunit-skill)
Your own site
<a href="https://agentmods.dev/skills/lambdatest/agent-skills/testunit-skill"><img src="https://agentmods.dev/badge/skills/lambdatest/agent-skills/testunit-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testunit-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/lambdatest/agent-skills/testunit-skill"><img src="https://agentmods.dev/badge/skills/lambdatest/agent-skills/testunit-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 760 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00760
Opus 5.5 $0.00028 $0.00304
Sonnet 5.5 $0.00014 $0.00152
Haiku 4.5 $0.00007 $0.00076

Measured 1mo ago against content hash 209c06dc1217, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testunit-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

testunit-skill/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test::Unit Ruby Skill

Core Patterns

Basic Test

require 'test/unit'

class TestCalculator < Test::Unit::TestCase
  def setup
    @calc = Calculator.new
  end

  def test_addition
    assert_equal(5, @calc.add(2, 3), "2 + 3 should equal 5")
  end

  def test_subtraction
    assert_equal(1, @calc.subtract(3, 2))
  end

  def test_division_by_zero
    assert_raise(ZeroDivisionError) { @calc.divide(10, 0) }
  end

  def test_float_division
    assert_in_delta(3.33, @calc.divide(10, 3), 0.01)
  end

  def teardown
    # cleanup
  end
end

Assertions

assert_equal(expected, actual, message = nil)
assert_not_equal(unexpected, actual)
assert_true(value)
assert_false(value)
assert_nil(value)
assert_not_nil(value)
assert_instance_of(klass, obj)
assert_kind_of(klass, obj)
assert_respond_to(obj, :method_name)
assert_match(/pattern/, string)
assert_no_match(/pattern/, string)
assert_include(collection, item)
assert_not_include(collection, item)
assert_empty(collection)
assert_not_empty(collection)
assert_raise(ErrorClass) { block }
assert_nothing_raised { block }
assert_in_delta(expected, actual, delta)
assert_operator(value, :>, 5)
assert_send([obj, :method, arg])
assert_block("message") { condition }

Test Fixtures

class TestDatabase < Test::Unit::TestCase
  def self.startup
    # Once before all tests in class
    @@db = Database.connect('test')
  end

  def self.shutdown
    # Once after all tests in class
    @@db.disconnect
  end

  def setup
    # Before each test
    @@db.begin_transaction
  end

  def teardown
    # After each test
    @@db.rollback
  end
end

Test Ordering and Naming

class TestUserService < Test::Unit::TestCase
  # Methods must start with 'test_'
  def test_create_user
    user = UserService.create('Alice', '[email protected]')
    assert_not_nil(user)
    assert_equal('Alice', user.name)
  end

  def test_find_user_by_email
    user = UserService.find_by_email('[email protected]')
    assert_instance_of(User, user)
  end
end

Read the full file on GitHub · 131 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 131 lines · 70 tokens per session scan A 209c06dc1217

Subscribe to this mod's changes

testunit-skill is a skill published in the GitHub repository LambdaTest/agent-skills (377 stars, last pushed 9d ago), licensed MIT. It adds 70 tokens to every session and 760 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

rspec-conventions

Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…

rootstrap/rails_api_base · 82 tokens

ruby

Ruby development guidelines covering idiomatic code style, Ruby 3.x features, testing with RSpec, and best practices for building maintainable Ruby applications.

Mindrally/skills · 32 tokens

rspec

RSpec testing best practices for Ruby and Rails applications, covering test organization, data management, and isolation patterns.

Mindrally/skills · 24 tokens

test-service

Use when writing RSpec for a service object under spec/services/. Test the public .call contract. Trigger words: service spec, test service object, spec/services.

igmarin/rails-agent-skills · 36 tokens

write-tests

Use when writing or cleaning up Rails RSpec. Run the spec and keep the real output. Trigger words: write spec, rspec, test-driven, write tests.

igmarin/rails-agent-skills · 37 tokens

rspec-testing-pyramid

RSpec testing for Ruby on Rails — pyramid shape (lots of model + request specs, fewer system specs), FactoryBot patterns, let vs let! vs before, shared examples, VCR for external HTTP, system specs with Capybara + Cuprite, transactional vs truncation strategy, parallel testing, SimpleCov coverage. Use when writing or…

sandeepmvl/rails-skills · 149 tokens