Bun macros let you run JavaScript at bundle time and inline the results directly into your output code. Think embedding environment variables, reading files, generating code from schemas, or pulling git commit hashes without any runtime overhead. The macro runs once during bundling and vanishes, leaving only its return value. It's genuinely useful for things like pre-computing build metadata or eliminating dead code branches based on compile-time conditions. The catch is macros only work during `bun build`, not `bun run`, so you're committing to a bundling step. If you're already bundling and want to move work from runtime to build time, this handles the common cases cleanly.
npx skills add https://github.com/secondsky/claude-skills --skill bun-macros