Chuyển đến nội dung
Skillpedia
Agent48k · #4711

geminiignore-finops

Skill này làm gì

Trợ lý này tạo và cải thiện một tệp đặc biệt có tên `.geminiignore`. Nó giúp AI tập trung vào những gì quan trọng bằng cách bỏ qua các tệp không cần thiết như mã máy, nhật ký và gói, để tiết kiệm thời gian và tiền bạc.

Khi nào nên dùng

  • ✓Khi bắt đầu một dự án mới với AI.
  • ✓Khi AI mất quá nhiều thời gian hoặc tốn quá nhiều chi phí.
  • ✓Khi AI đọc những thứ mà nó không nên đọc, như tệp cấu hình hoặc tệp hệ thống.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/geminiignore-finops/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/geminiignore-finops/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một tệp `.geminiignore` cho dự án Node.js của tôi để bỏ qua các dependency và tệp build.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Trước hết, nó hiểu dự án của bạn dùng những ngôn ngữ nào. Sau đó, nó thêm các quy tắc vào tệp `.geminiignore` để bỏ qua những tệp AI không cần thấy, như mã được tạo tự động hoặc tệp nhật ký.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết 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.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.

…

Câu hỏi thường gặp

Tệp `.geminiignore` là gì?

Đây là tệp cấu hình cho biết AI nên bỏ qua những tệp và thư mục nào trong dự án, để nó có thể tập trung vào mã quan trọng.

Vì sao cách này tiết kiệm tiền?

AI dùng 'token' để xử lý thông tin. Bỏ qua các tệp lớn, không cần thiết giúp giảm số token dùng, từ đó giảm chi phí.

Có giống `.gitignore` không?

Không. `.gitignore` dành cho Git (hệ thống quản lý phiên bản) để không theo dõi một số tệp. `.geminiignore` dành cho AI để bỏ qua tệp khi phân tích mã của bạn.

Chi tiết

Mô tả gốc của tác giả

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

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4711
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự