Skip to content
Back to skills

Use Gemini For Code Analysis

ASecurity

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

  • 416 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 7, 2026
code-qualitybash

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add aiskillstore/marketplace --skill use-gemini-for-code-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Use Gemini For Code Analysis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Use Gemini For Code Analysis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-use-gemini-for-code-analysis/badge)](https://www.skillsdirectory.com/skills/aiskillstore-use-gemini-for-code-analysis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

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

# 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 或用户)处理结果解读
- 专注于高效的命令构造和执行
- 所有提示词使用中文,除非用户另有要求

Files in this skill

  • SKILL.md2.1 KB
  • skill-report.json9.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…