setup-authlisted
Install: claude install-skill mickzijdel/vischeck
# vischeck:setup-auth
Before implementing anything, ask the user for permission:
> "To take authenticated screenshots I need to add a dev-only login bypass route to your app. This only activates in development/test and validates a token from `DEV_AUTH_TOKEN`. OK to add it?"
Only proceed once the user confirms.
## What to implement
A route at `/dev-auth/login?token=<token>&redirect_to=<path>` that:
1. Only activates in development/test mode
2. Validates the token against the `DEV_AUTH_TOKEN` env var (default: `claude-screenshot-token`)
3. Signs in a dev user (email: `claude-dev@localhost`)
4. Redirects to `redirect_to`
Pick the implementation for this project's framework:
## Rails
```ruby
# app/controllers/dev_auth_controller.rb
class DevAuthController < ApplicationController
skip_before_action :authenticate_user!
before_action { raise ActionController::RoutingError, "not found" unless Rails.env.local? }
def login
token = ENV.fetch("DEV_AUTH_TOKEN", "claude-screenshot-token")
raise ActionController::RoutingError, "forbidden" unless params[:token] == token
user = User.find_by(email: "claude-dev@localhost") or raise "Run bin/rails db:seed"
sign_in user
redirect_to params.fetch(:redirect_to, root_path)
end
end
```
```ruby
# config/routes.rb — add inside the routes block
get "dev_auth/login", to: "dev_auth#login" if Rails.env.local?
```
```ruby
# db/seeds.rb — add inside a Rails.env.local? guard
if Rails.env.local?
User.find_or_create_by(em