/scout:scout-typesfrom scout
Counts Swift types by inheritance, resolving through source and Xcode SDK. Answers queries like 'how many UIViewControllers?' or 'list all UIView subclasses' across commits.
Ships in scout. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
scout typesCount types that inherit from (or conform to) the given base types, in the current working tree or across commits.
Run scout types --help for flags — it is the source of truth. This file covers what the help does not say.
Inheritance chains are followed through the analyzed source. A base class that lives outside the source — class ProductCell: UICollectionViewCell — is still resolved: scout extracts the real class hierarchy with swift-symbolgraph-extract for the modules the source imports, against the Xcode iOS simulator SDK specifically. There is no hardcoded UIKit mapping, so UICollectionViewCell, UITableViewCell and UIControl subclasses all land under UIView.
Protocol conformance written in the source counts too: struct ContentView: View is found under View. What the SDK adds is class inheritance only — inheritsFrom edges, never conformsTo — so a protocol that refines another protocol outside the source is not followed.
Consequences worth stating out loud when reporting numbers:
NSControl subclasses never roll up into NSView. Counting AppKit hierarchies is source-only in practice.{
"metrics": [
{ "type": "UIView" },
{ "type": "UIViewController", "commits": ["abc123", "def456"] },
{ "type": "BaseCoordinator<*>" }
],
"git": { "repoPath": "/path/to/repo", "clean": true }
}
<*> matches any generic variant — BaseCoordinator<*> catches BaseCoordinator<SomeFlow> and BaseCoordinator<OtherFlow>. Without it only the exact name matches, and a generic base class scores zero.
Any type name works, not just Apple's: BaseViewModel, FeatureModule, QuickSpec.
{
"commit": "abc1234def5678",
"date": "2025-01-15T07:30:00Z",
"results": [
{
"typeName": "UIView",
"types": [
{ "name": "HeaderView", "fullName": "Components.HeaderView", "path": "Sources/Components/HeaderView.swift" }
]
}
]
}
name is the bare type name, fullName is qualified with enclosing types, path is relative to the repository root. The count is types | length — scout reports the list, not a number.
scout types UIView UIViewController View --output /tmp/types.json
jq -r '.[] | .results[] | "\(.typeName)\t\(.types | length)"' /tmp/types.json
No --commits, so scout reads the files as they are — uncommitted changes included — and changes nothing in git: no checkout, no clean. Start here; replay history only when the question is about change over time.
jq -r '.[] | .date as $d | .results[] | [$d, .typeName, (.types | length)] | @csv' /tmp/types.json
jq -r '.[-1].results[] | select(.typeName == "UIViewController") | .types[].path' /tmp/types.json \
| sed 's|/[^/]*$||' | sort | uniq -c | sort -rn
<*> and report the zero as fact.scout-pattern — occurrences of arbitrary text when inheritance isn't the question.scout (umbrella) — output envelope, per-metric commits, --git-clean footgun, detached HEAD after a historical run.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dodobrands/scout --plugin scout6 skills in this plugin
/scoutPlan and run a multi-metric measurement of a repository with the `scout` CLI, and pick which subcommand a request needs. Trigger on cross-cutting intent rather than a single number, e.g. "build a dashboard of codebase metrics", "measure how this repo changed over two years", "I need numbers for the UIKit-to-SwiftUI migration from several angles", "set up a monthly metrics job in CI", "what can we even measure about this codebase?", "which scout command do I want for this?", "collect these metrics at the same commits so the series line up", "how do I run this over history without wrecking my working copy?". Also the place for anything shared across metrics — replaying over git history, the output envelope, config vs CLI precedence, and the ways a historical run damages a working checkout. Single-axis questions belong to `scout-types`, `scout-files`, `scout-pattern`, `scout-loc` or `scout-build-settings`./scout-build-settingsExtract Xcode build settings per target with `scout build-settings`. Trigger when the question is about project configuration rather than source code, e.g. "which Swift version do our targets build with?", "what is our minimum iOS deployment target?", "which modules still have strict concurrency off?", "when did we move to Swift 6?", "show SWIFT_VERSION per target across the last year". Discovers `.xcodeproj` files by glob and can run setup commands first, so Tuist and XcodeGen projects work too. macOS only./scout-filesCount files by extension with `scout files` and replay that count over git history. Use it whenever the answer is a per-extension inventory or how one moved over time — "сколько сторибордов было год назад и сколько сейчас", "how many yml files were in .github a year ago versus now", "how did the markdown file count change per quarter", "file counts for swift, storyboard and xib at these three commits", "a burn-down of our graphql files across the last 12 months as data I can chart", "export swift/storyboard/xib counts as json every month for Grafana", "an inventory of every .sh file with its path", "track the disappearance of our .nib files, one point per quarter". Any extension counts, not only iOS ones. A bare count in the current checkout is a job for find; this skill earns its place when the question spans commits, needs the paths, or has to produce data that lines up with the other scout metrics. It counts files, never their size on disk./scout-locCount lines of code with `scout loc`, a `cloc` wrapper that can replay the count over git history. Trigger when the question is about size rather than count, e.g. "how many lines of Swift do we have?", "how did the codebase grow over two years?", "lines of code per module", "how much Objective-C is left in the legacy module?", "app code versus test code". Takes several languages per metric plus directory include/exclude filters./scout-patternCount lines matching a literal string or a regex in source files with `scout pattern`, in the current working tree or replayed over git history. Trigger when the question is about text in the code and how much of it there is, or how that amount moved over time, e.g. "how many files import UIKit?", "count our TODOs", "how many force unwraps are left?", "count @MainActor month by month since we adopted concurrency", "track the move from XCTest to Swift Testing", "where do we still use DispatchQueue.main?", "how many print statements ship in the app?", "how many hardcoded http links do we have?". Prefer it over a hand-rolled grep, especially once more than one commit is involved. One entry per matching line, with file and line number.Other plugins' skills for the same job