code-generation-developer
Context-aware routing to code generation workflows including SwiftGen, Sourcery, Feature Flags, and Protobuf. Use when running make generate, adding feature flags, or working with generated files.
Install
mkdir -p .claude/skills/code-generation-developer && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6714" && unzip -o skill.zip -d .claude/skills/code-generation-developer && rm skill.zipInstalls to .claude/skills/code-generation-developer
About this skill
Code Generation Developer (Smart Router)
Purpose
Context-aware routing to code generation workflows: SwiftGen, Sourcery, Feature Flags, and Protobuf. Helps you navigate when and how to run generators.
When Auto-Activated
- Running or discussing
make generate - Adding feature flags
- Working with generated files
- Keywords: swiftgen, sourcery, feature flags, FeatureFlags, make generate
🚨 CRITICAL RULES (NEVER VIOLATE)
- NEVER edit generated files - Files marked with
// Generated using Sourcery/SwiftGenare auto-generated - ALWAYS run
make generateafter changes - When updating templates, flags, assets, or localization - Feature flags for all new features - Wrap experimental code for safe rollouts
- Update source, not generated code - Edit templates/configurations, then regenerate
📋 Essential Commands
make generate # Run all generators (SwiftGen, Sourcery, assets, localization)
make generate-middle # Regenerate middleware and protobuf (when dependencies change)
make setup-middle # Initial middleware setup
🚩 Feature Flags Quick Workflow
1. Define Flag
File: /Modules/AnytypeCore/AnytypeCore/Utils/FeatureFlags/FeatureDescription+Flags.swift
extension FeatureDescription {
static let newChatInterface = FeatureDescription(
title: "New Chat Interface",
type: .feature(author: "Your Name", releaseVersion: "0.42.0"),
defaultValue: false, // Off in production
debugValue: true // On in debug builds for testing
)
}
2. Generate
make generate
This creates: Modules/AnytypeCore/AnytypeCore/Generated/FeatureFlags.swift
3. Use in Code
import AnytypeCore
if FeatureFlags.newChatInterface {
NewChatView()
} else {
LegacyChatView()
}
Flag Types
.debug: Debug-only (not available in production).feature(author:releaseVersion:): Production feature with metadata
Best Practices
defaultValue: falsefor unreleased featuresdebugValue: truefor easier developer testing- Remove flags after full rollout
🎯 When to Run make generate
| You Did This | Run This | Why |
|---|---|---|
| Added/updated .xcstrings | make generate | Regenerate Loc constants |
| Added feature flag | make generate | Generate FeatureFlags enum |
| Added icon to Assets.xcassets | make generate | Generate Image asset constants |
| Modified Sourcery template | make generate | Regenerate code from templates |
| Updated middleware version | make generate-middle | Regenerate protobuf bindings |
🎨 SwiftGen - Assets & Localization
Adding Icons
- Export SVG from Figma (e.g., "32/qr code" →
QRCode.svg) - Add to
/Modules/Assets/.../Assets.xcassets/DesignSystem/x32/QRCode.imageset/ - Run
make generate - Use:
Image(asset: .X32.qrCode)
Icon Sizes: x18, x24, x32, x40 (pt)
Localization
SwiftGen generates Loc constants from .xcstrings files.
See localization-developer skill for complete workflow.
🔧 Sourcery - Template-Based Generation
Sourcery generates Swift code from templates based on source file annotations.
Common uses:
- Protocol conformance
- Mock implementations
- Dependency injection
- Enum helpers
Workflow:
- Add annotation to source file:
// sourcery: AutoEquatable - Run
make generate - Use generated code (don't edit generated files!)
🔌 Middleware & Protobuf
When to Regenerate
- Middleware version updated
Dependencies/Middleware/Lib.xcframeworkmissing binaries- Build errors related to middleware symbols
Commands
make setup-middle # Initial setup
make generate-middle # Regenerate middleware + protobuf
⚠️ Common Mistakes
Editing Generated Files
// In FeatureFlags.swift (GENERATED)
static let myFlag: Bool = true // ❌ DON'T DO THIS
// Your changes will be overwritten
✅ Correct: Edit FeatureDescription+Flags.swift, then make generate
Forgetting to Generate
// Added FeatureDescription but didn't generate
if FeatureFlags.myNewFlag { // ❌ Error: unresolved identifier
...
}
✅ Correct: Run make generate first
Missing Middleware Binaries
Symptoms: "Lib.xcframework missing binaries"
Solution: make setup-middle or make generate
📚 Complete Documentation
Full Guide: Modules/AnytypeCore/CODE_GENERATION_GUIDE.md
For comprehensive coverage of:
- Feature Flags lifecycle (Development → Beta → Rollout → Cleanup)
- SwiftGen configuration files and workflows
- Sourcery templates and annotations
- Protobuf splitting configuration
- Complete troubleshooting guide
- Generated file locations
✅ Checklist: Before Committing
- Ran
make generateif you added/updated:- Feature flags
- Icons/assets
- Localization strings
- Sourcery annotations
- Did NOT manually edit files with "// Generated using" header
- Committed both source AND generated files
- Verified build succeeds
🔗 Related Skills & Docs
- localization-developer →
LOCALIZATION_GUIDE.md- Localization keys generated by SwiftGen - ios-dev-guidelines →
IOS_DEVELOPMENT_GUIDE.md- Never edit generated files - design-system-developer → Icons generated by SwiftGen
Navigation: This is a smart router. For deep technical details, always refer to CODE_GENERATION_GUIDE.md.
More by anyproto
View all skills by anyproto →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversAutomate Excel file tasks without Microsoft Excel using openpyxl and xlsxwriter for formatting, formulas, charts, and ad
Boost AI coding agents with Ref Tools—efficient documentation access for faster, smarter code generation than GitHub Cop
Transform Figma designs into high-quality code with AI. Seamless figma to code and figma to html workflows for efficient
Dot AI (Kubernetes Deployment) streamlines and automates Kubernetes deployment with intelligent guidance and vector sear
Integrate AI-powered Tripo 3D generation API with Blender 3D addon for seamless text-to-3D model creation and advanced 3
Integrate TomTom's APIs for advanced location-aware apps with maps, routing, geocoding, and traffic—an alternative to Go
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.