Agent skill

Add Assertion

by TypedDevs in TypedDevs/bashunit

Add new assertion function with comprehensive tests following TDD

MITAuto-check: notesTesting & QA

Install Add Assertion

skills CLI
$ npx skills add TypedDevs/bashunit --skill add-assertion -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TypedDevs/bashunit add-assertion --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TypedDevs/bashunit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-assertion .claude/skills/add-assertion && rm -rf skills-src

Use ~/.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/

Facts

Skill name
add-assertion
GitHub stars
434
Token cost
~446 tokens
SKILL.md length
192 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Add new assertion function with comprehensive tests following TDD

  • Works in 5 steps: Plan → Study Existing Patterns → TDD Cycles → …
  • Tasks that involve Test-driven development
  • SKILL.md covers Prerequisites, Workflow and Final Checklist
  • Calls make

What it does

Add Assertion is an agent skill from TypedDevs/bashunit. Add new assertion function with comprehensive tests following TDD

Its SKILL.md is about 450 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 Test-driven development. It works with Bash. The repository describes itself as: A simple yet powerfull testing library for bash scripts. The licence is MIT.

When your agent uses it

  • Tasks that involve Test-driven development

Example prompts

  • “/add-assertion”

Requirements

  • Pre-approved tools (allowed-tools): Read, Edit, Write, Bash, Grep, Glob

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Plan
  2. Study Existing Patterns
  3. TDD Cycles
  4. Integration
  5. Documentation

What it can do on your machine

Read from SKILL.md and the folder at commit 8f297fb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Write
    • Bash
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Assertion loads about 446 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 192 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~446

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Edit, Write, Bash, Grep, Glob

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.

SKILL.md

The full file from TypedDevs/bashunit at commit 8f297fb, republished under its MIT licence (© TypedDevs). 192 words, ~446 tokens.

