swift-macros
CommunitySwift macro mastery for code generation
Software Engineering#debugging#macros#swift#code-generation#compiler-plugin#swift-syntax#macro-testing
AuthorAutisticAF
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Swift macros help developers reduce boilerplate and improve maintainability by generating code at compile time using SwiftSyntax, making generated code visible, debuggable, and easier to reason about.
Core Features & Use Cases
- Freestanding and attached macros to generate new declarations or transform existing code.
- Macro roles and a decision tree to guide when to use freestanding vs attached macros and extension macros.
- Testing and debugging workflows, including examples for assertMacroExpansion, diagnostics, and macro expansion exploration.
- Macro package setup and integration with a Swift package (Package.swift and compiler plugin setup).
- API availability and patterns for common macro usage and evolution (SwiftSyntaxMacros, SwiftCompilerPlugin).
Quick Start
Install the macro package and begin using freestanding or attached macros in your Swift project.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: swift-macros Download link: https://github.com/AutisticAF/claude-code-apple-dev-plugin/archive/main.zip#swift-macros Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.