Install
$ agentstack add skill-shoebtamboli-rails-claude-skills-rails-auth-with-devise ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Rails Authentication with Devise
Devise is the most popular authentication solution for Rails, providing a complete MVC solution with 10 modular components.
Quick Setup
# Add to Gemfile
bundle add devise
# Install Devise
rails generate devise:install
# Generate User model with authentication
rails generate devise User
# Run migrations
rails db:migrate
Essential Configuration
After devise:install, configure in config/environments/development.rb:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
Set root route in config/routes.rb:
root to: 'home#index'
Devise Modules Reference
Enable modules in the model (e.g., app/models/user.rb):
| Module | Purpose | Migration Columns | |--------|---------|-------------------| | :database_authenticatable | Password hashing/storage | email, encrypted_password | | :registerable | Sign up, edit, destroy account | - | | :recoverable | Password reset via email | reset_password_token, reset_password_sent_at | | :rememberable | "Remember me" cookie | remember_created_at | | :trackable | Sign in stats | sign_in_count, current_sign_in_at, last_sign_in_at, current_sign_in_ip, last_sign_in_ip | | :validatable | Email/password validations | - | | :confirmable | Email confirmation | confirmation_token, confirmed_at, confirmation_sent_at, unconfirmed_email | | :lockable | Lock after failed attempts | failed_attempts, unlock_token, locked_at | | :timeoutable | Session expiration | - | | :omniauthable | OAuth provider support | - |
Controller Helpers
# Require authentication
before_action :authenticate_user!
# Check if signed in
user_signed_in?
# Get current user
current_user
# Access session
user_session
For other models (e.g., Admin):
before_action :authenticate_admin!
admin_signed_in?
current_admin
admin_session
Common Tasks
Add Custom Fields (e.g., username)
- Generate migration:
rails g migration AddUsernameToUsers username:string:uniq
rails db:migrate
- Permit in
ApplicationController:
class ApplicationController = 3.1.0.
## Testing
### RSpec Setup
In `spec/support/devise.rb`:
```ruby
RSpec.configure do |config|
config.include Devise::Test::ControllerHelpers, type: :controller
config.include Devise::Test::ControllerHelpers, type: :view
config.include Devise::Test::IntegrationHelpers, type: :feature
config.include Devise::Test::IntegrationHelpers, type: :request
end
Usage:
sign_in user
sign_out user
Minitest Setup
class ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
end
Additional Guides
- OmniAuth setup: See [references/omniauth.md](references/omniauth.md)
- API authentication: See [references/api-auth.md](references/api-auth.md)
- Advanced patterns: See [references/advanced.md](references/advanced.md)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Shoebtamboli
- Source: Shoebtamboli/railsclaude_skills
- License: MIT
- Homepage: https://rubygems.org/gems/railsclaudeskills
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.