/scout:scout-filesfrom scout
Counts files by extension in the current checkout or across git history. Outputs paths and counts as JSON for charting or inventory.
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 filesCount files by extension, in the current working tree or across commits. The result is the list of paths, so it answers "where" as well as "how many".
Run scout files --help for flags — it is the source of truth. This file covers what the help does not say.
{
"metrics": [
{ "extension": "storyboard" },
{ "extension": "xib", "commits": ["abc123", "def456"] },
{ "extension": "swift" }
],
"git": { "repoPath": "/path/to/repo", "clean": true }
}
Extensions go without the dot. One metric is one extension — there is no grouping and no glob; to count "all image assets" run several metrics and sum them with jq.
{
"commit": "abc1234def5678",
"date": "2025-01-15T07:30:00Z",
"results": [
{ "filetype": "swift", "files": ["Sources/App.swift", "Sources/Model.swift"] },
{ "filetype": "storyboard", "files": ["Main.storyboard"] }
]
}
Paths are absolute, not relative to the repository root — /Users/you/Developer/app/Sources/App.swift. scout types and scout pattern return relative paths; files is the odd one out, so strip the prefix yourself before joining the data with theirs.
The count is files | length.
scout files swift storyboard xib --output /tmp/files.json
jq -r '.[] | .results[] | "\(.filetype)\t\(.files | length)"' /tmp/files.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, .filetype, (.files | length)] | @csv' /tmp/files.json
REPO=~/Developer/myapp
jq -r --arg repo "$REPO/" '.[-1].results[] | select(.filetype == "xib") | .files[] | sub($repo; "")' \
/tmp/files.json | cut -d/ -f1-2 | sort | uniq -c | sort -rn
The sub strips the absolute prefix; without it every path buckets under /Users.
jq '.[-1].results | map(select(.filetype == "storyboard" or .filetype == "xib") | .files | length) | add' \
/tmp/files.json
.swift with the leading dot — nothing matches and the zero looks real.scout-loc.Pods/, Carthage/, DerivedData/ and vendored sources are counted — filter the JSON with jq..github" comes back zero.scout-loc — size rather than count, with include/exclude paths.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-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./scout-typesCount Swift types by inheritance with `scout types`. Trigger when the question is about how many types derive from a base, e.g. "how many UIViewControllers do we have?", "list every SwiftUI View in this repo", "how many XCTestCase subclasses are left?", "list every subclass of our BaseViewModel with its file path", "how many types inherit from UseCase<*>, where the generic parameter varies?", "count our BaseCoordinator subclasses", "track adoption of our new Repository<*> base class across commits since january", "did UIKit screens shrink over the last year?", "which files declare UIView subclasses?". Resolves inheritance through the source and through the Xcode SDK, so `UICollectionViewCell` subclasses count as `UIView`.Other plugins' skills for the same job