safe-agentic-workflow: Command for Gemini CLI

.gemini/commands/media/organize-files.toml

organize-files is a command for Gemini CLI from bybren-llc/safe-agentic-workflow. It costs 0 tokens per session (890 once invoked), scanned A, original, MIT.

A file-organization command that examines files by their actual content, including images, PDFs, documents, audio, code, and data. It can rename files and place them in meaningful folders.

In plain words
What is it for?
Use it to sort mixed directories, rename files from their contents, add dates to image names, and find possible duplicates.
Why use it?
It helps clean up folders where filenames and extensions do not clearly show what each file contains.

Command for Gemini CLI

Written for Gemini CLI: installed under .gemini/.

This is bybren-llc/safe-agentic-workflow's own configuration. It tells Gemini CLI how to work on safe-agentic-workflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything safe-agentic-workflow configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bybren-llc/safe-agentic-workflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bybren-llc/safe-agentic-workflow/main/.gemini/commands/media/organize-files.toml
Clone the repo
git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow

Made for: Gemini CLI.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for organize-files

README.md
[![agentmods](https://agentmods.dev/badge/commands/bybren-llc/safe-agentic-workflow/organize-files.svg)](https://agentmods.dev/commands/bybren-llc/safe-agentic-workflow/organize-files)
Your own site
<a href="https://agentmods.dev/commands/bybren-llc/safe-agentic-workflow/organize-files"><img src="https://agentmods.dev/badge/commands/bybren-llc/safe-agentic-workflow/organize-files.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00890
Opus 5 $0.00000 $0.00445
Sonnet 5 $0.00000 $0.00178
Haiku 4.5 $0.00000 $0.00089

Measured 5d ago against content hash b40167ec2963, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

organize-files scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.gemini/commands/media/organize-files.toml · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

description = "Organize and rename files based on content analysis"

prompt = """

Organize Files Command

Intelligently organize files using Gemini's multimodal analysis to understand content, not just extensions.

Target Directory: {{args}}

Capabilities

  • Analyze file contents (images, PDFs, documents)
  • Rename based on actual content
  • Organize into semantic folders
  • Add EXIF dates to image filenames
  • Detect duplicates by content similarity

Workflow

1. Scan Directory

!{find {{args}} -type f -not -path "*/.*" 2>/dev/null | head -50}

Get file statistics:

!{find {{args}} -type f -not -path "*/.*" 2>/dev/null | wc -l}

2. Analyze File Types

Categorize files by type:

Category Extensions Analysis Method
Images png, jpg, gif, webp Visual content analysis
Documents pdf, doc, docx Text extraction
Audio mp3, wav, aac Metadata/transcription
Code js, ts, py, etc. Purpose detection
Data json, csv, xml Schema analysis

3. Content-Based Organization

For Images:

  • Screenshots → screenshots/
  • Photos (with faces) → photos/people/
  • Product images → photos/products/
  • Diagrams → diagrams/
  • Icons → icons/

For Documents:

  • Invoices → documents/invoices/
  • Contracts → documents/contracts/
  • Reports → documents/reports/
  • Receipts → documents/receipts/

For Code:

  • Components → by framework/purpose
  • Tests → tests/
  • Utilities → utils/

4. Smart Renaming

Apply naming conventions:

Images with EXIF:

IMG_1234.jpg → 2025-01-14_vacation_beach_sunset.jpg

Documents:

Document1.pdf → 2025-01-14_invoice_acme_corp_1234.pdf

Screenshots:

Screenshot 2025-01-14.png → screenshot_vscode_debug_panel.png

5. Generate Organization Plan

Before making changes, show plan:

## File Organization Plan

### Will Create Folders:
- photos/
- documents/invoices/
- screenshots/

### Will Rename:
| Original | New Name | Reason |
|----------|----------|--------|
| IMG_1234.jpg | 2025-01-14_beach.jpg | EXIF date + content |
| doc.pdf | invoice_acme_123.pdf | Invoice detected |

### Will Move:
| File | From | To |
|------|------|-----|
| screenshot.png | ./ | screenshots/ |

Proceed? (y/n)

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 147 lines · 0 tokens per session scan A b40167ec2963

Subscribe to this mod's changes

organize-files is a command published in the GitHub repository bybren-llc/safe-agentic-workflow (406 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 890 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.