/scaffolding:scaffolding-environmentfrom scaffolding
Documents environment injection in Scaffolding SwiftUI navigation: typed coordinators, destination metadata, and preview setup. Useful when reading coordinators from environment or adapting views to presentation context.
Ships in scaffolding. 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.
Read when SKILL.md points to them.
This guidance documents the environment surface of the Scaffolding SwiftUI navigation library. At runtime, every view materialised through a coordinator (route, present, setRoot, tabs) receives two kinds of environment values automatically:
@Environment(HomeCoordinator.self): the owning coordinator and every ancestor up the parent chain (each injectable unless opted out).\.destination — metadata about how the current screen was reached (root / push / sheet / full-screen cover and which Destinations case).Views navigate by reading the typed coordinator and calling methods — never by owning path/sheet state. Native environment values (\.dismiss, \.scenePhase, \.openURL) compose normally; \.dismiss works for both pops and modal dismissal because Scaffolding wraps NavigationStack, and is the right tool for reusable components that only need to close/go back without knowing the coordinator type.
struct DetailView: View {
@Environment(HomeCoordinator.self) private var coordinator // typed: full route surface
@Environment(\.destination) private var destination // how did I get here?
var body: some View {
Button("Edit") { coordinator.route(to: .editor) }
}
}
references/coordinator-injection.md: Use when a view reads @Environment(SomeCoordinator.self), when choosing which coordinator a view should talk to, or when using @Scaffoldable(injectsCoordinator: false). Covers ancestor-chain injection, opt-out semantics, and crash-avoidance rules.references/destination.md: Use when a view adapts to how it was presented — back-chevron vs Close button or layout differences per route. Covers current Destination metadata, the routeType vs presentationType distinction, meta matching, the adaptive top-bar pattern, and migration from deprecated sheet configuration metadata.references/previews.md: Use when writing #Preview for any view or coordinator in a Scaffolding project. Covers injecting coordinators manually, why isolated views receive default destination metadata, and how to seed mid-flow preview states.The same caveat applies in tests, where no view is rendered at all: use the scaffolding-testing skill for unit-testing coordinators.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dotaeva/scaffolding --plugin scaffolding5 skills in this plugin
/scaffolding-coordinatorsDefine and review Scaffolding SwiftUI coordinators, module boundaries, @Scaffoldable routes, FlowStack, TabItems, Root, and SplitColumns. Use when choosing a coordinator type, diagnosing macro tracking, or composing navigation across features./scaffolding-routingWrite and review Scaffolding navigation: pushes, pops, modal queues, dismissal, typed child access, awaited results, animation scopes, and deep links. Use when choosing a navigation call or migrating deprecated overloads./scaffolding-state-restorationCapture, restore, migrate, and diagnose Scaffolding navigation snapshots. Use for Codable routes, replay versus replacement, partial-restoration reports, per-scene checkpoints, and hierarchy inspection./scaffolding-testingTest Scaffolding navigation with Swift Testing and ScaffoldingTesting. Use for activation, typed hierarchy assertions, deadline-based waits, results and cancellation, tabs, split columns, deep links, or restoration.Other plugins' skills for the same job