use-gemini-for-code-analysis

【大型代码库分析专用】当需要分析整个项目架构、识别代码模式、追踪功能实现、梳理模块关系时必须使用本技能。触发关键词:分析整个项目/代码库、架构梳理、模块划分、代码模式识别、功能追踪、全局扫描。本技能通过 Gemini CLI 快速扫描完整代码库,提供 AI 驱动的架构洞察和代码分析,大幅节省手动探索时间。仅返回原始分析结果,不做二次解读。

242 stars

Best use case

use-gemini-for-code-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. 【大型代码库分析专用】当需要分析整个项目架构、识别代码模式、追踪功能实现、梳理模块关系时必须使用本技能。触发关键词:分析整个项目/代码库、架构梳理、模块划分、代码模式识别、功能追踪、全局扫描。本技能通过 Gemini CLI 快速扫描完整代码库,提供 AI 驱动的架构洞察和代码分析,大幅节省手动探索时间。仅返回原始分析结果,不做二次解读。

【大型代码库分析专用】当需要分析整个项目架构、识别代码模式、追踪功能实现、梳理模块关系时必须使用本技能。触发关键词:分析整个项目/代码库、架构梳理、模块划分、代码模式识别、功能追踪、全局扫描。本技能通过 Gemini CLI 快速扫描完整代码库,提供 AI 驱动的架构洞察和代码分析,大幅节省手动探索时间。仅返回原始分析结果,不做二次解读。

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "use-gemini-for-code-analysis" skill to help with this workflow task. Context: 【大型代码库分析专用】当需要分析整个项目架构、识别代码模式、追踪功能实现、梳理模块关系时必须使用本技能。触发关键词:分析整个项目/代码库、架构梳理、模块划分、代码模式识别、功能追踪、全局扫描。本技能通过 Gemini CLI 快速扫描完整代码库,提供 AI 驱动的架构洞察和代码分析,大幅节省手动探索时间。仅返回原始分析结果,不做二次解读。

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/use-gemini-for-code-analysis/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/727474430/use-gemini-for-code-analysis/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/use-gemini-for-code-analysis/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How use-gemini-for-code-analysis Compares

Feature / Agentuse-gemini-for-code-analysisStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

【大型代码库分析专用】当需要分析整个项目架构、识别代码模式、追踪功能实现、梳理模块关系时必须使用本技能。触发关键词:分析整个项目/代码库、架构梳理、模块划分、代码模式识别、功能追踪、全局扫描。本技能通过 Gemini CLI 快速扫描完整代码库,提供 AI 驱动的架构洞察和代码分析,大幅节省手动探索时间。仅返回原始分析结果,不做二次解读。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Gemini CLI 代码库分析技能

本技能提供基于 Gemini CLI 的大型代码库 AI 分析能力,负责调用 Gemini CLI 工具执行大型代码库分析任务。

## 核心功能

**作为 CLI 包装器调用 Gemini,返回原始分析结果。**

## 执行流程

### 1. 理解分析请求

- 确认需要分析的模式、架构或代码特征
- 确定分析范围和目标

### 2. 构造 Gemini 命令

- 使用 `--all-files` 进行全代码库分析
- 用 `-p` 参数编写清晰的分析提示词
- 考虑使用 `--yolo` 跳过确认(仅限非破坏性任务)

### 3. 执行命令

- 使用 Bash 工具运行 Gemini CLI
- 等待分析完成

### 4. 返回原始结果

- 将 Gemini 的输出直接返回,不做修改
- 不要自己解读或分析结果

## 常用命令模式

### 模式检测

```bash
gemini --all-files -p "分析此代码库,识别所有 [特定模式]。展示使用示例和潜在问题。"
```

### 架构分析

```bash
gemini --all-files -p "分析应用整体架构。识别主要组件、数据流、目录结构和关键设计决策。"
```

### 功能追踪

```bash
gemini --all-files -p "追踪 [特定功能] 的完整实现。展示涉及的所有文件、数据流和集成点。"
```

### 代码质量

```bash
gemini --all-files -p "扫描潜在的性能瓶颈、安全漏洞或代码异味。"
```

## 执行准则

- 本技能作为 CLI 包装器,不是分析师
- 始终返回完整、未经过滤的结果
- 让调用者(主 agent 或用户)处理结果解读
- 专注于高效的命令构造和执行
- 所有提示词使用中文,除非用户另有要求

Related Skills

log-analysis

242
from aiskillstore/marketplace

Analyze application logs to identify errors, performance issues, and security anomalies. Use when debugging issues, monitoring system health, or investigating incidents. Handles various log formats including Apache, Nginx, application logs, and JSON logs.

gemini

242
from aiskillstore/marketplace

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.

wireshark-network-traffic-analysis

242
from aiskillstore/marketplace

This skill should be used when the user asks to "analyze network traffic with Wireshark", "capture packets for troubleshooting", "filter PCAP files", "follow TCP/UDP streams", "detect network anomalies", "investigate suspicious traffic", or "perform protocol analysis". It provides comprehensive techniques for network packet capture, filtering, and analysis using Wireshark.

wireshark-analysis

242
from aiskillstore/marketplace

This skill should be used when the user asks to "analyze network traffic with Wireshark", "capture packets for troubleshooting", "filter PCAP files", "follow TCP/UDP streams", "dete...

team-composition-analysis

242
from aiskillstore/marketplace

This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.

stride-analysis-patterns

242
from aiskillstore/marketplace

Apply STRIDE methodology to systematically identify threats. Use when analyzing system security, conducting threat modeling sessions, or creating security documentation.

nerdzao-elite-gemini-high

242
from aiskillstore/marketplace

Modo Elite Coder + UX Pixel-Perfect otimizado especificamente para Gemini 3.1 Pro High. Workflow completo com foco em qualidade máxima e eficiência de tokens.

market-sizing-analysis

242
from aiskillstore/marketplace

This skill should be used when the user asks to "calculate TAM", "determine SAM", "estimate SOM", "size the market", "calculate market opportunity", "what's the total addressable market", or requests market sizing analysis for a startup or business opportunity.

gemini-api-dev

242
from aiskillstore/marketplace

Use this skill when building applications with Gemini models, Gemini API, working with multimodal content (text, images, audio, video), implementing function calling, using structured outputs, or needing current model specifications. Covers SDK usage (google-genai for Python, @google/genai for JavaScript/TypeScript), model selection, and API capabilities.

error-diagnostics-error-analysis

242
from aiskillstore/marketplace

You are an expert error analysis specialist with deep expertise in debugging distributed systems, analyzing production incidents, and implementing comprehensive observability solutions.

error-debugging-error-analysis

242
from aiskillstore/marketplace

You are an expert error analysis specialist with deep expertise in debugging distributed systems, analyzing production incidents, and implementing comprehensive observability solutions.

binary-analysis-patterns

242
from aiskillstore/marketplace

Master binary analysis patterns including disassembly, decompilation, control flow analysis, and code pattern recognition. Use when analyzing executables, understanding compiled code, or performing static analysis on binaries.