Download SKILL.mdSave it as .claude/skills/add-assertion/SKILL.md (or your agent's skills folder).
name
add-assertion
description
Add new assertion function with comprehensive tests following TDD
allowed-tools
Read, Edit, Write, Bash, Grep, Glob

Add Assertion Skill

Add a new assertion function to bashunit following strict TDD methodology.

Prerequisites

  1. Task file must exist — create .tasks/YYYY-MM-DD-add-assertion-name.md
  2. Study patterns — read tests/unit/assert_test.sh and src/assertions.sh

Workflow

1. Plan

Ask user: assertion name, parameters, success/failure behavior, error messages.

Document acceptance criteria and test inventory in task file.

2. Study Existing Patterns

Read src/assertions.sh and tests/unit/assert_test.sh to understand:

  • Parameter validation, assertion logic, error message format
  • Return codes (0 = success, 1 = failure)
  • How tests verify both success and failure cases
3. TDD Cycles

For each test in inventory, follow RED -> GREEN -> REFACTOR:

  1. Basic success case — assertion passes with valid input
  2. Failure case — assertion fails correctly: capture its output and compare it with bashunit::console_results::print_failed_test (there is no assert_fails)
  3. Edge cases — empty input, special characters, nested structures, malformed data
4. Integration
  • Source new file in src/bashunit.sh if created
  • export -f the assertion function
  • Run full test suite: ./bashunit tests/
  • Quality checks: make sa && make lint
5. Documentation
  • Add function header with Arguments/Returns/Example
  • Update CHANGELOG.md
  • Update user-facing docs if applicable

Final Checklist

  • All tests passing (success, failure, edge cases)
  • Function documented and exported
  • Quality gate passes
  • CHANGELOG updated
  • Task file completed

© TypedDevs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/add-assertion of TypedDevs/bashunit.

Open the folder on GitHubat commit 8f297fb

Compare with similar skills

Add Assertion 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.

Add Assertion compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Assertion this skillTypedDevs/bashunit434—~446Automated safety check: NotesMIT
Bats Shell Testing Patternswshobson/agents40k12 repos~1.3kAutomated safety check: PassMIT
TDDFastLED/FastLED7.5k—~848Automated safety check: PassMIT
TDD ImplementFastLED/FastLED7.5k—~1kAutomated safety check: PassMIT
Opsmill Dev Test Driving Bugsopsmill/infrahub531—~4kAutomated safety check: PassApache-2.0
TDD Repairruvnet/ruflo74k—~1.6kAutomated safety check: NotesMIT

Similar skills

  • Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.

    40k GitHub starsUsed in 12 repos~1.3k tokens
    Testing & QAAuto-check passed
  • TDD

    FastLED/FastLED

    Guide Test-Driven Development workflow for FastLED. An agent skill from FastLED/FastLED.

    7.5k GitHub stars~848 tokensUpdated today
    Testing & QAAuto-check passed
  • TDD Implement

    FastLED/FastLED

    Implement a feature or fix a bug using strict TDD. An agent skill from FastLED/FastLED.

    7.5k GitHub stars~1k tokensUpdated today
    Testing & QAAuto-check passed
  • Writes a single failing test that reproduces a bug after its root-cause analysis is complete, before any fix is written.

    531 GitHub stars~4k tokensUpdated today
    Testing & QAAuto-check passed
  • TDD Repair

    ruvnet/ruflo

    Test-Driven Repair — given a failing test, spawn a bounded headless claude -p (Read/Edit/Bash only) that makes the test pass without modifying it.

    74k GitHub stars~1.6k tokensUpdated today
    Testing & QAAuto-check: notes
  • Jest Testing Patterns

    ChrisWiles/claude-code-showcase

    Jest patterns for React Native style tests: TDD discipline, mock factory functions, module and GraphQL hook mocking, custom render helpers and anti-patterns to avoid.

    6.1k GitHub starsUsed in 7 repos~1.5k tokens
    Testing & QAAuto-check passed

More from TypedDevs/bashunit

All 11 skills in this repo
  • Gh Issues

    TypedDevs/bashunit

    Walk over all open GitHub issues that are unassigned or assigned to the current user, and process each one via the /gh-issue skill, sequentially.

    434 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check: notes
  • Commit

    TypedDevs/bashunit

    Stage and commit changes using conventional commits format. An agent skill from TypedDevs/bashunit.

    434 GitHub stars~781 tokensUpdated yesterday
    Auto-check: notes
  • Gh Issue

    TypedDevs/bashunit

    Fetch GitHub issue, create branch, plan and implement with TDD, then open PR

    434 GitHub stars~721 tokensUpdated yesterday
    Auto-check: notes
  • PR

    TypedDevs/bashunit

    Push branch and create a GitHub PR with concise, issue-linked description

    434 GitHub stars~1k tokensUpdated yesterday
    Auto-check: notes
  • Pre Release

    TypedDevs/bashunit

    Run comprehensive pre-release validation checklist. An agent skill from TypedDevs/bashunit.

    434 GitHub stars~488 tokensUpdated yesterday
    Auto-check: notes
  • Release

    TypedDevs/bashunit

    Run pre-release validation and execute the release process. An agent skill from TypedDevs/bashunit.

    434 GitHub stars~618 tokensUpdated yesterday
    Auto-check: notes

Works with

Categories

Questions about Add Assertion

What does Add Assertion do?

Add new assertion function with comprehensive tests following TDD. Add Assertion is an agent skill from TypedDevs/bashunit.

When should I use Add Assertion?

Add Assertion fits situations like: tasks that involve Test-driven development.

How do I install Add Assertion in Claude Code?

Run `npx skills add TypedDevs/bashunit --skill add-assertion -a claude-code`. Or copy the skill folder (.claude/skills/add-assertion in TypedDevs/bashunit) into .claude/skills/add-assertion in your project. Claude Code loads it when a task matches its description.

How do I install Add Assertion in Codex?

Run `npx skills add TypedDevs/bashunit --skill add-assertion -a codex`. Or copy the skill folder (.claude/skills/add-assertion in TypedDevs/bashunit) into .agents/skills/add-assertion in your project. Codex loads it when a task matches its description.

Can I use Add Assertion in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TypedDevs/bashunit --skill add-assertion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-assertion, .gemini/skills/add-assertion, .github/skills/add-assertion and .opencode/skills/add-assertion in your project.

What does Add Assertion need to run?

Going by SKILL.md and its folder, Add Assertion needs the command-line tools its instructions call (make). Its frontmatter pre-approves these tools: Read, Edit, Write, Bash, Grep, Glob.

Does Add Assertion access the network?

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.

Is Add Assertion safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Add Assertion use?

Add Assertion is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Assertion use?

About 446 tokens (SKILL.md is roughly 1.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Assertion?

Skills that share tags, products or a category with Add Assertion: Bats Shell Testing Patterns (wshobson/agents, 40k stars), TDD (FastLED/FastLED, 7.5k stars), TDD Implement (FastLED/FastLED, 7.5k stars) and Opsmill Dev Test Driving Bugs (opsmill/infrahub, 531 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Assertion?

TypedDevs (a GitHub organization) maintains it in TypedDevs/bashunit, which has 434 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 7, 2026.

Source: TypedDevs/bashunit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.