AReaL is an infrastructure system for training large language models with reinforcement learning, connecting model training to applications built around AI agents. Researchers and developers use it to train reasoning and agentic models through asynchronous workflows, and the catalogue add-ons support working with AReaL.
Borrowing it
Nothing to install: this file belongs to areal-project/AReaL. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/areal-project/AReaL/main/.agents/skills/add-unit-tests/SKILL.mdgit clone --depth 1 https://github.com/areal-project/AReaLWrote 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.
[](https://agentmods.dev/skills/areal-project/areal/add-unit-tests)<a href="https://agentmods.dev/skills/areal-project/areal/add-unit-tests"><img src="https://agentmods.dev/badge/skills/areal-project/areal/add-unit-tests.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.01516 |
| Opus 5 | $0.00015 | $0.00758 |
| Sonnet 5 | $0.00006 | $0.00303 |
| Haiku 4.5 | $0.00003 | $0.00152 |
Grade A, and why
add-unit-tests 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Unit Tests
Add unit tests to AReaL following the project's testing conventions.
When to Use
This skill is triggered when:
- User asks "how do I add tests?"
- User wants to increase test coverage
- User needs to write tests for new functionality
- User wants to understand AReaL testing patterns
Step-by-Step Guide
Step 1: Understand Test Types
AReaL has two main test categories:
| Test Type | Purpose | Location Pattern | How It Runs |
|---|---|---|---|
| Unit Tests | Test individual functions/modules | tests/test_<module>_<feature>.py |
Directly via pytest |
| Distributed Tests | Test distributed/parallel behavior | tests/torchrun/run_*.py |
Via torchrun (called by pytest subprocess) |
Note: All tests are invoked via pytest. Distributed tests use torchrun but are
still called from pytest test files.
Step 2: Create Test File Structure
Create test file with naming convention: test_<module>_<feature>.py
import pytest
import torch
# Import the module to test
from areal.dataset.gsm8k import get_gsm8k_sft_dataset
from tests.utils import get_dataset_path # Optional test utilities
# For mocking tokenizer: from unittest.mock import MagicMock
Step 3: Write Test Functions
Follow Arrange-Act-Assert pattern:
def test_function_under_condition_returns_expected():
"""Test that function returns expected value under condition."""
# Arrange
input_data = 5
expected_output = 10
# Act
result = function_under_test(input_data)
# Assert
assert result == expected_output
Step 4: Add Pytest Markers and CI Strategy
Use appropriate pytest markers:
| Marker | When to Use |
|---|---|
@pytest.mark.slow |
Test takes > 10 seconds (excluded from CI by default) |
@pytest.mark.ci |
Slow test that must run in CI (use with @pytest.mark.slow) |
@pytest.mark.asyncio |
Async test functions |
@pytest.mark.skipif(cond, reason=...) |
Conditional skip |
@pytest.mark.parametrize(...) |
Parameterized tests |
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.
- 8d ago First seen · 202 lines · 30 tokens per session scan A 95e3ee6e8711
add-unit-tests is a skill published in the GitHub repository areal-project/AReaL (5,732 stars, last pushed today), licensed Apache-2.0. It adds 30 tokens to every session and 1,516 once invoked, about $0.0002 per session on Opus 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-08-30.
Other skills, from other repositories
neuron-test-engineer
Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…
test-writer
How to write pytest tests for modules in this workspace. Load whenever you are about to write or extend tests.
pytest-suite
Write or extend the backend test suite following this project's conventions. Use when adding tests for a new service/route/repository, when coverage is missing, or when asked to test a feature. Knows the mocked-session + httpx AsyncClient setup so tests run with no database.
testing
Use when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.
mockito
Use when generating mocks, stubbing methods, verifying interactions, capturing arguments, or choosing between mocks, fakes, and real objects (Mockito).
mocktail
Use when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).