Skip to content

Instantly share code, notes, and snippets.

@sdenaro
Created September 11, 2025 00:57
Show Gist options
  • Select an option

  • Save sdenaro/75c1481202ad17c0ca5aff1f354557be to your computer and use it in GitHub Desktop.

Select an option

Save sdenaro/75c1481202ad17c0ca5aff1f354557be to your computer and use it in GitHub Desktop.
gemini custom command to suggest a new file name based on contents. Install under $HOME/.gemini/commands
description="Inspect a file and suggest a new name based on content"
prompt = """
Inspect the contents of this file {{args}} to offer a better file name.
Follow these steps:
Step 1. File inspection.
- Provide a 20 to 40 word summery of the file.
- If the file is an image, provide a description that includes the image setting, notable person or items in the image and if there is any text in the image.
- If the file is not an image, suggest possible categories that the file might fall under, such as receipt or manual or personal document.
Step 2. Change file name.
- Suggest a new name for the file, allowing the new name to be edited.
- The name could be prefixed with a category
- Offer to rename the file.
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment