swift-blast-radius

swift-blast-radius is a skill for Claude Code from drewalth/claude-xcindex. It costs 69 tokens per session (784 once invoked), scanned A, original, MIT.

A code-analysis skill uses Xcode's existing index to show which Swift or Objective-C files depend on a selected file. It reports direct dependents, one additional level of callers, and related tests.

In plain words
What is it for?
It is for planning refactors, checking the likely risk of structural changes, and identifying tests to run after editing a Swift or Objective-C file.
Why use it?
It helps estimate the impact of changing a shared file without opening many unrelated files first.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Part of the xcindex plugin — 4 skills, 2 commands, 1 agent, 3 hooks, 1 MCP server shipped together

Good fit It is for planning refactors, checking the likely risk of structural changes, and identifying tests to run after editing a Swift or Objective-C file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/drewalth/claude-xcindex/swift-blast-radius
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 drewalth/claude-xcindex --skill swift-blast-radius
Clone the repo
git clone --depth 1 https://github.com/drewalth/claude-xcindex

Made for: Claude Code.

Or install xcindex, the plugin that ships this one along with the rest of its 4 skills, 2 commands, 1 agent, 3 hooks, 1 MCP server.

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-blast-radius

README.md
[![agentmods](https://agentmods.dev/badge/skills/drewalth/claude-xcindex/swift-blast-radius/github.svg)](https://agentmods.dev/skills/drewalth/claude-xcindex/swift-blast-radius)
Your own site
<a href="https://agentmods.dev/skills/drewalth/claude-xcindex/swift-blast-radius"><img src="https://agentmods.dev/badge/skills/drewalth/claude-xcindex/swift-blast-radius/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-blast-radius

Your own site · 80×15
<a href="https://agentmods.dev/skills/drewalth/claude-xcindex/swift-blast-radius"><img src="https://agentmods.dev/badge/skills/drewalth/claude-xcindex/swift-blast-radius.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 784 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.00069 $0.00784
Opus 5 $0.00034 $0.00392
Sonnet 5 $0.00014 $0.00157
Haiku 4.5 $0.00007 $0.00078

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

Security

Grade A, and why

swift-blast-radius 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 10d 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.

skills/swift-blast-radius/SKILL.md · 72 lines

How it starts

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

What this skill does

Given a file path, returns three sets:

  • directDependents — files that directly call symbols defined in the target.
  • affectedFilesdirectDependents plus one hop of transitive callers.
  • coveringTests — test files within the affected set.

This replaces "read 20 files to understand the codebase before editing." The index already knows.

How to use

  1. Call blast_radius with the absolute file path.
  2. Read the result and decide:
    • Refactor or signature change: read all of directDependents plus coveringTests. Skip affectedFiles unless you're doing something deep.
    • Behavior-preserving internal change: skim directDependents, run coveringTests.
  3. Treat affectedFiles as a risk surface, not a reading list — it's where regressions might surface, not where edits happen.

Token-saving pattern

BAD:  Read 20 files to "understand the codebase" before editing NetworkClient.swift
GOOD: blast_radius("NetworkClient.swift")
      → directDependents: [APIService.swift, AuthManager.swift]
      → coveringTests:    [NetworkClientTests.swift]
      Read only those 3. Save 17 file reads.

Example

User: "I need to refactor ModelData.swift. What do I need to read first?"

  1. blast_radius(filePath: "/abs/path/ModelData.swift")
  2. Returns 5 direct dependents + 2 covering tests.
  3. Read those 7 files. Refactor with confidence in the impact surface.

When it won't help

  • The unit of analysis is a symbol, not a file → use swift-find-references.
  • The file is a leaf with obviously no inbound callers (e.g. a screen-specific View) — blast_radius will just confirm that, but it's not the cheapest path.
  • The index is stale (the user edited but didn't build) — the MCP server will attach a freshness warning; respect it.
  • swift-refactor-plan — when the user wants a full written plan with risks and a recommended next step, not just an impact list.
  • swift-find-references — for symbol-level scoping.
  • swift-rename-symbol — once the user has decided to act.

Read the full file on GitHub · 72 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. 10d ago First seen · 72 lines · 69 tokens per session scan A 9def7a783c81

Subscribe to this mod's changes

swift-blast-radius is a skill published in the GitHub repository drewalth/claude-xcindex (3 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 784 once invoked, about $0.0003 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-08-31.