From topline-code-skills
37signals Rails coding principles and conventions from DHH, Jorge Manrubia, and the Fizzy/Basecamp/HEY codebase. This skill should be used when writing, reviewing, or refactoring Ruby on Rails code following the 37signals philosophy — vanilla Rails, CRUD controllers, rich domain models, concerns, no service objects, Hotwire, Turbo, Stimulus, Solid Queue, Solid Cache, Solid Cable, multi-tenancy, Minitest, custom auth, or DHH conventions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/topline-code-skills:37signals-railsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive coding principles and conventions for Ruby on Rails applications, as practiced at 37signals (Basecamp, HEY, Fizzy). Contains 56 rules across 8 categories, prioritized by architectural impact. Derived from official 37signals sources: the Fizzy codebase, STYLE.md, AGENTS.md, the Rails Doctrine, DHH's "On Writing Software Well" series, and the unofficial 37signals style guide (265 Fi...
assets/templates/_template.mdmetadata.jsonreferences/_sections.mdreferences/arch-avoid-patterns.mdreferences/arch-build-before-gems.mdreferences/arch-custom-auth.mdreferences/arch-domain-facades.mdreferences/arch-earn-abstractions.mdreferences/arch-rich-models.mdreferences/arch-ship-to-learn.mdreferences/arch-single-business-layer.mdreferences/arch-vanilla-rails.mdreferences/ctrl-controller-concerns.mdreferences/ctrl-crud-only.mdreferences/ctrl-model-as-resources.mdreferences/ctrl-nested-resources.mdreferences/ctrl-params-expect.mdreferences/ctrl-thin-controllers.mdreferences/db-backed-everything.mdreferences/db-multi-tenancy.mdComprehensive coding principles and conventions for Ruby on Rails applications, as practiced at 37signals (Basecamp, HEY, Fizzy). Contains 56 rules across 8 categories, prioritized by architectural impact. Derived from official 37signals sources: the Fizzy codebase, STYLE.md, AGENTS.md, the Rails Doctrine, DHH's "On Writing Software Well" series, and the unofficial 37signals style guide (265 Fizzy PRs).
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Architecture Fundamentals | CRITICAL | arch- |
| 2 | Controllers & REST | CRITICAL | ctrl- |
| 3 | Domain Modeling | HIGH | model- |
| 4 | State Management | HIGH | state- |
| 5 | Database & Infrastructure | HIGH | db- |
| 6 | Views & Frontend | MEDIUM | view- |
| 7 | Code Style | MEDIUM | style- |
| 8 | Testing | MEDIUM | test- |
arch-rich-models - Rich Domain Models Over Service Objectsarch-vanilla-rails - Vanilla Rails is Plentyarch-avoid-patterns - Deliberately Avoided Patterns and Gemsarch-earn-abstractions - Earn Abstractions Through Rule of Threearch-build-before-gems - Build It Yourself Before Reaching for Gemsarch-ship-to-learn - Start Simple — Add Complexity Only After Validationarch-domain-facades - Domain Models as Facades Over Internal Complexityarch-single-business-layer - Single Layer for Business Logicarch-custom-auth - Custom Passwordless Auth Over Devisectrl-crud-only - CRUD Controllers Over Custom Actionsctrl-model-as-resources - Model Non-CRUD Operations as Separate Resourcesctrl-thin-controllers - Thin Controllers with Rich Domain Modelsctrl-params-expect - Use params.expect() for Parameter Validationctrl-controller-concerns - Controller Concerns for Cross-Cutting Behaviorctrl-nested-resources - Nested Resources with scope modulemodel-concerns - Concerns for Horizontal Code Sharingmodel-normalizes - Use normalizes Macro for Data Cleaningmodel-store-accessor - Use store_accessor for JSON Column Accessmodel-delegated-type - Use delegated_type for Polymorphismmodel-counter-caches - Counter Caches to Prevent N+1 Count Queriesmodel-touch-chains - Touch Chains for Cache Invalidationmodel-callbacks-auxiliary - Callbacks for Auxiliary Complexitymodel-event-tracking - Polymorphic Event Model for Activity Trackingmodel-poro-namespacing - Namespace POROs Under Parent Modelsstate-records-over-booleans - Records as State Over Boolean Columnsstate-timestamps - Timestamps for State Transitionsstate-enums - Enums for Categorical Statesstate-db-constraints - Database Constraints Over ActiveRecord Validationsstate-write-time - Compute at Write Time Not Read Timedb-backed-everything - Database-Backed Everythingdb-solid-queue - Solid Queue for Background Jobsdb-solid-cable - Solid Cable for Real-Time Pub/Subdb-solid-cache - Solid Cache for Application Cachingdb-multi-tenancy - Path-Based Multi-Tenancy with Current.accountdb-uuid-primary-keys - UUIDs as Primary Keysdb-no-foreign-keys - No Foreign Key Constraintsview-turbo-frames - Turbo Frames for Scoped Page Fragmentsview-turbo-streams - Turbo Streams for Real-Time Updatesview-stimulus-targets - Stimulus Targets Over CSS Selectorsview-stimulus-design - Stimulus Controller Design Principlesview-helpers-not-partials - Extract Logic to Helpers Not Partialsview-progressive-enhancement - Progressive Enhancement as Primary Patternview-fragment-caching - Fragment Caching for View Performanceview-http-caching - HTTP Caching with fresh_when and ETagsstyle-conditionals - Expanded Conditionals Over Guard Clausesstyle-method-ordering - Methods Ordered by Call Sequencestyle-positive-names - Use Positive Names for Methods and Scopesstyle-naming-return-values - Method Names Reflect Return Valuesstyle-visibility-modifiers - Visibility Modifier Formattingstyle-bang-methods - Bang Methods Only When Non-Bang Existsstyle-async-naming - Use _later and _now Suffixes for Async Operationstest-minitest - Minitest Over RSpectest-fixtures - Database Fixtures Over FactoryBottest-no-damage - No Test-Induced Design Damagetest-no-system-tests - Integration Tests Over System Teststest-behavior - Test Behavior Not ImplementationRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub topline-com/code-skills --plugin topline-code-skills