chowser: Skill for Claude Code

.agents/skills/swift-unit-testing-skill/SKILL.md

Swift Unit Testing Skill is a skill for Claude Code, Codex from bsreeram08/chowser. It costs 26 tokens per session (3,397 once invoked), scanned A, original, MIT.

A guide to unit tests for Swift using XCTest, Apple's testing framework. Unit tests check small parts of a program in isolation, while test-driven development (TDD) means writing those tests before the implementation.

In plain words
What is it for?
Use it to design tests for individual behaviors, arrange setup and checks, test errors and edge cases, mock outside services, and build a test-first workflow.
Why use it?
It helps catch regressions and makes failures easier to locate than testing an entire app at once. Clear, independent tests are also easier to run often and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; installed under .agents/ (shared by several agents).

This is bsreeram08/chowser's own configuration. It tells Claude Code and Codex how to work on chowser itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything chowser configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bsreeram08/chowser. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bsreeram08/chowser/main/.agents/skills/swift-unit-testing-skill/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/bsreeram08/chowser

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 Swift Unit Testing Skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/bsreeram08/chowser/swift-unit-testing-skill/github.svg)](https://agentmods.dev/skills/bsreeram08/chowser/swift-unit-testing-skill)
Your own site
<a href="https://agentmods.dev/skills/bsreeram08/chowser/swift-unit-testing-skill"><img src="https://agentmods.dev/badge/skills/bsreeram08/chowser/swift-unit-testing-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 Swift Unit Testing Skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/bsreeram08/chowser/swift-unit-testing-skill"><img src="https://agentmods.dev/badge/skills/bsreeram08/chowser/swift-unit-testing-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,397 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.
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.00026 $0.03397
Opus 5.5 $0.00010 $0.01359
Sonnet 5.5 $0.00005 $0.00679
Haiku 4.5 $0.00003 $0.00340

Measured 4d ago against content hash c1d79e1976f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Swift Unit Testing 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 4d 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.

.agents/skills/swift-unit-testing-skill/SKILL.md · 573 lines

How it starts

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

Swift Unit Testing Skill

This skill provides comprehensive guidance on writing effective unit tests using Apple's XCTest framework. It covers test-driven development (TDD), testing patterns, mocking strategies, and best practices for maintaining high-quality test suites.

Best Practices

  1. Test First: Follow TDD principles - write tests before implementation.

  2. Single Responsibility: Each test should verify one specific behavior.

  3. Arrange-Act-Assert: Structure tests clearly with setup, execution, and verification phases.

  4. Descriptive Names: Use descriptive test method names that explain what is being tested.

  5. Independent Tests: Tests should not depend on each other or shared state.

  6. Fast Execution: Keep tests fast to encourage frequent running.

Unit Testing Guidelines

  • Test public interfaces, not implementation details.
  • Use mocking for external dependencies.
  • Cover both happy path and edge cases.
  • Include tests for error conditions.
  • Maintain test code quality equal to production code.
  • Run tests frequently during development.

Examples

Example 1: Basic XCTest Structure

User Prompt: "Create a basic unit test class with setup and teardown methods."

Expected Output:

import XCTest
@testable import MyApp

class CalculatorTests: XCTestCase {
    
    var calculator: Calculator!
    
    override func setUp() {
        super.setUp()
        calculator = Calculator()
    }
    
    override func tearDown() {
        calculator = nil
        super.tearDown()
    }
    
    func testAddition() {
        // Given
        let a = 5
        let b = 3
        
        // When
        let result = calculator.add(a, b)
        
        // Then
        XCTAssertEqual(result, 8, "Addition should return the sum of two numbers")
    }
    
    func testAdditionWithNegativeNumbers() {
        // Given
        let a = 5
        let b = -3
        
        // When
        let result = calculator.add(a, b)
        
        // Then
        XCTAssertEqual(result, 2, "Addition should work with negative numbers")
    }
    
    func testDivisionByZero() {
        // Given
        let a = 10
        let b = 0
        
        // When & Then
        XCTAssertThrowsError(try calculator.divide(a, b)) { error in
            XCTAssertEqual(error as? CalculatorError, CalculatorError.divisionByZero)
        }
    }
}

// Production code
class Calculator {
    func add(_ a: Int, _ b: Int) -> Int {
        return a + b
    }
    
    func divide(_ a: Int, _ b: Int) throws -> Int {
        guard b != 0 else {
            throw CalculatorError.divisionByZero
        }
        return a / b
    }
}

enum CalculatorError: Error {
    case divisionByZero
}

Read the full file on GitHub · 573 lines

Files

What ships with it

4 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. 4d ago First seen · 573 lines · 26 tokens per session scan A c1d79e1976f0

Subscribe to this mod's changes

Swift Unit Testing Skill is a skill published in the GitHub repository bsreeram08/chowser (12 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 3,397 once invoked, about $0.0001 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-11-28.

Related

Swift Unit Testing Skill compared with skills from other repositories

Swift Unit Testing Skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Swift Unit Testing Skillbsreeram08/chowserSkill121mo agoMITA26Claude Code, Codex
rust-testingaffaan-m/ECCSkill315ktodayMITA31Claude Code, Kiro
cpp-testingaffaan-m/ECCSkill315ktodayMITA34Claude Code, Kiro
write-vibe-testsmistralai/mistral-vibeSkill5.6kyesterdayApache-2.0A80Claude Code, Codex
swift-testing-projacklandrin/OnlySwitchSkill6.1k4d agoMITA34Codex
nw-fp-haskellnWave-ai/nWaveSkill63713d agoMITA22Claude Code
nw-fp-clojurenWave-ai/nWaveSkill63713d agoMITA25Claude Code