andrew-kane-gem-writer

Scaffold Ruby gems with Kane-patterned entry points and Rails integration.

102|4|Updated Apr 15, 2009
One-click install
npx skills add https://github.com/mikker/dotfiles --skill andrew-kane-gem-writer-mikker
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: andrew-kane-gem-writer
Source: https://github.com/mikker/dotfiles/tree/main/agents.symlink/skills/andrew-kane-gem-writer
Command: npx skills add https://github.com/mikker/dotfiles --skill andrew-kane-gem-writer-mikker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing Ruby gems can be repetitive and error-prone; this skill provides a Kane-patterned scaffold to standardize gem creation, reduce boilerplate, and promote production-ready structure.

Core Features & Use Cases

  • Entry-point and versioning: Defines a consistent lib/gemname.rb entry point and a minimal version file for reliable releases.
  • Rails integration guidance: Encourages on_load hooks and Rails isolation patterns to avoid heavy coupling.
  • Macro DSL and best practices: Demonstrates a single-method config pattern and explicit, maintainable module composition.
  • Use Case: Ideal for starting a new gem or refactoring an existing gem to align with Kane's philosophy.

Quick Start

Create a new gem following Kane patterns and adapt the entry-point structure to your project.

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 reduce boilerplate and ensure production-ready code?▼

To structure a Ruby gem with reduced boilerplate, use a Kane-patterned scaffold that defines a consistent lib/gemname.rb entry point, a minimal version file, and a single-method config macro DSL for reliable releases and maintainable module composition.

What's the best way to integrate a Ruby gem with Rails without heavy coupling?▼

The best way to integrate a Ruby gem with Rails without heavy coupling is to use Rails isolation patterns and on_load hooks, ensuring the gem loads efficiently only when Rails is present while avoiding tight framework dependencies.

How does a class macro DSL work when writing Ruby gems?▼

A class macro DSL in Ruby gems works by providing a single-method config pattern that allows users to explicitly define and compose module behavior. This approach standardizes configuration, reduces repetitive boilerplate, and maintains explicit, maintainable module composition.

Can I refactor an existing Ruby gem to align with Kane's engineering patterns?▼

Yes, you can refactor an existing Ruby gem to align with Kane's engineering patterns. The skill applies to both creating new gems and refactoring existing ones, helping you adapt the entry-point structure, versioning, and macro DSL to your current project.

Do I need to install Rails dependencies to use a gem built with these patterns?▼

No, you do not need to install Rails dependencies. These Ruby gem patterns encourage minimal dependencies and use Rails isolation patterns with on_load hooks, ensuring the gem works independently while providing optional Rails-friendly integration.