Chuyển đến nội dung
Skillpedia
Lập trình chung33k · #8561

gemini

Skill này làm gì

Skill này chạy công cụ dòng lệnh Gemini để review code, kế hoạch hoặc nhiều tệp lớn. Dành cho lập trình viên muốn có một mô hình thứ hai xem lại công việc, hoặc phân tích những đầu vào quá lớn cho một cuộc trò chuyện thông thường.

Khi nào nên dùng

  • ✓Khi ai đó yêu cầu review code trên nhiều tệp bằng Gemini.
  • ✓Khi một kế hoạch kiến trúc hoặc đặc tả cần được một mô hình thứ hai xem lại.
  • ✓Khi tác vụ có hơn 200.000 token ngữ cảnh, chẳng hạn cả một bộ tài liệu.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/gemini/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/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/gemini/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

“Hãy dùng Gemini để review các thay đổi trong những tệp này và chỉ ra mọi logic có rủi ro.”

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

Cách hoạt động

Skill sẽ hỏi bạn muốn dùng mô hình Gemini nào, rồi chạy công cụ dòng lệnh trên các tệp hoặc prompt đã chọn. Skill cảnh báo rằng các lời nhắc phê duyệt tương tác có thể làm treo các lần chạy nền, nên lần chạy tự động cần cài đặt không tương tác hoặc đặt thời gian chờ.

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.

Gemini Skill Guide

When to Use Gemini

  • WHEN ASKED TO BE ACTIVATED
  • Code Review: Comprehensive code reviews across multiple files
  • Plan Review: Analyzing architectural plans, technical specifications, or project roadmaps
  • Big Context Processing: Tasks requiring >200k tokens of context (entire codebases, documentation sets)
  • Multi-file Analysis: Understanding relationships and patterns across many files

⚠️ Critical: Background/Non-Interactive Mode Warning

NEVER use --approval-mode default in background or non-interactive shells (like Claude Code tool calls). It will hang indefinitely waiting for approval prompts that cannot be provided.

For automated/background reviews:

  • ✅ Use --approval-mode yolo for fully automated execution
  • ✅ OR wrap with timeout: timeout 300 gemini ...
  • ❌ NEVER use --approval-mode default without interactive terminal

Symptoms of hung Gemini:

  • Process running 20+ minutes with 0% CPU usage
  • No network activity
  • Process state shows 'S' (sleeping)

Fix hung process:

# Check if hung
ps aux | grep gemini | grep -v grep

# Kill if necessary
pkill -9 -f "gemini.*gemini-3-pro-preview"

Running a Task

  1. Ask the user (via AskUserQuestion) which model to use in a single prompt. Available models:

    • gemini-3-pro-preview ⭐ (flagship model, best for coding & complex reasoning, 35% better at software engineering than 2.5 Pro)
    • gemini-3-flash (sub-second latency, distilled from 3 Pro, best for speed-critical tasks)
    • gemini-2.5-pro (legacy option, strong all-around performance)
    • gemini-2.5-flash (legacy option, cost-efficient with thinking capabilities)
    • gemini-2.5-flash-lite (legacy option, fastest processing)
  2. Select the approval mode based on the task:

    • default: Prompt for approval (⚠️ ONLY for interactive terminal sessions)
    • auto_edit: Auto-approve edit tools only (for code reviews with suggestions)
    • yolo: Auto-approve all tools (✅ REQUIRED for background/automated tasks)
  3. Assemble the command with appropriate options:

    • -m, --model <MODEL> - Model selection
    • --approval-mode <default|auto_edit|yolo> - Control tool approval
    • -y, --yolo - Alternative to --approval-mode yolo
    • -i, --prompt-interactive "prompt" - Execute prompt and continue interactively
    • --include-directories <DIR> - Additional directories to include in workspace
    • -s, --sandbox - Run in sandbox mode for isolation
  4. For background/automated tasks, ALWAYS use --approval-mode yolo or add timeout wrapper. NEVER use default in non-interactive shells.

  5. Run the command and capture the output. For background/automated mode:

    # Recommended: Use yolo for background tasks
    gemini -m gemini-3-pro-preview --approval-mode yolo "Review this codebase for security issues"
    
    # Or with timeout (5 min limit)
    timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo "Review this codebase"
    
  6. For interactive sessions with an initial prompt:

    gemini -m gemini-3-pro-preview -i "Review the authentication system" --approval-mode auto_edit
    
  7. After Gemini completes, inform the user: "The Gemini analysis is complete. You can start a new Gemini session for follow-up analysis or continue exploring the findings."

Quick Reference

Use case Approval mode Key flags
Background code review yolo ✅ -m gemini-3-pro-preview --approval-mode yolo
Background analysis yolo ✅ -m gemini-3-pro-preview --approval-mode yolo
Background with timeout yolo ✅ timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo
Interactive code review default -m gemini-3-pro-preview --approval-mode default (interactive terminal only)
Code review with auto-edits auto_edit -m gemini-3-pro-preview --approval-mode auto_edit
Automated refactoring yolo -m gemini-3-pro-preview --approval-mode yolo
Speed-critical background yolo ✅ -m gemini-3-flash --approval-mode yolo
Cost-optimized background yolo ✅ -m gemini-2.5-flash --approval-mode yolo
Multi-directory analysis yolo (if background) --include-directories <DIR1> --include-directories <DIR2>
Interactive with prompt auto_edit or default -i "prompt" --approval-mode <mode>

Model Selection Guide

| Model | Best for | Context window | Key features | | --- | --- | ---

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

Vì sao một lần chạy có thể bị treo?

Skill cảnh báo rằng chế độ phê duyệt mặc định chờ người dùng nhập, nên các lần chạy nền có thể dừng lại nếu không có thời gian chờ hoặc cài đặt tự động phê duyệt.

Ngữ cảnh lớn dùng để làm gì?

Dùng để phân tích các đầu vào rất lớn, như toàn bộ codebase hoặc nhiều tài liệu.

Có cần cài sẵn Gemini CLI không?

Có. Skill chạy công cụ dòng lệnh Gemini, và công cụ này phải được thiết lập trước.

Chi tiết

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

Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8561
Giấy phép
MIT
Cập nhật
2/11/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ự