mastering-gemini-cli
Build headless automation and agentic workflows with Google's Gemini CLI. Covers approval modes (default, auto_edit, yolo), file permission model, Edit vs WriteFile tool selection, smartEdit configuration, GEMINI.md context files, settings.json hierarchy, and MCP server integration. Use when building CI/CD pipelines with Gemini, debugging "0 occurrences found" edit failures, configuring --approval-mode for automation, creating long-running agents with --resume, or integrating external services via Model Context Protocol.
npx skills add majiayu000/claude-skill-registry --skill gemini-cli-headless-alchimie-di-circe-extractor-desktop-ap --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Gemini CLI Agentic Systems Build headless automation with Google's Gemini CLI. > **Compatibility:** Gemini CLI 1.x. Features may differ in future versions. ## Quick Start ```bash # Basic headless invocation gemini -p "Refactor auth.js to use async/await" --approval-mode auto_edit # Pipe input for context git diff --staged | gemini -p "Generate semantic commit message" # JSON output for scripts gemini -p "List TODOs in src/" --output-format json --include-directories src ``` ## Headless Checklist Before any automation task: ``` - [ ] Set --approval-mode (auto_edit or yolo) - [ ] Enable smartEdit in .gemini/settings.json - [ ] Scope file access with --include-directories - [ ] Choose output format (json for parsing) - [ ] Add --resume for multi-step workflows ``` ## Approval Mode Decision | Mode | Command | File Ops | Shell Cmds | Use When | |------|---------|----------|------------|----------| | default | (none) | ❌ Prompts | ❌ Prompts | Interactive only | | auto_edit | `--approval-mode auto_edit` | ✅ Auto | ❌ Prompts | Code refactoring | | yolo | `--approval-mode yolo` | ✅ Auto | ✅ Auto | Sandboxed CI/CD | **Rule:** Never use `yolo` outside containers or ephemeral environments. #
- Quick Start
- Headless Checklist
- Approval Mode Decision
- Least Privilege Pattern
- Tool Selection
- Edit Tool Reliability
- File Access Model
- Expanding Visibility
- Context Configuration
- GEMINI.md (Agent Instructions)
- settings.json Hierarchy
- Session Persistence
- Output Formats
- Parsing JSON Output
Basic headless invocation gemini -p "Refactor auth.js to use async/await" --approval-mode auto_edit Pipe input for context git diff --staged | gemini -p "Generate semantic commit message" JSON output for scripts gemini -p "List TODOs in src/" --output-format json --include-directories src Documentation agent: read + write only, no shell gemini -p "Update README from source" \ Analysis agent: read only gemini -p "Find security issues in src/" \
What does the mastering-gemini-cli skill do?
Build headless automation and agentic workflows with Google's Gemini CLI. Covers approval modes (default, auto_edit, yolo), file permission model, Edit vs WriteFile tool selection, smartEdit configuration, GEMINI.md context files, settings.json hierarchy, and MCP server integration. Use when building CI/CD pipelines with Gemini, debugging "0 occurrences found" edit failures, configuring --approval-mode for automation, creating long-running agents with --resume, or integrating external services via Model Context Protocol.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill gemini-cli-headless-alchimie-di-circe-extractor-desktop-ap --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
