Install any skill in seconds. Free to start, no credit card required.
Get Started Free →davekilleen/andrew-kane-gem-writer
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.
Passed 21 of 22 test cases with the skill, and 16 of 22 without it.
and 3 more in the full report
5 fixed16 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
In my gem `vault_client`, I need a `master_key` setting that defaults to the `VAULT_MASTER_KEY` environment variable if not explicitly assigned. How should this reader method and writer be defined on the `VaultClient` module?
| Checked | Without skill | With skill |
|---|---|---|
| The getter method uses memoized environment variable lookup via ENV | Missed | Passed |
The instructions your model reads when the skill loads.
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).
Simplicity over cleverness. Zero or minimal dependencies. Explicit code over metaprogramming. Rails integration without Rails coupling. Every pattern serves production use cases.
Every gem follows this exact pattern in lib/gemname.rb:
# 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
The signature Kane pattern—single method call configures everything:
test cases passed, vs 16 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.