andrew-kane-gem-writer

Solid

This skill should be used when writing Ruby gems following Andrew Kane's proven patterns and philosophy. It applies when creating new Ruby gems, refactoring existing gems, designing gem APIs, or when clean, minimal, production-ready Ruby library code is needed. Triggers on requests like "create a gem", "write a Ruby library", "design a gem API", or mentions of Andrew Kane's style.

AI & Automation 448 stars 122 forks Updated today NOASSERTION

Install

View on GitHub

Quality Score: 81/100

Stars 20%
88
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Andrew Kane Gem Writer Write Ruby gems following Andrew Kane's battle-tested patterns from 100+ gems with 374M+ downloads (Searchkick, PgHero, Chartkick, Strong Migrations, Lockbox, Ahoy, Blazer, Groupdate, Neighbor, Blind Index). ## Core Philosophy **Simplicity over cleverness.** Zero or minimal dependencies. Explicit code over metaprogramming. Rails integration without Rails coupling. Every pattern serves production use cases. ## Entry Point Structure Every gem follows this exact pattern in `lib/gemname.rb`: ```ruby # 1. Dependencies (stdlib preferred) require "forwardable" # 2. Internal modules require_relative "gemname/model" require_relative "gemname/version" # 3. Conditional Rails (CRITICAL - never require Rails directly) require_relative "gemname/railtie" if defined?(Rails) # 4. Module with config and errors module GemName class Error < StandardError; end class InvalidConfigError < Error; end class << self attr_accessor :timeout, :logger attr_writer :client end self.timeout = 10 # Defaults set immediately end ``` ## Class Macro DSL Pattern The signature Kane pattern—single method call configures everything: ```ruby # Usage class Product < ApplicationRecord searchkick word_start: [:name] end # Implementation module GemName module Model def gemname(**options) unknown = options.keys - KNOWN_KEYWORDS raise ArgumentError, "unknown keywords: #{unknown.join(", ")}" if unknown.any? mod = Module.new mod.module...

Details

Author
davekilleen
Repository
davekilleen/Dex
Created
6 months ago
Last Updated
today
Language
Python
License
NOASSERTION

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

dhh-rails-style

This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating models, controllers, or any Ruby file. Triggers on Ruby/Rails code generation, refactoring requests, code review, or when the user mentions DHH, 37signals, Basecamp, HEY, or Campfire style. Embodies REST purity, fat models, thin controllers, Current attributes, Hotwire patterns, and the "clarity over cleverness" philosophy.

448 Updated today
davekilleen
AI & Automation Listed

rails-8

Playbook for building full-stack Ruby on Rails 8.1 applications "the Rails way" — vanilla Rails, Hotwire (Turbo + Stimulus), the Solid stack, Propshaft + importmap, RSpec testing, ecosystem gems, OpenAPI docs, AI features, observability, and Kamal 2 deployment. Use this skill whenever the user is creating, extending, debugging, refactoring, testing, upgrading, documenting, or deploying a Rails app — or mentions Ruby on Rails, a Gemfile containing rails, ERB templates, Active Record, migrations, Hotwire, Turbo, Stimulus, Action Mailer, Active Storage, Action Text, Action Cable, Solid Queue, Solid Cache, Kamal, Thruster, RSpec, FactoryBot, simple_form, Tailwind, OpenAPI, Swagger, rswag, ruby_llm, or `bin/rails` commands. Trigger it for indirect phrasings like "my Ruby web app", "add a background job", "make this page update live", "add login to my app", "document my API", or "add AI to my app" when the project is Rails. Also for "how should I structure this in Rails?" questions.

0 Updated today
fmanimashaun
AI & Automation Listed

anti-ai-writing-kit

Write, edit, rewrite, polish, or review professional prose so it does not sound AI-generated. Use for articles, essays, posts, emails, captions, scripts, page copy, social copy, launch copy, or any user-facing text. Open SKILL.md at the exact registered path shown by the runtime, never an inferred .system path; read through EOF, run the active-rule loader, and run the final gate before delivering prose. Also use to load, customize, reset, maintain, or add rules to the Anti-AI Writing Kit, and when a user complains about an AI-writing habit during an active writing session.

4 Updated 1 weeks ago
evelynyaxueke