andrew-kane-gem-writer

Create Ruby gems following Andrew Kane's patterns and philosophy.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write high-quality, production-ready Ruby gems by adhering to Andrew Kane's proven patterns and philosophy, ensuring simplicity, minimal dependencies, and robust Rails integration.

Core Features & Use Cases

  • Pattern Enforcement: Guides users on structuring gems, implementing class macro DSLs, and handling Rails integration correctly.
  • Best Practices: Avoids common anti-patterns like method_missing and direct Rails gem requirements.
  • Use Case: When starting a new Ruby gem for a specific utility, use this Skill to ensure it follows established best practices for maintainability and performance.

Quick Start

Use the andrew-kane-gem-writer skill to create a new Ruby gem following Andrew Kane's patterns.

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 new Ruby gem for production readiness?

Structure a Ruby gem for production by enforcing simplicity, minimizing dependencies, writing explicit code, and avoiding anti-patterns like `method_missing` to ensure long-term maintainability and robust performance.

What is the correct way to handle Rails integration in a Ruby gem?

Handle Rails integration in a Ruby gem by using `ActiveSupport.on_load` hooks instead of directly requiring the Rails gem, keeping your library decoupled and lightweight while ensuring proper load order initialization.

How do I design a class macro DSL for a Ruby gem?

Design a class macro DSL for a Ruby gem by applying established patterns that prioritize explicit code and simplicity, ensuring the API remains intuitive, maintainable, and avoids complex metaprogramming anti-patterns.

Why should I avoid method_missing when writing a Ruby gem?

Avoid `method_missing` when writing a Ruby gem because it obscures method visibility, complicates debugging, and slows down method dispatch, directly contradicting the explicit code philosophy needed for production readiness.

Can I refactor an existing Ruby library to follow better API design patterns?

Refactor an existing Ruby library to improve API design by applying principles of simplicity, removing unnecessary dependencies, writing explicit code, and implementing correct Rails integration via `ActiveSupport.on_load` for better production readiness.