Skip to content

docs: specify .gemini directory for custom commands#24908

Open
LindaLawton wants to merge 1 commit intogoogle-gemini:mainfrom
LindaLawton:main
Open

docs: specify .gemini directory for custom commands#24908
LindaLawton wants to merge 1 commit intogoogle-gemini:mainfrom
LindaLawton:main

Conversation

@LindaLawton
Copy link
Copy Markdown

Summary

Update Step 5 of the custom commands documentation to clarify that the commands directory must reside within a .gemini configuration folder.

Details

Previously, the instructions lacked context regarding the required root path, which could lead to users creating directories in locations where the CLI cannot detect them. Added explicit directory navigation to the code examples for macOS, Linux, and Windows.

Update Step 5 of the custom commands documentation to clarify that the commands directory must reside within a .gemini configuration folder.

Previously, the instructions lacked context regarding the required root path, which could lead to users creating directories in locations where the CLI cannot detect them. Added explicit directory navigation to the code examples for macOS, Linux, and Windows.
@LindaLawton LindaLawton requested review from a team as code owners April 8, 2026 09:12
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the clarity of the custom commands documentation. By explicitly defining the required directory structure, it helps users avoid common configuration issues where the CLI fails to detect custom command definitions.

Highlights

  • Documentation Update: Clarified the required directory structure for custom commands by specifying the need for a .gemini configuration folder.
  • Configuration Path Guidance: Added explicit instructions noting that the .gemini directory can reside in either the project root or the user's home directory.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Apr 8, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation for writing extensions by specifying the location for custom commands. However, the feedback indicates that the added instruction is technically incorrect for extension development; while standalone commands use a '.gemini' directory, commands bundled within an extension must be placed in a 'commands/' directory at the extension root. The reviewer suggested reverting the change to maintain technical accuracy and consistency with the provided code examples.

Note: Security Review has been skipped due to the limited scope of the PR.

## Step 5: Add a custom command

Custom commands create shortcuts for complex prompts.
Custom commands create shortcuts for complex prompts. These must be located within a `.gemini` configuration directory (either in your project root or your home directory).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This instruction is incorrect for extension development. While standalone custom commands (user or project level) are stored within a .gemini directory, commands bundled as part of an extension must be placed in a commands/ directory at the root of the extension. The FileCommandLoader specifically scans [extension-path]/commands, so following this new instruction would result in the commands failing to load. Additionally, this text contradicts the code examples provided in the following steps which do not use the .gemini prefix, violating the requirement for documentation consistency.

Suggested change
Custom commands create shortcuts for complex prompts. These must be located within a `.gemini` configuration directory (either in your project root or your home directory).
Custom commands create shortcuts for complex prompts.
References
  1. Maintain consistency in documentation. When information about a feature is present in multiple documents, ensure all instances are updated or removed together to avoid contradictions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant