Gemini Code Assist: How to customize a public style guide and apply it to your whole team

Google for DevelopersAbout 2 min readJul 30, 2025Watch original
THE SUMMARYAI-generated

Key Concepts:

  • Gemini Code Assist for GitHub
  • Public Style Guides (e.g., Angular Style Guide)
  • Custom Style Guide Modifications
  • Code Review Automation
  • GitHub Pull Requests (PRs)
  • /geemini command

Using Gemini Code Assist for GitHub with Custom Style Guides

1. The Problem:

  • Teams often adopt public style guides (like the Angular Style Guide) but find some rules impractical.
  • Example: The rule of keeping everything to its own file if it's under 400 lines is sometimes impractical (e.g., small stylesheets).

2. The Solution: Gemini Code Assist

  • Gemini Code Assist for GitHub allows teams to:
    • Consume a public style guide.
    • Make custom modifications to the style guide.
    • Use the combined style guide to automate code reviews for the entire team.
  • It's free and only requires a GitHub account.

3. Step-by-Step Implementation:

  • Step 1: Create a Gemini Folder:
    • In the root of your repository, on the main branch, create a folder named gemini.
  • Step 2: Create the Style Guide File:
    • Inside the gemini folder, create a file named style guide.md (or any text file).
  • Step 3: Link to the Public Style Guide:
    • In the style guide.md file, link to the public style guide you're using (similar to specifying a base image in a Dockerfile).
  • Step 4: Add Custom Rules:
    • Add a section (e.g., "Prioritize these rules above everything else").
    • List all your team's custom modifications in this section.

4. How it Works in Practice:

  • When a Pull Request (PR) is created, Gemini Code Assist automatically:
    • Summarizes the changes.
    • Reviews the changes based on the combined style guide (public + custom).

5. Triggering Reviews and Help:

  • To re-trigger the review process (e.g., on a draft PR or after changes):
    • Use the command /geemini followed by your request.
  • To get a list of available commands:
    • Type /geemini help.

6. Example Scenario:

  • The team wants to allow small stylesheets to be included directly in the template instead of in a separate file.
  • This rule modification is added to the style guide.md file under the "Prioritize these rules" section.
  • Gemini Code Assist will now allow this practice during code reviews.

7. Conclusion:

Gemini Code Assist provides a streamlined way to enforce consistent code style across a team by combining public style guides with custom rules. This automation simplifies code review and ensures adherence to agreed-upon standards.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.