# Analyze Large Codebases with Gemini CLI

Large repositories are difficult to map quickly with local context alone. This skill guides Claude, Codex, or Claude Code to call Gemini CLI for architecture, pattern, and implementation analysis.

## Install

```bash
npx skillstore add 727474430/use-gemini-for-code-analysis
```

## Metadata

- Status: approved
- Slug: 727474430-use-gemini-for-code-analysis
- Skillstore revision: r1
- Version status: missing
- Tree hash: 19217b729d65e6d9e7660365a53cab0e74e187e39c3a2b50681ca8d72b73551f
- Author: 727474430
- GitHub username: 727474430
- License: MIT
- Repository: https://github.com/727474430/cli-rule-swtich/tree/main/templates/claude/jige/skills/use-gemini-for-code-analysis
- Ref: e9e4712298ed071d92417a41714be123eb8364fa
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/727474430-use-gemini-for-code-analysis
- Manifest: https://skillstore.pages.dev/api/skills/727474430-use-gemini-for-code-analysis/manifest

## Capabilities

- Shows command patterns for running Gemini CLI with all repository files.
- Supports architecture summaries across components, directories, and data flow.
- Supports pattern detection requests across a repository.
- Supports tracing feature implementation across files and integrations.
- Supports prompts for performance, security, and code quality scans.
- Returns Gemini CLI output without additional interpretation.

## Use Cases

- Map an unfamiliar repository: Create a high-level view of directories, components, entry points, and data flow before deeper work.
- Trace a feature implementation: Find the files, integrations, and data paths behind a specific product capability.
- Review architecture and quality: Ask Gemini to scan broad patterns, bottlenecks, security concerns, and design risks across a large codebase.

## Prompt Templates

### Map the repository

```
Use Gemini CLI to map this repository. Return the main directories, components, data flow, and entry points.
```

### Find a pattern

```
Use Gemini CLI to identify where this pattern appears: [pattern]. Include examples, related files, and likely risks.
```

### Trace a feature

```
Use Gemini CLI to trace [feature]. Show the involved files, control flow, data flow, and external integrations.
```

### Assess architecture risks

```
Use Gemini CLI to review architecture risks. Focus on coupling, performance bottlenecks, security concerns, and maintainability tradeoffs.
```

## Limitations

- Requires Gemini CLI to be installed and authenticated in the execution environment.
- May send repository contents to an external AI service when broad file access is used.
- Does not validate or redact sensitive data before analysis.
- Does not interpret Gemini output, so users must review the raw result.

## Best Practices

- Confirm the repository scope and exclude secrets before using whole-codebase analysis.
- Use focused prompts when the question targets one feature or module.
- Review Gemini results before acting on recommendations or sharing them.

## Anti Patterns

- Do not run broad scans on private repositories without permission.
- Do not use confirmation-bypass flags for unclear or write-capable tasks.
- Do not treat raw Gemini output as verified fact without local validation.

## Security Audit

- Audited at: 2026-07-04T17:20:00.71\+00:00
- Summary: The skill is a Gemini CLI wrapper that encourages broad repository scans and includes command examples. Several static hits are Markdown false positives, but the documented use still creates external-command and data exposure risk through --all-files, --yolo, and unfiltered output.

## Stats

- Views: 151
- Downloads: 14
- Favorites: 0
- Popularity score: 0
