geminiignore-finops

Configure and optimize .geminiignore files for AI context window efficiency and token cost reduction (FinOps).

5 stars

Best use case

geminiignore-finops is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Configure and optimize .geminiignore files for AI context window efficiency and token cost reduction (FinOps).

Teams using geminiignore-finops should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/geminiignore-finops/SKILL.md --create-dirs "https://raw.githubusercontent.com/FrancoStino/opencode-skills-collection/main/bundled-skills/geminiignore-finops/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/geminiignore-finops/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How geminiignore-finops Compares

Feature / Agentgeminiignore-finopsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Configure and optimize .geminiignore files for AI context window efficiency and token cost reduction (FinOps).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# GeminiIgnore FinOps Setup & Optimization

## Overview

A skill to construct, refine, and maintain high-performance `.geminiignore` files across diverse tech stacks. By filtering out machine-generated code, heavy logs, package locks, and binary assets, this skill optimizes the AI agent's context window, accelerates processing speed, and reduces token consumption costs (FinOps).

## When to Use This Skill

- Use when initializing a new repository or workspace for pair-programming with AI agents.
- Use when the AI context window is reaching its limits or when billing optimization (FinOps) is a priority.
- Use when the AI agent is accidentally reading build outputs, lock files, databases, or binary media.

## How It Works

### Step 1: Analyze the Workspace Tech Stack
Detect the languages, frameworks, and dependency managers present in the project (e.g., Node.js, Python, PHP, Dart/Flutter, Rust).

### Step 2: Initialize or Update the `.geminiignore` File
Create a `.geminiignore` file at the root of the active workspace. If one already exists, review it to add missing categories.

### Step 3: Implement the 7 Core Rules
Add rules divided into the following categories to filter out unnecessary machine noise while keeping human-written code visible:

1. **System & Editor Noise**: Block OS temp files (`.DS_Store`, `Thumbs.db`) and user-specific IDE caches (`.idea/`, `.vscode/*`, Xcode user data).
2. **Dependency Folders & Lock Files**: Ignore third-party package directories (`node_modules/`, `vendor/`) and giant machine-generated lock files (`package-lock.json`, `yarn.lock`, `Cargo.lock`, `composer.lock`).
3. **Build & Target Output**: Block compiled folders (`dist/`, `build/`, `.next/`, `.nuxt/`).
4. **Caches & Tool Metadata**: Block compiler caches (`.tsbuildinfo`, `.vite/`, `.pytest_cache/`, `.eslintcache`).
5. **Binary & Rich Assets**: Block media types (`*.png`, `*.pdf`, `*.mp4`, `*.woff2`) to prevent triggering expensive vision/multimodal tokens.
6. **Local Databases & Logs**: Block log files (`*.log`) and SQL dumps or local SQLite DBs (`*.sqlite`, `*.db`).
7. **Compiled Binaries & Mobile Builds**: Block mobile package files (`*.apk`, `*.ipa`) and compiled binaries (`*.class`, `*.pyc`, `*.dll`).

### Step 4: Validate Exclusions
Verify that the AI can still see critical configuration blueprints (like `.env.example`, `package.json`, `composer.json`, `pyproject.toml`) but ignores the actual `.env` files and compilation artifacts.

## Examples

### Example 1: Standard Universal `.geminiignore` Template

Here is a recommended baseline configuration for a multi-language project:

