geminiignore-finops – skill Khác cho agent AI
Cấu hình và tối ưu file .geminiignore để tăng hiệu quả context window của AI và giảm chi phí token (FinOps).
Cài skill geminiignore-finops bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/geminiignore-finops-ebb3a.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /geminiignore-finops – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/geminiignore-finops-ebb3a.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $geminiignore-finops – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/geminiignore-finops-ebb3a.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /geminiignore-finops – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/geminiignore-finops-ebb3a.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /geminiignore-finops – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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:
# ==============================================================================
# .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.mapBest Practices
- ✅ Exclude lockfiles selectively from broad context only when the task does not need exact dependency resolution. Security audits, upgrades and reproducible installs require lockfile access; no universal largest-savings claim is established.
- ✅ Keep configurations visible: Ensure manifests like
package.json,composer.json,Cargo.toml, andpyproject.tomlare NEVER ignored, as the AI needs them to understand dependencies. - ✅ Whitelist config examples: Use rules like
!.env.examplealongside.envignores so the AI understands configuration structure without exposing credentials. - ❌ Do not ignore source code: Avoid overly broad folder patterns like
lib/orapp/if they contain primary source code. Be specific (e.g., blockvendor/bundle/but not your actual code).
Review this baseline before applying: bin/ may contain source scripts, *.sql may be migrations, *.svg is text, and project assets may be needed for design work. Ignore rules are context-selection hints, not a security boundary or proof a tool cannot read a secret. Only clients that explicitly support .geminiignore honor it; do not assume Claude/Cursor support or measured savings. Verify exclusions with the actual client, and never use ignore rules to hide mandatory audit evidence.
Limitations
- A
.geminiignorefile only affects AI tools parsing the workspace; it does not replace.gitignorefor 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.
Skill liên quan
- geo-citability – Chấm điểm và tối ưu khả năng được AI trích dẫn (AI citability).
- geo-compare – Theo dõi biến động hằng tháng và báo cáo tiến độ cho khách hàng GEO.
- geo-fundamentals – Generative Engine Optimization cho các công cụ tìm kiếm AI (ChatGPT, Claude, Perplexity).
- geo-keyword-expansion-tool – Công cụ mở rộng từ khóa GEO. Dùng khi làm việc với từ khóa gốc và địa điểm mục tiêu.
- geo-prospect – CRM nhẹ để quản lý khách hàng tiềm năng và khách hàng của agency GEO.
- geoffrey-hinton – Agent mô phỏng Geoffrey Hinton — Cha đẻ của Deep Learning, đoạt Giải Turing 2018, đồng…
- gmb-optimization-helper – Trợ lý tối ưu GMB. Dùng khi làm việc với chi tiết hoặc thông tin doanh nghiệp trên…
- go-in-depth – Bộ khung Go chuyên sâu: tìm kiếm web song song (fan-out), lấy nguồn, kiểm chứng đối…