{"enrichment":{"faq":[{"a":"design-patterns teaches seven Rust design patterns applied to RTK's CLI filter architecture. It covers type-safe wrappers, configuration builders, stateful parsers, and resource management patterns. Each pattern includes practical examples showing when to use it, when to skip it, and how it fits RTK's single-threaded, zero-overhead design philosophy.","q":"What rust design patterns for CLI tools does design-patterns cover?"},{"a":"design-patterns helps you select appropriate patterns by showing real use cases within RTK's codebase. The skill explains when to apply Newtype for type safety, Builder for complex configuration, State Machine for parsing workflows, and other patterns. It also covers anti-patterns to avoid and over-engineering risks specific to RTK's architecture.","q":"How do I choose the right pattern for a new module or refactoring task?"},{"a":"design-patterns explains that Newtype provides type-safe wrappers without runtime overhead. Use it when you need to distinguish semantically different values of the same underlying type\u2014for example, wrapping a String as a FilterName to prevent accidental mixing with other strings. It's zero-cost and catches errors at compile time.","q":"When should I use the Newtype pattern in Rust?"},{"a":"design-patterns covers Builder pattern for constructing complex objects with many optional fields. It's ideal for CLI filter configuration where you want fluent, readable setup code. The skill shows when Builder adds clarity versus when simpler constructors suffice, helping you avoid over-engineering in RTK's single-threaded context.","q":"What is the builder pattern and when does design-patterns recommend it?"},{"a":"design-patterns demonstrates state machine patterns for stateful parsing workflows common in CLI filters. It shows how to model parser states as enum variants and transitions as method calls, making parsing logic explicit and type-safe. Examples illustrate resource cleanup and error handling within state transitions.","q":"How does design-patterns explain state machine pattern for parsing?"},{"a":"design-patterns covers RAII (Resource Acquisition Is Initialization) for safe resource cleanup in Rust. It explains how Drop traits and scope-based cleanup eliminate manual resource management bugs. The skill shows practical examples of file handles, buffers, and temporary allocations in RTK's filter modules, emphasizing zero-overhead resource safety.","q":"What RAII and resource management patterns does design-patterns teach?"}],"shadow_tags":["type-safety","module-architecture","parser-design","resource-cleanup","dispatch-strategy","configuration-building","cli-patterns","code-refactoring"],"summary_rewrite":"This skill covers seven Rust design patterns applied to RTK's CLI filter architecture, from type-safe wrappers and configuration builders to stateful parsers and resource management. Each pattern includes practical examples showing when to use it, when to skip it, and how it fits RTK's single-threaded, zero-overhead design philosophy."},"files":[{"bytes":7464,"path":".claude/skills/design-patterns/SKILL.md","sha256":"5618acc51803ddc9e894770ad75fc87c6b114ece1918185625dd75cccb2a4e85","url":"https://skillfed.io/files/rtk-ai/rtk/design-patterns/dfa65b7d/SKILL.md"}],"id":"rtk-ai/rtk/design-patterns","links":{"html":"https://skillfed.io/rtk-ai/rtk/design-patterns","md":"https://skillfed.io/rtk-ai/rtk/design-patterns.md","repo":"https://github.com/rtk-ai/rtk"},"meta":{"agents_supported":["claude-code"],"first_seen":"2026-07-28","forks":4597,"language":"Rust","last_updated":"2026-07-27","license":"Apache-2.0","name":"design-patterns","publisher":"rtk-ai","stars":73568},"relations":{"similar":[{"id":"majiayu000/spellbook/rust-best-practices"},{"id":"affaan-m/ECC/rust-patterns"},{"id":"geoffjay/claude-plugins/rust-ui-architecture"},{"id":"personamanagmentlayer/pcl/rust-expert"},{"id":"geoffjay/claude-plugins/tokio-concurrency"},{"id":"softspark/ai-toolkit/rust-patterns"},{"id":"rohitg00/awesome-claude-code-toolkit/rust-systems"},{"id":"actionbook/rust-skills/m09-domain"},{"id":"manutej/luxor-claude-marketplace/rust-systems-programming"},{"id":"joelhooks/joelclaw/rust-sop"}]},"slug":{"owner":"rtk-ai","repo":"rtk","skill":"design-patterns"},"version":"dfa65b7d"}
