swiftgen-integration_skill

This skill provides expert SwiftGen decisions for iOS projects, guiding template choice, organization, and build-phase configuration to maximize type-safety
  • Shell

6

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill kaakati/rails-enterprise-dev --skill swiftgen-integration

  • SKILL.md12.1 KB

Overview

This skill gives expert guidance for integrating SwiftGen into iOS and tvOS projects. It helps you decide when type-safe generated code is worth the setup cost, which templates and parameters to choose, and how to organize assets and build phases for reliable CI. Use it to set up SwiftGen, pick templates, debug generation problems, and design multi-module workflows.

How this skill works

The skill inspects project scale, asset/strings counts, team structure, and CI status to recommend whether to adopt SwiftGen. It maps asset types to ideal templates (structured-swift5, swift5, scenes-swift5), suggests swiftgen.yml patterns and run strategies, and flags common pitfalls like hardcoded paths, missing publicAccess, and incorrect build phase ordering. It also provides sample scripts, input/output patterns, and troubleshooting steps for common errors.

When to use it

  • Setting up an app with >20 assets or many localized strings
  • Choosing templates for strings, images, colors, fonts, or storyboards
  • Designing asset catalog layout for medium to large apps or multi-module projects
  • Configuring Xcode build phases and CI generation
  • Debugging missing generated files, wrong bundle, or access-level issues

Best practices

  • Use structured-swift5 for hierarchical localization keys and flat-swift5 for flat keys
  • Keep swiftgen.yml committed and Generated/ files gitignored unless CI cannot run generation
  • Run SwiftGen before Compile Sources or use input/output file lists to enable Xcode incremental builds
  • Avoid modifying generated files; extend via separate files and use publicAccess for shared modules
  • Check for SwiftGen availability in build script to avoid hard failures on machines without it

Example use cases

  • Enable type-safe image and color access in a team project with shared asset catalogs
  • Set up per-module SwiftGen configs for a large app to keep assets and strings scoped and publicAccess accurate
  • Add a Run Script phase that runs SwiftGen on every build with input/output paths to speed incremental builds
  • Use structured-swift5 for nested localization keys to get L10n.Auth.Login.title style access
  • Configure a design system module with its own swiftgen.yml and public generated outputs for reuse across apps

FAQ

Generally no: gitignore Generated/ and let CI generate them. Commit only if CI cannot run SwiftGen; then enforce pre-commit generation hooks to avoid staleness.

Which template for localization?

Use structured-swift5 when keys are hierarchical (auth.login.title); use flat-swift5 for flat keyspaces or very small projects.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational