home / skills / swiftzilla / skills / swiftzilla
This skill analyzes Swift dependency graphs and provides impact insights and expert guidance from a curated Swift and iOS knowledge base.
npx playbooks add skill swiftzilla/skills --skill swiftzillaReview the files below or copy the command above to add this skill to your agents.
---
name: swiftzilla
description: >-
Swift/iOS static analysis CLI. Use `depgraph` to find who calls a function,
what breaks if you change a file, track call sites and blast radius before
refactoring, and map symbol dependencies across files. Use `ask` to consult
Swift/iOS/tvOS/watchOS/macOS documentation and best practices.
license: Proprietary
compatibility: Requires macOS 13+. The binary is a universal macOS executable (arm64 + x86_64).
metadata:
author: SwiftZilla
version: "ee6338f"
---
# SwiftZilla CLI
Swift/iOS static analysis and knowledge base:
1. **`depgraph`** — Find who calls a function, what breaks if you refactor, track call sites and blast radius
2. **`ask`** — Consult Swift/iOS/tvOS/watchOS/macOS documentation and best practices
## Installation
The `swiftzilla` binary is in `{workspace_or_agent_folder}/swiftzilla/scripts/`. Make it executable:
```bash
chmod +x ./{workspace_or_agent_folder}/swiftzilla/scripts/swiftzilla
```
## When to use SwiftZilla
| Situation | Command |
|-----------|---------|
| First run in a new project | `depgraph index --path .` |
| Who calls this function/method? | `depgraph impact <file> --lines start:end` |
| What breaks if I change these lines? | `depgraph impact <file> --lines start:end` |
| What does this code depend on? | `depgraph impact <file> --lines start:end` |
| Ask Swift/iOS best-practice questions | `ask "your question"` |
## Quick Start
```bash
# 1. Build dependency index (re-run after structural file changes)
swiftzilla depgraph index --path .
# 2. Analyze blast radius — who calls this, what depends on it
swiftzilla depgraph impact UserService.swift --lines 10:30
# 3. Ask the Swift/iOS knowledge base
swiftzilla ask "how to use async/await with actors"
```
## Detailed References
- [DepGraph Reference](references/depgraph.md) — dependency indexing and impact analysis
- [Ask Reference](references/ask.md) — curated Swift/iOS knowledge lookup
## Requirements
- macOS 13 (Ventura) or later
- A Swift project with `.swift` source files for `depgraph`
- `SWIFTZILLA_API_KEY` for `ask` (see [Ask Reference](references/ask.md))
This skill analyzes Swift project dependency graphs and estimates change impact with the depgraph commands, and provides a curated Swift/iOS knowledge base via the ask command. It’s a lightweight CLI-focused assistant for developers who need quick dependency insight and targeted implementation guidance. Use it to plan safe refactors and get practical Swift/iOS answers tied to modern patterns.
The depgraph component indexes Swift source files to build a dependency graph, then lets you query transitive dependencies or compute blast radius for specific file ranges. The impact command maps which files and symbols a change would touch. The ask command queries a curated Swift/iOS knowledge base using an API key to return implementation guidance and best-practice answers.
Do I need special permissions to run depgraph?
No special permissions are required beyond read access to the project files; depgraph reads .swift sources and builds an index locally.
What platforms are supported?
The CLI requires macOS 13 or later and a Swift project with .swift files. The ask command also needs SWIFTZILLA_API_KEY configured for the knowledge base.