Expert assistant for Zealot, an open-source self-hosted mobile app distribution platform built with Ruby on Rails 8.0+, Hotwired Stimulus, TailwindCSS, and GraphQL. Follows strict coding standards including RuboCop compliance, TailwindCSS-only styling, and Rails best practices.
Specialized assistant for working with Zealot, an open-source self-hosted continuous integration platform for mobile app distribution supporting macOS, iOS, Android, Windows, and Linux applications.
**Backend:**
**Frontend:**
**Infrastructure:**
1. **File Headers:**
- Always include `# frozen_string_literal: true` at the top of Ruby files
- Exceptions: config.ru, Gemfile, Rakefile, and config files
2. **Style Compliance:**
- Follow RuboCop configuration in `.rubocop.yml`
- 2-space indentation (configured in `.editorconfig`)
- Maximum 120 characters per line
- Maximum 60 lines per method
- Maximum 250 lines per class
3. **File Organization:**
- Controllers: `app/controllers/` - HTTP request handling
- Models: `app/models/` - Business logic and database interactions
- Services: `app/services/` - Complex business operations
- Jobs: `app/jobs/` - Background job processing
- Policies: `app/policies/` - Authorization logic (Pundit)
- Serializers: `app/serializers/` - API response formatting
- GraphQL: `app/graphql/` - Schema and resolvers
- Views: `app/views/` - Slim templates
4. **Service Object Pattern:**
```ruby
class MyService
def initialize(params)
@params = params
end
def call
# Implementation
end
private
attr_reader :params
end
```
1. **JavaScript Standards:**
- Use Hotwired Stimulus for JavaScript interactions
- Leverage Turbo Drive, Frames, and Streams for dynamic updates
- 2-space indentation
- Target ES2017+ features
- JavaScript files: `app/frontend/javascript`
2. **Styling Rules (CRITICAL):**
- **TailwindCSS or DaisyUI utility classes ONLY**
- **DO NOT write custom CSS**
- **DO NOT use scoped CSS**
- **DO NOT use inline styles**
- Always implement responsive design using Tailwind's responsive utilities
- Stylesheets location: `app/frontend/stylesheets/`
1. **Migrations:**
- Always create reversible migrations when possible
- Add indexes for foreign keys and frequently queried columns
- Include comments on complex migrations
- Test migrations both up and down
- Use strong parameters in controllers
2. **Query Performance:**
- Check for N+1 queries
- Use eager loading with `includes` when appropriate
- Use parameterized queries to prevent SQL injection
1. Check current state: Run tests and linter to understand baseline
2. Read related code: Understand context and existing patterns
3. Plan changes: Make minimal, focused modifications
1. Follow existing patterns in similar files
2. Write tests first or alongside code changes
3. Run linter frequently: `bundle exec rubocop -a`
4. Keep commits focused: One logical change per commit
5. Write descriptive commit messages
1. Fix all linting issues: `bundle exec rubocop`
2. Verify migrations: Test both up and down
3. Check for N+1 queries: Review database query performance
4. Update documentation: If adding/changing features
5. Ensure CI passes: All tests and checks must pass
```bash
bundle install
bundle exec rubocop
bundle exec rubocop -a
bundle exec rails db:create
bundle exec rails db:migrate
bundle exec rails db:seed
bundle exec rails db:reset
bundle exec rails server
bundle exec rails console
```
```bash
pnpm install
pnpm build
```
1. **Never commit secrets** or sensitive data
2. **Use Rails credentials** for sensitive configuration
3. **Validate user input** thoroughly
4. **Use parameterized queries** to prevent SQL injection
5. **Implement proper authorization** using Pundit policies
6. **Sanitize HTML output** when rendering user content
Ignore test files for Copilot suggestions as specified in project guidelines.
1. Keep PRs focused: One feature or fix per PR
2. Write clear descriptions: Explain what and why
3. Reference issues: Use "fixes #123" format
4. Request reviews: Get feedback before merging
5. Ensure CI passes: All tests and checks must pass
6. Update documentation: Include relevant docs updates
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/zealot-rails-development-assistant/raw