You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make rails-docs and tailwind-docs derive version dynamically
Hardcoded version claims (Rails 8.0, Tailwind v3) go stale the moment
the project upgrades and nothing flags it. Both skills now instruct
Claude to check Gemfile.lock / repo structure at query time instead,
so they stay correct across future version bumps without edits.
Copy file name to clipboardExpand all lines: .claude/skills/rails-docs/SKILL.md
+31-13Lines changed: 31 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,46 @@
1
1
---
2
2
name: rails-docs
3
-
description: Use when asked about any Rails-specific topic — ActiveRecord, routing, controllers, views, mailers, jobs, Action Cable, Action Text, Active Storage, migrations, validations, callbacks, associations, caching, security, or Rails internals — including "how do I do X in Rails", debugging Rails behavior, or checking whether an API/option still exists or changed in Rails 8. Always consult the official guides and API docs rather than answering from memory alone, since trained knowledge can be stale or wrong about version-specific details, and this project pins Rails 8.0.
3
+
description: Use when asked about any Rails-specific topic — ActiveRecord, routing, controllers, views, mailers, jobs, Action Cable, Action Text, Active Storage, migrations, validations, callbacks, associations, caching, security, or Rails internals — including "how do I do X in Rails", debugging Rails behavior, or checking whether an API/option still exists or changed in a given Rails version. Always consult the official guides and API docs rather than answering from memory alone, since trained knowledge can be stale or wrong about version-specific details.
4
4
---
5
5
6
6
# Rails official documentation lookup
7
7
8
-
This project (HostedGPT) runs Rails 8.0, per the project's `CLAUDE.md`. Trained knowledge about
9
-
Rails APIs can be outdated, mixed across versions, or simply wrong on specifics (option names,
10
-
defaults, deprecations, callback ordering, etc.). Before answering a Rails-specific question or
11
-
relying on a Rails API's exact behavior, check the official docs rather than guessing.
8
+
Trained knowledge about Rails APIs can be outdated, mixed across versions, or simply wrong on
9
+
specifics (option names, defaults, deprecations, callback ordering, etc.). Before answering a
10
+
Rails-specific question or relying on a Rails API's exact behavior, check the official docs
11
+
rather than guessing — pinned to the version this project actually runs, not whatever version
12
+
training data assumed.
13
+
14
+
## Determine the version first
15
+
16
+
Don't assume the Rails version from memory or from prose in `CLAUDE.md` — that can go stale the
17
+
moment someone bumps the gem without updating the docs. Check the source of truth instead:
18
+
19
+
```bash
20
+
grep -m1 '^ rails (' Gemfile.lock
21
+
```
22
+
23
+
That gives you the exact installed version (e.g. `rails (8.0.2.1)`). Use its `<major>.<minor>`
description: Use when asked about Tailwind CSS — utility classes, responsive/state variants, `tailwind.config.js` theme customization, `@apply`, dark mode, or "how do I style X with Tailwind". Always consult the official Tailwind docs rather than answering from memory alone, since utility class names and config syntax have changed between Tailwind v3 and v4, and this project pins Tailwind v3 (via `tailwindcss-rails` gem, config in `config/tailwind.config.js`).
3
+
description: Use when asked about Tailwind CSS — utility classes, responsive/state variants, config/theme customization, `@apply`, dark mode, or "how do I style X with Tailwind". Always consult the official Tailwind docs rather than answering from memory alone, since utility class names and config syntax changed substantially between Tailwind v3 and v4 — check which one this project is actually on before trusting either.
4
4
---
5
5
6
6
# Tailwind CSS documentation lookup
7
7
8
8
This project (HostedGPT) styles its Hotwire-rendered views with Tailwind CSS via the
9
-
`tailwindcss-rails` gem (`~> 2.7`, see `Gemfile`), which bundles **Tailwind CSS v3** — it still
10
-
uses a JS config file at `config/tailwind.config.js`, not Tailwind v4's CSS-first `@theme`
11
-
config. This matters because Tailwind v4 renamed/changed a number of utilities and the config
12
-
approach entirely, so answers pulled from memory can silently mix v3 and v4 syntax.
9
+
`tailwindcss-rails` gem. Tailwind v3 and v4 differ substantially — v3 uses a JS config file
0 commit comments