debug-generated-project by tuist/agent-skills
npx skills add https://github.com/tuist/agent-skills --skill debug-generated-projectmise exec tuist@latest -- tuist generate,确认该问题在最新版本中是否存在。向用户询问:
tuist generate)Project.swift 和 Tuist.swift 内容(或相关摘录)tuist version)“何时发生”这个问题的答案决定了验证策略:
tuist generate 进行复现。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
xcodebuild build 进行复现。在调查源代码之前,确认该问题在最新版本中尚未修复。
REPRO_DIR=$(mktemp -d)
cd "$REPRO_DIR"
创建能复现用户场景的最简 Tuist.swift、Project.swift 和源文件。在仍能触发问题的前提下,尽可能保持项目精简。
mise exec tuist@latest -- tuist generate --no-open --path "$REPRO_DIR"
如果问题涉及依赖项,请先安装它们:
mise exec tuist@latest -- tuist install --path "$REPRO_DIR"
克隆仓库并从源码构建 tuist 可执行文件和 ProjectDescription 库,以针对 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
构建的二进制文件将位于 .build/debug/tuist。使用它来测试复现项目:
"$TUIST_SRC/.build/debug/tuist" generate --no-open --path "$REPRO_DIR"
告知用户修复已在 main 分支上,但尚未发布。告诉他们修复将包含在下一次发布中,如果可以的话,请指出相关的提交。
继续步骤 4。
调查 Tuist 源代码以理解问题发生的原因。
在源代码中识别根本原因。
应用修复。
通过重新构建并针对复现项目运行来验证:
cd "$TUIST_SRC"
swift build --product tuist --product ProjectDescription --replace-scm-with-registry
"$TUIST_SRC/.build/debug/tuist" generate --no-open --path "$REPRO_DIR"
压缩复现项目并将其包含在 PR 中:
cd "$REPRO_DIR" && cd ..
zip -r reproduction.zip "$(basename "$REPRO_DIR")" -x '*.xcodeproj/*' -x '*.xcworkspace/*' -x 'Derived/*' -x '.build/*'
在 Tuist 仓库上提交一个 PR,包含:
告知用户问题所在以及如何修复。常见的配置错误包括:
tuist generate 之前缺少 tuist install-ObjC 链接器标志sources 和 resources glob 模式与 buildableFolders提供修正后的清单代码片段,以便用户可以直接应用修复。
如果您无法确定是 bug 还是配置错误,建议用户:
提供您调查内容和已排除项的摘要,以便用户无需重复分类过程。
测试修复时,始终验证完整流程:
# 构建修复后的 tuist
cd "$TUIST_SRC"
swift build --product tuist --product ProjectDescription --replace-scm-with-registry
# 如果需要,安装依赖项
"$TUIST_SRC/.build/debug/tuist" install --path "$REPRO_DIR"
# 生成项目
"$TUIST_SRC/.build/debug/tuist" generate --no-open --path "$REPRO_DIR"
# 构建生成的项目
xcodebuild build \
-workspace "$REPRO_DIR"/*.xcworkspace \
-scheme <scheme> \
-destination "platform=iOS Simulator,name=iPhone 16 Pro"
当用户报告运行时问题(启动时崩溃、运行时缺少资源、错误的包结构或意外行为)时,您必须超越构建步骤,实际在模拟器上启动应用。
# 启动模拟器
xcrun simctl boot "iPhone 16 Pro" 2>/dev/null || true
# 为模拟器构建
xcodebuild build \
-workspace "$REPRO_DIR"/*.xcworkspace \
-scheme <scheme> \
-destination "platform=iOS Simulator,name=iPhone 16 Pro" \
-derivedDataPath "$REPRO_DIR/DerivedData"
# 安装应用
xcrun simctl install booted "$REPRO_DIR/DerivedData/Build/Products/Debug-iphonesimulator/<AppName>.app"
# 启动并监控 — 如果应用异常终止,这将打印崩溃信息
xcrun simctl launch --console-pty booted <bundle-identifier>
--console-pty 标志会流式传输应用的标准输出/标准错误,以便您可以直接观察日志和崩溃输出。注意观察:
-ObjC 链接器标志)如果应用崩溃但没有有用的控制台输出,请提取崩溃日志:
# 列出应用最近的崩溃日志
find ~/Library/Logs/DiagnosticReports -name "<AppName>*" -newer "$REPRO_DIR" -print
阅读崩溃日志以识别崩溃线程和故障符号。
每周安装量
192
仓库
GitHub 星标数
28
首次出现
2026年2月11日
安全审计
安装于
codex171
github-copilot169
opencode169
gemini-cli166
amp164
kimi-cli163
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.
Identify the root cause in the source code.
Apply the fix.
Verify by rebuilding and running against the reproduction project:
cd "$TUIST_SRC"
swift build --product tuist --product ProjectDescription --replace-scm-with-registry
"$TUIST_SRC/.build/debug/tuist" generate --no-open --path "$REPRO_DIR"
Zip the reproduction project and include it in the PR:
cd "$REPRO_DIR" && cd ..
zip -r reproduction.zip "$(basename "$REPRO_DIR")" -x '*.xcodeproj/*' -x '*.xcworkspace/*' -x 'Derived/*' -x '.build/*'
Open a PR on the Tuist repository with:
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.
Weekly Installs
192
Repository
GitHub Stars
28
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
codex171
github-copilot169
opencode169
gemini-cli166
amp164
kimi-cli163