Back to skills
SKILL.md
2830 Gemini Invocation 8f204a18
ASecurity- Model: `gemini-3-pro-preview` - Extensions: `code-review`, `gemini-cli-security`
- 9 stars
- 0 votes
- 0 copies
- 0 views
- Added October 11, 2026
Works with
Security analysis
92/100- Installs packages at runtime which could introduce malicious dependencies
npx -y skills add tools-only/X-Skills --skill 2830-gemini-invocation_8f204a18 --agent claude-codeAre you the author of 2830 Gemini Invocation 8f204a18?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tools-only-2830-gemini-invocation-8f204a18)# Gemini CLI Invocation
## Default Configuration
- Model: `gemini-3-pro-preview`
- Extensions: `code-review`, `gemini-cli-security`
## Key Flags
| Flag | Purpose |
|------|---------|
| `-p <prompt>` | Non-interactive (headless) mode |
| `--yolo` / `-y` | Auto-approve all tool calls |
| `-m <model>` | Model selection |
| `-e <ext>` | Load specific extension(s) |
## Scope-to-Diff Mapping
Gemini does not have built-in scope flags like Codex. Map the
user's scope choice to the correct `git diff` command:
| Scope | Diff command |
|-------|-------------|
| Uncommitted | `git diff HEAD` (captures both staged and unstaged) |
| Branch diff | `git diff <branch>...HEAD` |
| Specific commit | `git diff <sha>~1..<sha>` |
**Important:** For uncommitted scope, use `git diff HEAD` not
bare `git diff`. Bare `git diff` misses staged changes.
## Code Review (General, Performance, Error Handling)
For uncommitted changes, the `/code-review` extension
automatically picks up the working tree diff:
```bash
gemini -p "/code-review" \
--yolo \
-e code-review \
-m gemini-3-pro-preview
```
For branch diffs or specific commits, pipe the diff into a
heredoc-based prompt to avoid shell expansion issues:
```bash
git diff <branch>...HEAD > /tmp/review-diff.txt
cat <<'PROMPT' | gemini -p - \
-m gemini-3-pro-preview \
--yolo
Review this diff for code quality issues. <focus prompt>
$(cat /tmp/review-diff.txt)
PROMPT
```
## Security Review
The `/security:analyze` extension is interactive-only, so use
headless mode with a security-focused prompt instead:
```bash
git diff HEAD > /tmp/review-diff.txt
cat <<'PROMPT' | gemini -p - \
-e gemini-cli-security \
-m gemini-3-pro-preview \
--yolo
Analyze this diff for security vulnerabilities, including
injection, auth bypass, data exposure, and input validation
issues. Report each finding with severity, location, and
remediation.
$(cat /tmp/review-diff.txt)
PROMPT
```
When security focus is selected, also run dependency scanning:
```bash
gemini -p "/security:scan-deps" \
--yolo \
-e gemini-cli-security \
-m gemini-3-pro-preview
```
## Adding Project Context
If project context was requested, prepend it to the prompt:
```bash
git diff HEAD > /tmp/review-diff.txt
cat <<'PROMPT' | gemini -p - \
-m gemini-3-pro-preview \
--yolo
Project conventions:
---
<CLAUDE.md or AGENTS.md contents>
---
<review instructions and focus>
$(cat /tmp/review-diff.txt)
PROMPT
```
## Error Handling
| Error | Action |
|-------|--------|
| `gemini: command not found` | Tell user: `npm i -g @google/gemini-cli` |
| Extension missing | Tell user: `gemini extensions install <github-url>` |
| `-e security` silently ignored | Use `-e gemini-cli-security` (the actual installed name) |
| Timeout | Inform user, suggest scoping down the diff |
## Extension Install Commands
```bash
gemini extensions install https://github.com/gemini-cli-extensions/code-review
gemini extensions install https://github.com/gemini-cli-extensions/security
```
Note: The security extension installs as `gemini-cli-security`
(not `security`). Always use `-e gemini-cli-security` when
loading it.
Attribution
Comments
Loading comments…