TDD Guide
LeoYeAI/openclaw-master-skills
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…
Generate test assertions from existing code implementation. An agent skill from ArabelaTso/Skills-4-SE.
$ npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ArabelaTso/Skills-4-SE assertion-synthesizer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/assertion-synthesizer .claude/skills/assertion-synthesizer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "assertion-synthesizer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/assertion-synthesizer into .claude/skills/assertion-synthesizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertion-synthesizer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/assertion-synthesizerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ArabelaTso/Skills-4-SE assertion-synthesizer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/assertion-synthesizer .agents/skills/assertion-synthesizer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "assertion-synthesizer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/assertion-synthesizer into .agents/skills/assertion-synthesizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertion-synthesizer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ArabelaTso/Skills-4-SE assertion-synthesizer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/assertion-synthesizer .cursor/skills/assertion-synthesizer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "assertion-synthesizer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/assertion-synthesizer into .cursor/skills/assertion-synthesizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertion-synthesizer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ArabelaTso/Skills-4-SE.git --path skills/assertion-synthesizer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ArabelaTso/Skills-4-SE assertion-synthesizer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/assertion-synthesizer .gemini/skills/assertion-synthesizer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "assertion-synthesizer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/assertion-synthesizer into .gemini/skills/assertion-synthesizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertion-synthesizer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ArabelaTso/Skills-4-SE assertion-synthesizerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/assertion-synthesizer .github/skills/assertion-synthesizer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "assertion-synthesizer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/assertion-synthesizer into .github/skills/assertion-synthesizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertion-synthesizer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ArabelaTso/Skills-4-SE assertion-synthesizer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/assertion-synthesizer .opencode/skills/assertion-synthesizer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "assertion-synthesizer" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/assertion-synthesizer into .opencode/skills/assertion-synthesizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assertion-synthesizer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
assertion-synthesizerGenerate test assertions from existing code implementation. An agent skill from ArabelaTso/Skills-4-SE.
Assertion Synthesizer is an agent skill from ArabelaTso/Skills-4-SE. Generate test assertions from existing code implementation. Use when the user has implementation code without tests or incomplete test coverage, and needs assertions synthesized by analyzing the code's behavior, inputs, outputs, and state changes. Supports Python (pytest/unittest), Java (JUnit/AssertJ), and JavaScript/TypeScript (Jest/Chai). Handles equality checks, collections, exceptions, and state verification.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing. It works with pytest, Python, Jest and JUnit. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python, java and javascript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Assertion Synthesizer loads about 2.9k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 459 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 459 words, ~2,875 tokens.
.claude/skills/assertion-synthesizer/SKILL.md (or your agent's skills folder).Generate comprehensive test assertions by analyzing code implementation, behavior, and expected outputs.
Read and understand the implementation to identify testable behavior:
Extract scenarios that need assertions:
Create appropriate assertions for each scenario:
Assertion Types:
assert result == expected, assertEquals(expected, actual)assert is_valid, assertTrue(condition)assert item in list, assertContains(list, item)pytest.raises(Exception), assertThrows(Exception)assert obj.status == "active", assertEquals("active", obj.getStatus())Organize assertions into well-structured test functions:
Ensure all important behaviors have assertions:
def test_basic_equality():
# Arrange
calculator = Calculator()
# Act
result = calculator.add(2, 3)
# Assert
assert result == 5
def test_collection_membership():
items = get_active_items()
assert "item1" in items
assert len(items) == 3
def test_exception_handling():
with pytest.raises(ValueError, match="Invalid input"):
process_data(None)
def test_state_change():
user = User("Alice")
user.activate()
assert user.is_active == True
assert user.status == "active"def test_basic_equality(self):
calculator = Calculator()
result = calculator.add(2, 3)
self.assertEqual(result, 5)
def test_collection_membership(self):
items = get_active_items()
self.assertIn("item1", items)
self.assertEqual(len(items), 3)
def test_exception_handling(self):
with self.assertRaises(ValueError):
process_data(None)
def test_state_change(self):
user = User("Alice")
user.activate()
self.assertTrue(user.is_active)
self.assertEqual(user.status, "active")@Test
void testBasicEquality() {
Calculator calculator = new Calculator();
int result = calculator.add(2, 3);
assertThat(result).isEqualTo(5);
}
@Test
void testCollectionMembership() {
List<String> items = getActiveItems();
assertThat(items).contains("item1");
assertThat(items).hasSize(3);
}
@Test
void testExceptionHandling() {
assertThatThrownBy(() -> processData(null))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("Invalid input");
}
@Test
void testStateChange() {
User user = new User("Alice");
user.activate();
assertThat(user.isActive()).isTrue();
assertThat(user.getStatus()).isEqualTo("active");
}test('basic equality', () => {
const calculator = new Calculator();
const result = calculator.add(2, 3);
expect(result).toBe(5);
});
test('collection membership', () => {
const items = getActiveItems();
expect(items).toContain('item1');
expect(items).toHaveLength(3);
});
test('exception handling', () => {
expect(() => processData(null))
.toThrow('Invalid input');
});
test('state change', () => {
const user = new User('Alice');
user.activate();
expect(user.isActive).toBe(true);
expect(user.status).toBe('active');
});Analyze what the function returns and assert on it:
# Code:
def get_full_name(first, last):
return f"{first} {last}"
# Synthesized assertion:
def test_get_full_name():
result = get_full_name("John", "Doe")
assert result == "John Doe"
assert isinstance(result, str)Identify state changes and mutations:
# Code:
def withdraw(account, amount):
if account.balance >= amount:
account.balance -= amount
return True
return False
# Synthesized assertions:
def test_withdraw_success():
account = Account(balance=100)
result = withdraw(account, 50)
assert result == True
assert account.balance == 50
def test_withdraw_insufficient_funds():
account = Account(balance=30)
result = withdraw(account, 50)
assert result == False
assert account.balance == 30 # Balance unchangedTest each branch:
# Code:
def classify_age(age):
if age < 0:
raise ValueError("Invalid age")
elif age < 18:
return "minor"
elif age < 65:
return "adult"
else:
return "senior"
# Synthesized assertions:
def test_classify_age_invalid():
with pytest.raises(ValueError):
classify_age(-1)
def test_classify_age_minor():
assert classify_age(10) == "minor"
assert classify_age(17) == "minor"
def test_classify_age_adult():
assert classify_age(18) == "adult"
assert classify_age(64) == "adult"
def test_classify_age_senior():
assert classify_age(65) == "senior"
assert classify_age(100) == "senior"Assert on collection properties:
# Code:
def filter_active_users(users):
return [u for u in users if u.is_active]
# Synthesized assertions:
def test_filter_active_users():
users = [
User("Alice", is_active=True),
User("Bob", is_active=False),
User("Charlie", is_active=True)
]
result = filter_active_users(users)
assert len(result) == 2
assert all(u.is_active for u in result)
assert result[0].name == "Alice"
assert result[1].name == "Charlie"Verify object properties:
# Code:
class ShoppingCart:
def __init__(self):
self.items = []
self.total = 0
def add_item(self, item, price):
self.items.append(item)
self.total += price
# Synthesized assertions:
def test_shopping_cart_add_item():
cart = ShoppingCart()
# Initial state
assert cart.items == []
assert cart.total == 0
# After first item
cart.add_item("book", 20)
assert len(cart.items) == 1
assert "book" in cart.items
assert cart.total == 20
# After second item
cart.add_item("pen", 5)
assert len(cart.items) == 2
assert cart.total == 25assert result == 5 over assert result > 0test_withdraw_insufficient_funds not test_case_2Multiple assertions for comprehensive verification:
def test_user_registration():
user = register_user("alice@example.com", "password123")
# Verify all important properties
assert user.email == "alice@example.com"
assert user.is_active == False # Not activated yet
assert user.created_at is not None
assert user.id is not None
assert len(user.roles) == 1
assert "user" in user.rolesParametrized tests for multiple inputs:
@pytest.mark.parametrize("input,expected", [
(0, "zero"),
(1, "one"),
(5, "many"),
(100, "many"),
])
def test_number_to_word(input, expected):
assert number_to_word(input) == expectedUser provides code:
def calculate_discount(price, discount_percent):
if discount_percent < 0 or discount_percent > 100:
raise ValueError("Discount must be between 0 and 100")
return price * (1 - discount_percent / 100)Synthesized assertions:
def test_calculate_discount_normal():
assert calculate_discount(100, 10) == 90.0
assert calculate_discount(50, 20) == 40.0
def test_calculate_discount_zero():
assert calculate_discount(100, 0) == 100.0
def test_calculate_discount_full():
assert calculate_discount(100, 100) == 0.0
def test_calculate_discount_invalid_negative():
with pytest.raises(ValueError, match="between 0 and 100"):
calculate_discount(100, -10)
def test_calculate_discount_invalid_over_100():
with pytest.raises(ValueError, match="between 0 and 100"):
calculate_discount(100, 150)User provides weak test:
def test_sort_list():
result = sort_list([3, 1, 2])
assert result # Only checks if result existsEnhanced assertions:
def test_sort_list():
result = sort_list([3, 1, 2])
# Verify actual sorting behavior
assert result == [1, 2, 3]
assert len(result) == 3
assert isinstance(result, list)
def test_sort_list_empty():
assert sort_list([]) == []
def test_sort_list_already_sorted():
assert sort_list([1, 2, 3]) == [1, 2, 3]
def test_sort_list_duplicates():
assert sort_list([3, 1, 2, 1]) == [1, 1, 2, 3]© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/assertion-synthesizer of ArabelaTso/Skills-4-SE.
Open the folder on GitHubat commit 4f38503
Assertion Synthesizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Assertion Synthesizer this skillArabelaTso/Skills-4-SE | 253 | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| TDD GuideLeoYeAI/openclaw-master-skills | 2.2k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Python Testing Patternsjh941213/my-cc-harness | 126 | 17 repos | ~5.4k | Automated safety check: Pass | None | |
| Test Analysis Extensionsmicrosoft/testfx | 1k | 2 repos | ~1.1k | Automated safety check: Pass | MIT | |
| TDD Guidealirezarezvani/claude-skills | 28k | — | ~3.4k | Automated safety check: Pass | MIT | |
| Assertion Qualitymicrosoft/testfx | 1k | — | ~4.1k | Automated safety check: Pass | MIT |
LeoYeAI/openclaw-master-skills
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…
jh941213/my-cc-harness
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development.
microsoft/testfx
Provides file paths to language-specific reference files for the test ANALYSIS skills (assertion-quality, test-anti-patterns, test-gap-analysis, test-smell-detection, test-tagging).
alirezarezvani/claude-skills
Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and…
microsoft/testfx
Analyzes the variety and depth of assertions across test suites in any language.
microsoft/testfx
Performs pseudo-mutation analysis on production code in any language to find gaps in existing test suites.
ArabelaTso/Skills-4-SE
Generate prioritized CVE watchlists and actionable security recommendations for repositories.
ArabelaTso/Skills-4-SE
Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).
ArabelaTso/Skills-4-SE
Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.
ArabelaTso/Skills-4-SE
Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.
ArabelaTso/Skills-4-SE
Automatically migrate Spring MVC applications to Spring Boot.
ArabelaTso/Skills-4-SE
Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.
Categories
Generate test assertions from existing code implementation. An agent skill from ArabelaTso/Skills-4-SE. Assertion Synthesizer is an agent skill from ArabelaTso/Skills-4-SE. Generate test assertions from existing code implementation.
Assertion Synthesizer fits situations like: the user has implementation code without tests; incomplete test coverage; needs assertions synthesized by analyzing the codes behavior.
Run `npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a claude-code`. Or copy the skill folder (skills/assertion-synthesizer in ArabelaTso/Skills-4-SE) into .claude/skills/assertion-synthesizer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a codex`. Or copy the skill folder (skills/assertion-synthesizer in ArabelaTso/Skills-4-SE) into .agents/skills/assertion-synthesizer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill assertion-synthesizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/assertion-synthesizer, .gemini/skills/assertion-synthesizer, .github/skills/assertion-synthesizer and .opencode/skills/assertion-synthesizer in your project.
SKILL.md names no scripts, command-line tools or credentials: Assertion Synthesizer is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Assertion Synthesizer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Assertion Synthesizer: TDD Guide (LeoYeAI/openclaw-master-skills, 2.2k stars), Python Testing Patterns (jh941213/my-cc-harness, 126 stars), Test Analysis Extensions (microsoft/testfx, 1k stars) and TDD Guide (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 170 skills in this directory. The repository was last updated on August 21, 2026.
Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.