home / skills / derklinke / codex-config / tuist-best-practices
/skills/tuist-best-practices
This skill helps you implement Tuist best practices for manifests, helpers, and caching to streamline iOS project workflows.
npx playbooks add skill derklinke/codex-config --skill tuist-best-practicesReview the files below or copy the command above to add this skill to your agents.
---
name: tuist-best-practices
description: Best practices for Tuist manifests, ProjectDescriptionHelpers, caching, and iOS project workflows.
metadata:
short-description: Tuist best practices for iOS projects
---
# Tuist Best Practices
## When to use
- editing Tuist manifests or adding targets
- updating project structure or shared helpers
- generating Xcode projects or debugging Tuist behavior
## Repo layout
- root config in `Tuist.swift`
- shared helpers in `Tuist/ProjectDescriptionHelpers`
- iOS manifest in `Project.swift` (often under `ios/` but not required)
- prefer repo-provided task runner (`just`, `make`, etc.) for generate/build/test/open
- if using `tuist xcodebuild`, keep subcommand first to avoid argument reorder issues
## Manifests
- `Project.swift`: root variable should be `let project = Project(...)`
- `Workspace.swift` optional; Tuist auto-generates workspace with project + dependencies
- `Tuist.swift` recommended; Tuist walks up dirs to find it, so running from `ios/` still uses root config
## Code sharing
- place helpers in `Tuist/ProjectDescriptionHelpers`
- import with `import ProjectDescriptionHelpers` in manifests
- helpers available in `Project.swift`, `Workspace.swift`, and `Package.swift` (behind `#TUIST`)
## Caching
- `tuist cache` builds binaries; `tuist generate/test` use binary cache by default when available
- opt out with `--no-binary-cache`
- binary cache is for dev/test, not release builds
## Change workflow
- add targets/settings in `Project.swift` using helpers
- after adding files or project changes: run repo generate task (e.g. `just generate`)
- avoid running `xcodebuild` directly
## References
- Tuist docs: manifests, directory structure, code sharing, module cache, config (docs.tuist.dev)
This skill captures practical best practices for working with Tuist manifests, ProjectDescriptionHelpers, caching, and common iOS project workflows. It focuses on repository layout, safe manifest patterns, efficient caching, and a repeatable change workflow to keep projects consistent and maintainable.
The skill inspects recommended file organization and naming conventions for Tuist manifests and shared helper code. It describes how to use the binary cache, when to opt out, and how to run generation and build tasks through repo-provided scripts. It also outlines where helpers should live and how to import and use them in manifests.
Where should I put shared helper code for manifests?
Put helpers in Tuist/ProjectDescriptionHelpers and import them in manifests with import ProjectDescriptionHelpers so they are available to Project.swift, Workspace.swift, and Package.swift (behind #TUIST).
When should I disable the binary cache?
Disable the binary cache with --no-binary-cache when you need to build from source for debugging, when reproducing release builds, or if a cached artifact causes unexpected behavior.