regression-test

regression-test is a skill for Claude Code from markdavidgan/apple-dev-skills. It costs 110 tokens per session (1,515 once invoked), scanned A, original, MIT.

A workflow for fixing recurring iOS and Swift bugs by classifying the Apple-specific cause, checking for similar cases, and adding a regression test so the bug does not return.

In plain words
What is it for?
Use it for bugs involving force unwraps, try!, fatalError, main-thread rules, App Groups, missing confirmations, or lost state.
Why use it?
It reduces the chance that a fix handles one crash while leaving the same mistake elsewhere in the app.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the apple-dev-skills plugin — 62 skills, 25 commands, 7 agents shipped together

Good fit Use it for bugs involving force unwraps, try!, fatalError, main-thread rules, App Groups, missing confirmations, or lost state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/markdavidgan/apple-dev-skills/regression-test
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 markdavidgan/apple-dev-skills --skill regression-test
Clone the repo
git clone --depth 1 https://github.com/markdavidgan/apple-dev-skills

Made for: Claude Code.

Or install apple-dev-skills, the plugin that ships this one along with the rest of its 62 skills, 25 commands, 7 agents.

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 regression-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/markdavidgan/apple-dev-skills/regression-test/github.svg)](https://agentmods.dev/skills/markdavidgan/apple-dev-skills/regression-test)
Your own site
<a href="https://agentmods.dev/skills/markdavidgan/apple-dev-skills/regression-test"><img src="https://agentmods.dev/badge/skills/markdavidgan/apple-dev-skills/regression-test/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 regression-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/markdavidgan/apple-dev-skills/regression-test"><img src="https://agentmods.dev/badge/skills/markdavidgan/apple-dev-skills/regression-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,515 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.00110 $0.01515
Opus 5.5 $0.00044 $0.00606
Sonnet 5.5 $0.00022 $0.00303
Haiku 4.5 $0.00011 $0.00152

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

Security

Grade A, and why

regression-test 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.

platforms/claude/skills/regression-test/SKILL.md · 214 lines

How it starts

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

Regression Test Skill

When fixing an iOS/Swift bug, always follow this workflow to prevent the bug from recurring. This assumes you're already using a test-first loop (e.g. superpowers:test-driven-development); the value this skill adds is Step 0 — classifying the bug into an Apple-specific root-cause class and sweeping for siblings — not the write-test/fix/verify loop itself.


Regression Test Workflow

Step 0: Identify the Bug Class

Before writing any test, classify the bug. This determines what else to check.

Bug Class Root Cause Also Search For
Force unwrap crash (!) Assumed non-nil, was nil Other ! in same file/service
try! crash Error ignored at call site Other try! in same target
fatalError crash Defensive code hit in prod Other fatalError in prod paths
Missing confirmation Destructive action unguarded Other destructive actions without .destructive role
MainActor isolation crash Async code off main thread Other @MainActor + async patterns in same ViewModel
App Group mismatch Entitlements out of sync All targets sharing the group
State not restored Background/foreground not handled Other lifecycle observers

After identifying the class, fix all instances of the class in this file/service — not just the one that crashed. One bug usually means there are siblings.

Step 1: Write Failing Test First

Before fixing the bug, reproduce it in a test that fails:

func test_timer_backgrounding_shouldPause() {
    // Given: Running timer
    let viewModel = TimerViewModel()
    viewModel.start()

    // When: App backgrounds
    NotificationCenter.default.post(name: UIApplication.didEnterBackgroundNotification, object: nil)

    // Then: Timer should be paused
    XCTAssertEqual(viewModel.state, .paused)
}

Why first? Ensures you understand the bug and can prove the fix works.

Step 2: Fix the Bug

Read the full file on GitHub · 214 lines

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 · 214 lines · 110 tokens per session scan A fea2613092df

Subscribe to this mod's changes

regression-test is a skill published in the GitHub repository markdavidgan/apple-dev-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 110 tokens to every session and 1,515 once invoked, about $0.0004 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

asc-shots-pipeline

Orchestrate iOS screenshot automation with xcodebuild/simctl for build-run, AXe for UI actions, JSON settings and plan files, Koubou-based framing (asc screenshots frame), and screenshot upload (asc screenshots upload). Use when users ask for automated screenshot capture, AXe-driven simulator flows, frame composition…

rorkai/app-store-connect-cli-skills · 79 tokens

asc-crash-triage

Triage TestFlight crashes, beta feedback, and performance diagnostics using asc. Use when the user asks about TF crashes, TestFlight crash reports, beta tester feedback, app hangs, disk writes, launch diagnostics, or wants a crash summary for a build or app.

rorkai/app-store-connect-cli-skills · 60 tokens

triage-issue

Bug triage: explores codebase for root cause, files GitHub issue with TDD fix plan. Triggers: triage, investigate bug, fix plan, root cause, file issue, bug report.

softspark/ai-toolkit · 47 tokens

hotfix

Fixes an observed defect with reproducible evidence in one call: writes a short trace doc before touching code, implements the fix, and backs it with a regression test written before the fix. Production incidents are the motivating case, not a gate. When blocked, it halts by name and saves the doc for a later call to…

pe-menezes/vibeflow · 102 tokens

polya-fix

Phase 5 of the Pólya Heuristic Coder: First-Principles Bug Remediation, Seam Tracing, Bisection Search (O(log n)), Failing Reproduction Tests, and Incubation Circuit-Breaker Gate (docs/bug-reports/{slug}-bugfix.md).

GulajavaMinistudio/awesome-copilot-id · 67 tokens

red-green-refactor

Guides the red-green-refactor TDD workflow: write a failing test first, implement the minimum code to make it pass, then refactor while keeping tests green. Use when a user asks to practice TDD, write tests first, follow red-green-refactor, do test-driven development, write failing tests before code, or phrases like…

rohitg00/skillkit · 90 tokens