gemini-cli

metrovoc 的头像作者 metrovoc

"处理图像、PDF、大文件,需要1M+令牌上下文,或需要Gemini的强大推理和细粒度领域知识时,使用Gemini CLI。"

📖 中文导读:"处理图像、PDF、大文件,需要1M+令牌上下文,或需要Gemini的强大推理和细粒度领域知识时,使用Gemini CLI。" 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: gemini-cli description: "Use Gemini CLI when processing images, PDFs, large files, needing 1M+ token context, or requiring Gemini's strong reasoning and fine-grained domain knowledge. allowed-tools: Bash, Read

Gemini CLI

Note:

  • Gemini's knowledge cutoff means it may struggle with very recent events or factual details. For latest information, prefer web search.

  • Always set max timeout limit because it can take quite long time for responses. If it still times out, use exponential backoff when waiting(sleep) for bash output.

  • If gemini returns empty response, try explicitly ask it to continue in the same session.

New Conversation (clears context and creates new session)

Use this tool only when to start a new conversation. Never use it if you want to continue conversation.

gemini "$(cat << 'EOF'
hello
EOF
)"

Continue conversation (primary tool)

gemini -r latest -p "$(cat << 'EOF'
follow up
EOF
)"

List sessions

Use it to check session uuid for continue from session.

gemini --list-sessions

Continue from session

Use to continue conversation.

gemini -r {uuid} -p "$(cat << 'EOF'
follow up
EOF
)"

File Reference

gemini "$(cat << 'EOF'
@file.ts explain this code
EOF
)"