andrew-kane-gem-writer

Enforce Andrew Kane's minimal dependency and Rails-friendly conventions for Ruby gems.

Updated Nov 11, 2023
One-click install
npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill andrew-kane-gem-writer-michaelvolz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: andrew-kane-gem-writer
Source: https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb/tree/main/.opencode/skills/ce/andrew-kane-gem-writer
Command: npx skills add https://github.com/michaelvolz/redmuffin.Blazor.StaticWeb --skill andrew-kane-gem-writer-michaelvolz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill removes guesswork when creating Ruby gems by prescribing Andrew Kane's clean layout, configuration, and Rails integration guidelines so every library stays minimal, explicit, and production ready.

Core Features & Use Cases

  • Minimal runtime footprint: favor stdlib dependencies, keep gemspecs lean, and manage configuration through class-level accessors without introducing complex objects.
  • Rails-friendly entry points: follow the required load order, guard Rails integrations with ActiveSupport.on_load hooks, and prepend behavior via Railtie or Engine patterns as described in the references.
  • API clarity and testing: implement class macro DSLs, simple error hierarchies, and Minitest-only suites with multi-version gemfiles, while consulting the provided references for module organization, adapters, and testing practices.

Quick Start

Write me a Ruby gem entry point that mirrors Andrew Kane's dependency, configuration, and ActiveSupport on_load 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 Ruby gem with minimal dependencies and explicit configuration?

Structure a Ruby gem with minimal dependencies by favoring stdlib, keeping gemspecs lean, and managing configuration through class-level accessors without introducing complex objects. This enforces a minimal runtime footprint and explicit class-level configuration.

How does ActiveSupport.on_load work for Rails integration in Ruby gems?

ActiveSupport.on_load hooks guard Rails integrations by prepending behavior via Railtie or Engine patterns during the required load order. This ensures your Ruby gem integrates cleanly without blocking framework initialization.

What is the best way to test Ruby gems using Minitest and multi-version gemfiles?

The best way to test Ruby gems using Minitest is implementing Minitest-only suites with multi-version gemfiles. This validates class macro DSLs and simple error hierarchies across multiple dependency versions for production readiness.

Can I use class macro DSLs for API design in a zero-runtime dependency Ruby gem?

Yes, you can use class macro DSLs for API design in a zero-runtime dependency Ruby gem. This approach satisfies explicit class macros and simple error hierarchies while maintaining a minimal stdlib footprint.

When should I not use complex configuration objects when developing Ruby gems?

You should not use complex configuration objects when developing Ruby gems if you want a minimal runtime footprint. Favor stdlib dependencies and manage settings through class-level accessors to keep the library explicit and lean.