```ini
# ==============================================================================
# .geminiignore - BASELINE DE FINOPS E ARQUITETURA
# ==============================================================================

# 1. SISTEMA OPERACIONAL E IDEs
.DS_Store
Thumbs.db
Desktop.ini
$RECYCLE.BIN/
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
.idea/
*.iml
.gradle/
local.properties
.history/

# 2. DEPENDÊNCIAS (ECONOMIA DE TOKENS EM LOCK FILES)
node_modules/
package-lock.json
yarn.lock
pnpm-lock.yaml
vendor/
composer.lock
venv/
.venv/
env/
.env
.env.*
!.env.example
poetry.lock
Cargo.lock
pubspec.lock

# 3. BUILDS E EXPORTAÇÕES
dist/
build/
out/
target/
.next/
.nuxt/
.output/
bin/
obj/

# 4. CACHES DE FRAMEWORKS
.vite/
.parcel-cache/
.eslintcache
.babel-cache/
.tsbuildinfo
.turbo/
.pytest_cache/
.ruff_cache/
storage/framework/
storage/logs/

# 5. ASSETS BINÁRIOS E MULTIMÍDIA EXTREMOS
*.png
*.jpg
*.jpeg
*.gif
*.webp
*.svg
*.ico
*.psd
*.fig
*.pdf
*.zip
*.tar.gz
*.woff
*.woff2
*.ttf

# 6. BANCOS DE DADOS E LOGS
*.log
*.db
*.sqlite
*.sqlite3
*.sql
*.sql.gz

# 7. ARQUIVOS COMPILADOS
*.apk
*.aab
*.ipa
*.jar
*.class
*.pyc
__pycache__/
*.so
*.dylib
*.dll
*.exe
*.js.map
*.css.map
```

## Best Practices

- ✅ **Ignore dependency lock files**: Standard lock files (e.g., `package-lock.json`, `yarn.lock`) contain thousands of lines of redundant package resolution trees. Ignoring them is the single largest FinOps win.
- ✅ **Keep configurations visible**: Ensure manifests like `package.json`, `composer.json`, `Cargo.toml`, and `pyproject.toml` are NEVER ignored, as the AI needs them to understand dependencies.
- ✅ **Whitelist config examples**: Use rules like `!.env.example` alongside `.env` ignores so the AI understands configuration structure without exposing credentials.
- ❌ **Do not ignore source code**: Avoid overly broad folder patterns like `lib/` or `app/` if they contain primary source code. Be specific (e.g., block `vendor/bundle/` but not your actual code).

## Limitations

- A `.geminiignore` file only affects AI tools parsing the workspace; it does not replace `.gitignore` for Git repository hosting.
- Patterns must be formatted correctly according to gitignore-style globbing to avoid accidentally ignoring source files.

## Related Skills

- `@context-optimization` - Broad tactics for context window management.
- `@clean-code` - Architectural practices for clean, human-readable codebases.

Related Skills

zustand-store-ts

5
from FrancoStino/opencode-skills-collection

Create Zustand stores following established patterns with proper TypeScript types and middleware.

zoom-automation

5
from FrancoStino/opencode-skills-collection

Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.

zoho-crm-automation

5
from FrancoStino/opencode-skills-collection

Automate Zoho CRM tasks via Rube MCP (Composio): create/update records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.

zod-validation-expert

5
from FrancoStino/opencode-skills-collection

Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.

zipai-optimizer

5
from FrancoStino/opencode-skills-collection

Ultra-dense token optimizer skill for prompt caching, log pruning, AST-based inspection, and minified JSON payloads.

zeroize-audit

5
from FrancoStino/opencode-skills-collection

Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data.

zendesk-automation

5
from FrancoStino/opencode-skills-collection

Automate Zendesk tasks via Rube MCP (Composio): tickets, users, organizations, replies. Always search tools first for current schemas.

zapier-make-patterns

5
from FrancoStino/opencode-skills-collection

No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.

youtube-summarizer

5
from FrancoStino/opencode-skills-collection

Extract transcripts from YouTube videos and generate comprehensive, detailed summaries using intelligent analysis frameworks

youtube-full

5
from FrancoStino/opencode-skills-collection

Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.

youtube-automation

5
from FrancoStino/opencode-skills-collection

Automate YouTube tasks via Rube MCP (Composio): upload videos, manage playlists, search content, get analytics, and handle comments. Always search tools first for current schemas.

yield-intelligence

5
from FrancoStino/opencode-skills-collection

Passive income portfolio analysis — activate when user asks about dividend yields, Treasury rates, REIT income, monthly passive income goals, or portfolio yield optimization. Scans 4 asset classes, ranks by risk-adjusted return, and builds allocations targeting a specific monthly income.