ios-coverage

ios-coverage is a command for Claude Code from OkminLee/everything-claude-code-ios. It costs 30 tokens per session (2,141 once invoked), scanned A, original, MIT.

A command that measures which parts of an iOS project's code are exercised by tests and creates tests for under-tested areas.

In plain words
What is it for?
It runs tests with Xcode coverage enabled, reads the results with xccov, finds files below the threshold, and generates unit or integration tests for missing paths and edge cases.
Why use it?
It shows where tests are missing instead of relying on guesswork. It compares coverage before and after adding tests and checks against an 80% target.

Command for Claude Code

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

Part of the everything-claude-code-ios plugin — 5 skills, 10 commands, 9 agents, 5 hooks, 4 MCP servers shipped together

Good fit It runs tests with Xcode coverage enabled, reads the results with xccov, finds files below the threshold, and generates unit or integration tests for missing paths and edge cases.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/okminlee/everything-claude-code-ios/ios-coverage
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.

Clone the repo
git clone --depth 1 https://github.com/OkminLee/everything-claude-code-ios

Made for: Claude Code.

Or install everything-claude-code-ios, the plugin that ships this one along with the rest of its 5 skills, 10 commands, 9 agents, 5 hooks, 4 MCP servers.

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 ios-coverage

README.md
[![agentmods](https://agentmods.dev/badge/commands/okminlee/everything-claude-code-ios/ios-coverage/github.svg)](https://agentmods.dev/commands/okminlee/everything-claude-code-ios/ios-coverage)
Your own site
<a href="https://agentmods.dev/commands/okminlee/everything-claude-code-ios/ios-coverage"><img src="https://agentmods.dev/badge/commands/okminlee/everything-claude-code-ios/ios-coverage/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 ios-coverage

Your own site · 80×15
<a href="https://agentmods.dev/commands/okminlee/everything-claude-code-ios/ios-coverage"><img src="https://agentmods.dev/badge/commands/okminlee/everything-claude-code-ios/ios-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,141 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00030 $0.02141
Opus 5.5 $0.00012 $0.00856
Sonnet 5.5 $0.00006 $0.00428
Haiku 4.5 $0.00003 $0.00214

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

Security

Grade A, and why

ios-coverage scanned grade A with 1 finding 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 3mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

bash <(curl -s https://codecov.io/bash) -f coverage.lcov
commands/ios-coverage.md · 334 lines

How it starts

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

iOS Test Coverage

Analyze test coverage and generate missing tests for iOS projects.

What This Command Does

  1. Run Tests with Coverage - Execute tests with code coverage enabled
  2. Analyze Coverage Report - Parse xcresult bundle with xccov
  3. Identify Gaps - Find files below 80% threshold
  4. Generate Missing Tests - Create unit/integration tests
  5. Verify and Report - Show before/after metrics

Process

  1. Run tests with coverage:

    xcodebuild test \
      -scheme MyApp \
      -destination 'platform=iOS Simulator,name=iPhone 16' \
      -enableCodeCoverage YES \
      -resultBundlePath TestResults.xcresult
    
  2. Analyze coverage report:

    xcrun xccov view --report TestResults.xcresult
    
  3. Identify files below 80% coverage threshold

  4. For each under-covered file:

    • Analyze untested code paths
    • Generate unit tests for functions
    • Generate integration tests for repositories
    • Identify edge cases to cover
  5. Verify new tests pass

  6. Show before/after coverage metrics

  7. Ensure project reaches 80%+ overall coverage

Running Coverage Analysis

Xcode Project

# Run tests with coverage
xcodebuild test \
  -scheme MyApp \
  -destination 'platform=iOS Simulator,name=iPhone 16' \
  -enableCodeCoverage YES \
  -resultBundlePath TestResults.xcresult

# View summary report
xcrun xccov view --report TestResults.xcresult

# View JSON report (for parsing)
xcrun xccov view --report --json TestResults.xcresult > coverage.json

# View specific file coverage
xcrun xccov view --archive --file Sources/HomeViewModel.swift TestResults.xcresult

Swift Package

# Run with coverage
swift test --enable-code-coverage

# Find coverage data
COVERAGE_PATH=$(swift test --show-codecov-path)

# Convert to report
xcrun llvm-cov report \
  .build/debug/MyPackagePackageTests.xctest/Contents/MacOS/MyPackagePackageTests \
  -instr-profile=$COVERAGE_PATH

Coverage Report Format

╔══════════════════════════════════════════════════════════════╗
║                    Coverage Report                           ║
╠══════════════════════════════════════════════════════════════╣
║ Overall Coverage: 72.4% (Target: 80%)                        ║
║ Status: ❌ BELOW THRESHOLD                                   ║
╚══════════════════════════════════════════════════════════════╝

## Coverage by Target

| Target | Coverage | Status |
|--------|----------|--------|
| MyApp | 68.2% | ❌ |
| MyAppTests | 100% | ✅ |

## Files Below Threshold (<80%)

| File | Coverage | Lines Missed | Priority |
|------|----------|--------------|----------|
| HomeViewModel.swift | 45.2% | 28/51 | 🔴 HIGH |
| NetworkClient.swift | 62.1% | 19/50 | 🟡 MEDIUM |
| UserService.swift | 78.3% | 5/23 | 🟢 LOW |

## Untested Code Paths

### HomeViewModel.swift (45.2%)

**Untested Functions:**
1. `fetchItems()` - Line 23-45
   - Error handling path not tested
   - Empty result case not tested

2. `deleteItem(id:)` - Line 67-89
   - Entire function untested

3. `refreshData()` - Line 102-115
   - Cancellation path not tested

**Recommended Tests:**
```swift
@Test func fetchItems_onError_showsAlert() async {
    // Test error handling path
}

Read the full file on GitHub · 334 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. 3mo ago First seen · 334 lines · 30 tokens per session scan A fa7daf142db0

Subscribe to this mod's changes

ios-coverage is a command published in the GitHub repository OkminLee/everything-claude-code-ios (58 stars, last pushed 8mo ago), licensed MIT. It adds 30 tokens to every session and 2,141 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ios-coverage compared with commands from other repositories

ios-coverage next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ios-coverageOkminLee/everything-claude-code-iosCommand588mo agoMITA30Claude Code
app-store-auditmjmirza/app-store-complianceCommand10ktodaynoneA35Claude Code
erne-animateJubaKitiashvili/everything-react-native-expoCommand501mo agoMITA21Claude Code
react-nativegetsentry/toolkitCommand983todaynoneA0Claude Code
initialize-iosdefendend/Claude-ast-index-searchCommand60526d agoMITA18Claude Code
kmp-update-design-systemronjunevaldoz/kmp-agent-skillsCommand7todaynoneA34Claude Code
mobile-performance-checktungnk123/mobile-best-practicesCommand228mo agoMITA14Claude Code