andrew-kane-gem-writer

Generate Kane-pattern Ruby gem templates with macro DSL configuration.

3|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/roach88/compound-engineering --skill andrew-kane-gem-writer-roach88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: andrew-kane-gem-writer
Source: https://github.com/roach88/compound-engineering/tree/main/skills/andrew-kane-gem-writer
Command: npx skills add https://github.com/roach88/compound-engineering --skill andrew-kane-gem-writer-roach88

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solves the problem of inconsistent gem creation by providing Kane-pattern Ruby gem templates, guiding teams toward production-ready libraries.

Core Features & Use Cases

  • Provides a repeatable gem skeleton and modular structure (lib/gemname.rb, gemname/version, railtie/engine stubs) aligned with Kane's patterns.
  • Enforces a minimal, explicit dependency approach and Rails integration via ActiveSupport.on_load to avoid direct Rails requires.
  • Use cases include starting new gems, refactoring existing gems, and designing clean, production-ready APIs.

Quick Start

Create a new gem by following the standard Kane pattern, starting with the lib/gemname.rb and version files, and applying the macro DSL.

Frequently Asked Questions about andrew-kane-gem-writer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Ruby gem to avoid hard Rails dependencies?

Structure a Ruby gem using ActiveSupport.on_load for Rails integration to avoid hard dependencies, ensuring the gem loads cleanly without directly requiring Rails. This pattern includes entry-point files and version tracking.

What is the best way to create a production-ready Ruby gem skeleton?

Create a production-ready Ruby gem using a repeatable template with modular structure, including lib/gemname.rb, version files, and railtie stubs. This enforces minimal explicit dependencies and clean API design.

How does a macro DSL help configure Ruby gems?

A macro DSL configures Ruby gems by providing a clean, explicit syntax for setting options. This ensures consistent configuration across projects and enforces a minimal dependency approach during gem creation.

Can I use this gem pattern to refactor existing Ruby libraries?

Yes, you can refactor existing Ruby libraries by applying these patterns to align them with production-ready standards. This involves restructuring entry points, applying the macro DSL, and decoupling Rails dependencies.

Why should I use ActiveSupport on_load instead of directly requiring Rails?

Use ActiveSupport on_load instead of directly requiring Rails to prevent hard dependencies. This allows your gem to function independently of Rails while still integrating seamlessly when Rails is present.