.agents/skills/debug-generated-project/SKILL.md
Debugs issues users encounter with Tuist-generated projects by reproducing the scenario locally, building Tuist from source when needed, and triaging whether it is a bug, misconfiguration, or something that needs team input. Use when users report generation failures, build errors after generation, or unexpected project behavior.
npx skillsauth add DFly7/iOS-FastAPI-Supabase-AI debug-generated-projectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
mise exec tuist@latest -- tuist generate against a reproduction project.Ask the user for:
tuist generate)Project.swift and Tuist.swift content (or relevant excerpts)tuist version)The answer to "when" determines the verification strategy:
tuist generate.xcodebuild build after generation.Before investigating the source code, confirm the issue is not already fixed in the latest release.
REPRO_DIR=$(mktemp -d)
cd "$REPRO_DIR"
Create minimal Tuist.swift, Project.swift, and source files that reproduce the user's scenario. Keep it as small as possible while still triggering the issue.
mise exec tuist@latest -- tuist generate --no-open --path "$REPRO_DIR"
If the issue involves dependencies, install them first:
mise exec tuist@latest -- tuist install --path "$REPRO_DIR"
Clone the repository and build the tuist executable and ProjectDescription library from source to test against the latest code on main.
TUIST_SRC=$(mktemp -d)
git clone --depth 1 https://github.com/tuist/tuist.git "$TUIST_SRC"
cd "$TUIST_SRC"
swift build --product tuist --product ProjectDescription --replace-scm-with-registry
The built binary will be at .build/debug/tuist. Use it to test the reproduction project:
"$TUIST_SRC/.build/debug/tuist" generate --no-open --path "$REPRO_DIR"
Tell the user the fix is already on main, and it hasn't been released, tell them it'll be in the nest release and point them to the relevant commit if you can identify it.
Continue to Step 4.
Investigate the Tuist source code to understand why the issue occurs.
cd "$TUIST_SRC"
swift build --product tuist --product ProjectDescription --replace-scm-with-registry
"$TUIST_SRC/.build/debug/tuist" generate --no-open --path "$REPRO_DIR"
cd "$REPRO_DIR" && cd ..
zip -r reproduction.zip "$(basename "$REPRO_DIR")" -x '*.xcodeproj/*' -x '*.xcworkspace/*' -x 'Derived/*' -x '.build/*'
Tell the user what is wrong and how to fix it. Common misconfigurations:
tuist install before tuist generate when using external dependencies-ObjC linker flag for Objective-C dependenciessources and resources globs together with buildableFoldersProvide the corrected manifest snippet so the user can apply the fix directly.
If you cannot determine whether it is a bug or misconfiguration, recommend the user:
Provide a summary of what you investigated and what you ruled out, so the user does not have to repeat the triage.
When testing a fix, always verify the full cycle:
# Build the patched tuist
cd "$TUIST_SRC"
swift build --product tuist --product ProjectDescription --replace-scm-with-registry
# Install dependencies if needed
"$TUIST_SRC/.build/debug/tuist" install --path "$REPRO_DIR"
# Generate the project
"$TUIST_SRC/.build/debug/tuist" generate --no-open --path "$REPRO_DIR"
# Build the generated project
xcodebuild build \
-workspace "$REPRO_DIR"/*.xcworkspace \
-scheme <scheme> \
-destination "platform=iOS Simulator,name=iPhone 16 Pro"
When the user reports a runtime issue (crash on launch, missing resources at runtime, wrong bundle structure, or unexpected behavior), you must go beyond building and actually launch the app on a simulator.
# Boot a simulator
xcrun simctl boot "iPhone 16 Pro" 2>/dev/null || true
# Build for the simulator
xcodebuild build \
-workspace "$REPRO_DIR"/*.xcworkspace \
-scheme <scheme> \
-destination "platform=iOS Simulator,name=iPhone 16 Pro" \
-derivedDataPath "$REPRO_DIR/DerivedData"
# Install the app
xcrun simctl install booted "$REPRO_DIR/DerivedData/Build/Products/Debug-iphonesimulator/<AppName>.app"
# Launch and monitor — this will print crash info if the app terminates abnormally
xcrun simctl launch --console-pty booted <bundle-identifier>
The --console-pty flag streams the app's stdout/stderr so you can observe logs and crash output directly. Watch for:
-ObjC linker flag missing)If the app crashes without useful console output, pull the crash log:
# List recent crash logs for the app
find ~/Library/Logs/DiagnosticReports -name "<AppName>*" -newer "$REPRO_DIR" -print
Read the crash log to identify the crashing thread and the faulting symbol.
development
Resolve Swift concurrency compiler errors, adopt approachable concurrency (SE-0466), and write data-race-safe async code. Use when fixing Sendable conformance errors, actor isolation warnings, or strict concurrency diagnostics; when adopting default MainActor isolation, @concurrent, nonisolated(nonsending), or Task.immediate; when designing actor-based architectures, structured concurrency with TaskGroup, or background work offloading; or when migrating from @preconcurrency to full Swift 6 strict concurrency.
development
Implement Swift Codable models for JSON and property-list encoding and decoding with JSONDecoder, JSONEncoder, CodingKeys, and custom init(from:) or encode(to:). Use when parsing API responses, remapping keys, flattening nested JSON, handling date or data decoding strategies, decoding heterogeneous arrays, or integrating Codable with URLSession, SwiftData, or UserDefaults.
development
Implement, review, or improve data visualizations using Swift Charts. Use when building bar, line, area, point, pie, or donut charts; when adding chart selection, scrolling, or annotations; when plotting functions with vectorized BarPlot, LinePlot, AreaPlot, or PointPlot; when customizing axes, scales, legends, or foregroundStyle grouping; or when creating specialized visualizations like heat maps, Gantt charts, stacked/grouped bars, sparklines, or threshold lines.
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.