regression-test

regression-test is a skill for Claude Code, Codex 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/markdavidgan/apple-dev-skills/regression-test
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00110 $0.01515
Opus 5 $0.00055 $0.00758
Sonnet 5 $0.00022 $0.00303
Haiku 4.5 $0.00011 $0.00152

Measured yesterday against content hash fea2613092df, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday 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 5d ago), licensed MIT. It adds 110 tokens to every session and 1,515 once invoked, about $0.0006 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-09-03.

Related

Other skills, from other repositories

asc-ppp-pricing

Set territory-specific pricing for subscriptions and in-app purchases using current asc setup, pricing summary, price import, and price schedule commands. Use when adjusting prices by country or implementing localized PPP strategies.

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

asc-apple-ads

Use when managing Apple Ads with asc, including OAuth profiles, ad-account discovery, Platform API v1 campaigns and targeting, reports, assets, recommendations, guarded mutations, raw requests, and Campaign Management API v5 migration.

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

asc-revenuecat-catalog-sync

Reconcile App Store Connect subscriptions and in-app purchases with RevenueCat products, entitlements, offerings, and packages using asc and RevenueCat MCP. Use when setting up or syncing subscription catalogs across ASC and RevenueCat.

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

asc-aso-audit

Run an offline ASO audit on canonical App Store metadata under ./metadata and surface keyword gaps using Astro MCP. Use after pulling metadata with asc metadata pull.

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

asc-localize-metadata

Automatically translate and sync App Store metadata (description, keywords, what's new, subtitle) to multiple languages using LLM translation and asc CLI. Use when asked to localize an app's App Store listing, translate app descriptions, or add new languages to App Store Connect.

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

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