| name | coderabbit |
| description | AI-powered automated code review, PR summarization, and interactive developer feedback / Review kode otomatis berbasis AI, ringkasan PR, dan umpan balik developer interaktif. |
| author | roedy |
CodeRabbit Expert / Pakar CodeRabbit
English | Bahasa Indonesia
English
Description
This skill provides comprehensive guidelines and best practices for integrating, configuring, and maximizing CodeRabbit (an AI-powered code review and pull request summarization tool) within software development workflows.
Instructions
1. Configuration & Setup
2. Pull Request Summarization
- CodeRabbit automatically generates summaries including:
- Overview: A high-level description of what the PR accomplishes.
- Walkthrough: Detailed bullet points explaining the architectural and file-level changes.
- Poem: A creative poem or short summary explaining the change (optional).
- Make sure to review the generated summary to ensure it matches the actual intent of the changes before merging or sharing with the team.
3. Interactive Code Review Chat
- You can converse with CodeRabbit directly on GitHub/GitLab within the PR comments.
- Trigger: Reply to a comment generated by CodeRabbit, or start a new thread tagging
@coderabbitai.
- Use Cases:
- Ask for alternative implementations:
@coderabbitai give me a more performant implementation using map/reduce instead of forEach.
- Ask for bug explanations:
@coderabbitai explain why this state transition might cause a race condition.
- Request unit test generation:
@coderabbitai write unit tests using jest for this newly added utility function.
4. Enhancing Code Reviews with Custom Prompts
- Customize the system instructions for CodeRabbit in
.coderabbit.yaml under reviews.tools or custom prompt sections:
reviews:
tools:
custom_prompts:
- name: security_audit
prompt: "Verify that all user inputs are properly sanitized and parameterized to prevent SQL Injection and XSS."
- name: clean_code
prompt: "Enforce SOLID principles, DRY guidelines, and verify that there are no magic numbers or hardcoded secrets."
5. Best Practices for Developers
- Leverage Inline Suggestions: CodeRabbit provides diff suggestions that can be applied directly in GitHub with a single click ("Commit suggestion").
- Draft PRs: If you don't want CodeRabbit to run on work-in-progress code, keep the PR in "Draft" status (assuming
collapse_draft_pr: true is set).
- Tone & Collaboration: Treat CodeRabbit comments as a friendly peer review. If a comment is a false positive, reply
@coderabbitai this is intentional because... or resolve the conversation.
Trigger Conditions
- Active when the user asks about automated code reviews, PR template generation, setting up CI/CD code quality checks, or configuring CodeRabbit settings.
Bahasa Indonesia
Deskripsi
Skill ini menyediakan panduan komprehensif dan praktik terbaik untuk mengintegrasikan, mengonfigurasi, dan memaksimalkan penggunaan CodeRabbit (alat review kode otomatis berbasis AI dan perangkum pull request) di dalam alur kerja pengembangan perangkat lunak.
Instruksi
1. Konfigurasi & Setup
2. Ringkasan Pull Request (PR Summarization)
- CodeRabbit secara otomatis menghasilkan ringkasan yang meliputi:
- Overview: Deskripsi tingkat tinggi tentang apa yang dicapai oleh PR tersebut.
- Walkthrough: Poin-poin detail yang menjelaskan perubahan arsitektur dan tingkat file.
- Poem: Puisi kreatif atau rangkuman singkat yang menjelaskan perubahan secara unik (opsional).
- Pastikan untuk memeriksa ringkasan yang dihasilkan untuk memastikan kesesuaian dengan maksud perubahan yang sebenarnya sebelum menggabungkan kode (merge).
3. Obrolan Interaktif Review Kode (Interactive Chat)
- Anda dapat berinteraksi langsung dengan CodeRabbit di kolom komentar PR GitHub/GitLab.
- Pemicu: Balas komentar yang dibuat oleh CodeRabbit, atau buat utas baru dengan menyebut
@coderabbitai.
- Contoh Kasus Penggunaan:
- Meminta alternatif implementasi:
@coderabbitai berikan implementasi yang lebih hemat memori menggunakan stream.
- Meminta penjelasan bug:
@coderabbitai jelaskan mengapa transisi state ini berpotensi menyebabkan race condition.
- Meminta pembuatan unit test:
@coderabbitai buatkan unit test menggunakan vitest untuk fungsi utilitas baru ini.
4. Meningkatkan Kualitas Review dengan Prompt Kustom
- Sesuaikan instruksi sistem untuk CodeRabbit dalam
.coderabbit.yaml di bawah bagian reviews.tools atau prompt kustom:
reviews:
tools:
custom_prompts:
- name: audit_keamanan
prompt: "Pastikan semua input pengguna disanitasi dengan benar untuk mencegah celah SQL Injection dan XSS."
- name: kode_bersih
prompt: "Terapkan prinsip SOLID dan DRY, serta pastikan tidak ada data sensitif yang ditulis keras (hardcoded secrets)."
5. Praktik Terbaik untuk Pengembang
- Manfaatkan Inline Suggestions: CodeRabbit menyediakan saran perubahan kode langsung (diff) yang dapat langsung di-commit di GitHub dengan sekali klik ("Commit suggestion").
- Gunakan Draft PR: Jika Anda tidak ingin CodeRabbit melakukan review pada kode yang masih dalam proses pengerjaan, simpan PR dalam status "Draft".
- Interaksi Positif: Perlakukan CodeRabbit seperti rekan tim saat melakukan peer review. Jika komentarnya kurang tepat (false positive), Anda dapat membalas
@coderabbitai ini sengaja dilakukan karena... atau menutup percakapan.
Kondisi Pemicu
- Aktif saat pengguna bertanya tentang review kode otomatis, pembuatan templat PR, integrasi CI/CD untuk kualitas kode, atau cara mengonfigurasi pengaturan CodeRabbit.