aiskillstore/marketplace / skills/727474430/use-gemini-for-code-analysis
use-gemini-for-code-analysis
Verified【大型代码库分析专用】当需要分析整个项目架构、识别代码模式、追踪功能实现、梳理模块关系时必须使用本技能。触发关键词:分析整个项目/代码库、架构梳理、模块划分、代码模式识别、功能追踪、全局扫描。本技能通过 Gemini CLI 快速扫描完整代码库,提供 AI 驱动的架构洞察和代码分析,大幅节省手动探索时间。仅返回原始分析结果,不做二次解读。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.1 KB |
| skill-report.json | config | 25.6 KB |
skill-report.json
View on GitHub{
"schema_version": "2.0",
"meta": {
"generated_at": "2026-07-04T17:20:00.710Z",
"slug": "727474430-use-gemini-for-code-analysis",
"source_url": "https://github.com/727474430/cli-rule-swtich/tree/main/templates/claude/jige/skills/use-gemini-for-code-analysis",
"source_ref": "main",
"model": "codex",
"analysis_version": "3.0.0",
"source_type": "community",
"content_hash": "4457967f9030e202092f79f39c898c027c3f2006bcd0e53029550da8faa77aae",
"tree_hash": "19217b729d65e6d9e7660365a53cab0e74e187e39c3a2b50681ca8d72b73551f",
"provenance": {
"model_effective": "codex",
"fallback_chain": [
{
"agent": "codex",
"outcome": "success"
}
],
"analysis_version": "3.0.0"
}
},
"skill": {
"name": "use-gemini-for-code-analysis",
"description": "Use Gemini CLI to analyze large codebases, map architecture, detect patterns, trace features, and return raw analysis results to the calling agent.",
"summary": "Runs Gemini CLI prompts for broad repository analysis and feature tracing.",
"icon": "📦",
"version": "1.0.1",
"author": "727474430",
"license": "MIT",
"tags": [
"code-analysis",
"gemini-cli",
"architecture-review",
"large-codebases",
"repository-scan"
],
"supported_tools": [
"claude",
"codex",
"claude-code"
],
"risk_factors": [
"external_commands"
],
"category": "coding"
},
"security_audit": {
"risk_level": "high",
"is_blocked": false,
"safe_to_publish": false,
"analysis_status": "ok",
"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.",
"remediation": [
{
"issue": "Whole-repository external analysis",
"suggestion": "Require explicit user approval before running Gemini with all files. Add guidance to exclude secrets and sensitive directories.",
"severity": "high"
},
{
"issue": "Confirmation bypass flag",
"suggestion": "Remove --yolo from recommended use. Require normal CLI confirmations for commands that can read or modify files.",
"severity": "high"
},
{
"issue": "Unfiltered output",
"suggestion": "Add a review step that redacts secrets and labels Gemini output as unverified before sharing it.",
"severity": "medium"
}
],
"risk_factor_evidence": [
{
"factor": "external_commands",
"evidence": [
{
"file": "SKILL.md",
"line_start": 23,
"line_end": 23
},
{
"file": "SKILL.md",
"line_start": 24,
"line_end": 24
},
{
"file": "SKILL.md",
"line_start": 25,
"line_end": 25
},
{
"file": "SKILL.md",
"line_start": 41,
"line_end": 43
},
{
"file": "SKILL.md",
"line_start": 43,
"line_end": 47
},
{
"file": "SKILL.md",
"line_start": 47,
"line_end": 49
},
{
"file": "SKILL.md",
"line_start": 49,
"line_end": 53
},
{
"file": "SKILL.md",
"line_start": 53,
"line_end": 55
},
{
"file": "SKILL.md",
"line_start": 55,
"line_end": 59
},
{
"file": "SKILL.md",
"line_start": 59,
"line_end": 61
}
]
}
],
"static_findings": [
{
"id": "external_commands:SKILL.md:23:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 23,
"line_end": 23,
"snippet": "- 使用 `--all-files` 进行全代码库分析"
},
{
"id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 24,
"line_end": 24,
"snippet": "- 用 `-p` 参数编写清晰的分析提示词"
},
{
"id": "external_commands:SKILL.md:25:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 25,
"line_end": 25,
"snippet": "- 考虑使用 `--yolo` 跳过确认(仅限非破坏性任务)"
},
{
"id": "external_commands:SKILL.md:41:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 41,
"line_end": 43,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:43:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 43,
"line_end": 47,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:47:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 47,
"line_end": 49,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:49:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 49,
"line_end": 53,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:53:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 53,
"line_end": 55,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:55:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 55,
"line_end": 59,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:59:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 59,
"line_end": 61,
"snippet": "```bash"
},
{
"id": "obfuscation:SKILL.md:1:heuristic-high-file-entropy-6-76-bits-possible-b",
"category": "obfuscation",
"severity": "high",
"pattern": "[HEURISTIC] High file entropy (6.76 bits) - possible binary/encrypted content",
"file": "SKILL.md",
"line_start": 1,
"line_end": 1,
"snippet": "File: SKILL.md"
}
],
"finding_verdicts": [
{
"id": "external_commands:SKILL.md:23:ruby-shell-backtick-execution",
"verdict": "confirmed",
"confidence": 0.82,
"severity": "high",
"reason": "The line promotes --all-files for Gemini CLI repository analysis, which can expose every project file to an external tool. The risk is broad file disclosure, not Ruby backtick execution."
},
{
"id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.88,
"reason": "This is only a Markdown mention of the -p prompt flag. It does not execute code or create a command injection vector by itself."
},
{
"id": "external_commands:SKILL.md:25:ruby-shell-backtick-execution",
"verdict": "confirmed",
"confidence": 0.86,
"severity": "high",
"reason": "The line recommends --yolo to skip confirmations, reducing safeguards around external CLI execution. This is risky when paired with broad repository access."
},
{
"id": "external_commands:SKILL.md:41:ruby-shell-backtick-execution",
"verdict": "confirmed",
"confidence": 0.84,
"severity": "high",
"reason": "This fenced shell example runs gemini with --all-files, so the skill instructs external command execution over the full repository. That can disclose private code to Gemini."
},
{
"id": "external_commands:SKILL.md:43:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.89,
"reason": "This location is a Markdown code-fence boundary and nearby heading text, not executable Ruby or shell syntax. The broader Gemini command risk is covered by other findings."
},
{
"id": "external_commands:SKILL.md:47:ruby-shell-backtick-execution",
"verdict": "confirmed",
"confidence": 0.84,
"severity": "high",
"reason": "This fenced shell example invokes gemini --all-files for architecture analysis. It is a real external-command pattern with whole-repository data exposure risk."
},
{
"id": "external_commands:SKILL.md:49:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.89,
"reason": "This location is a Markdown code-fence boundary and section text. It is not executable code, so the Ruby backtick execution signature is not present here."
},
{
"id": "external_commands:SKILL.md:53:ruby-shell-backtick-execution",
"verdict": "confirmed",
"confidence": 0.84,
"severity": "high",
"reason": "This fenced shell example invokes gemini --all-files for feature tracing. The command can send a full repository to an external analysis service."
},
{
"id": "external_commands:SKILL.md:55:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.89,
"reason": "This location is a Markdown fence and heading area, not a Ruby or shell backtick execution construct. No executable statement appears at the cited line."
},
{
"id": "external_commands:SKILL.md:59:ruby-shell-backtick-execution",
"verdict": "confirmed",
"confidence": 0.84,
"severity": "high",
"reason": "This fenced shell example runs gemini --all-files for quality and security scanning. The command is external and reads the complete repository scope."
},
{
"id": "obfuscation:SKILL.md:1:heuristic-high-file-entropy-6-76-bits-possible-b",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "SKILL.md is readable Markdown with YAML front matter and Chinese prose. The entropy heuristic appears caused by normal UTF-8 text, not binary or encrypted content."
}
],
"semantic_findings": [
{
"title": "Repository Data Exposure to External Gemini CLI",
"description": "The skill directs Bash to run Gemini CLI with --all-files, which can send an entire repository to an external AI service. Private source code and secrets could leave the local environment.",
"severity": "high",
"locations": [
{
"file": "SKILL.md",
"line_start": 23,
"line_end": 23
},
{
"file": "SKILL.md",
"line_start": 29,
"line_end": 29
},
{
"file": "SKILL.md",
"line_start": 41,
"line_end": 60
}
],
"confidence": 0.9,
"confidence_reasoning": "The instructions explicitly combine Bash execution, Gemini CLI, and --all-files examples. This clearly creates a third-party data exposure path for full repositories."
},
{
"title": "Confirmation Bypass Encouraged",
"description": "The skill suggests --yolo to skip confirmations. This weakens safeguards around external CLI execution, broad file access, and third-party data transfer.",
"severity": "high",
"locations": [
{
"file": "SKILL.md",
"line_start": 25,
"line_end": 25
}
],
"confidence": 0.88,
"confidence_reasoning": "Line 25 directly recommends the confirmation-bypass flag. The parenthetical limit to non-destructive tasks reduces but does not remove the risk."
},
{
"title": "Unfiltered Output Handling",
"description": "The skill says to return Gemini output directly and without modification. Sensitive file paths, snippets, or secrets found during analysis may be returned without review.",
"severity": "medium",
"locations": [
{
"file": "SKILL.md",
"line_start": 34,
"line_end": 35
},
{
"file": "SKILL.md",
"line_start": 65,
"line_end": 67
}
],
"confidence": 0.78,
"confidence_reasoning": "The file explicitly requires complete raw output and no interpretation. This is a plausible leakage path if Gemini reports sensitive repository content."
}
],
"critical_findings": [],
"high_findings": [
{
"title": "Ruby/shell backtick execution",
"description": "- 使用 `--all-files` 进行全代码库分析",
"locations": [
{
"file": "SKILL.md",
"line_start": 23,
"line_end": 23
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.82,
"confidence_reasoning": "The line promotes --all-files for Gemini CLI repository analysis, which can expose every project file to an external tool. The risk is broad file disclosure, not Ruby backtick execution."
},
{
"title": "Ruby/shell backtick execution",
"description": "- 考虑使用 `--yolo` 跳过确认(仅限非破坏性任务)",
"locations": [
{
"file": "SKILL.md",
"line_start": 25,
"line_end": 25
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.86,
"confidence_reasoning": "The line recommends --yolo to skip confirmations, reducing safeguards around external CLI execution. This is risky when paired with broad repository access."
},
{
"title": "Ruby/shell backtick execution",
"description": "```bash",
"locations": [
{
"file": "SKILL.md",
"line_start": 41,
"line_end": 43
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.84,
"confidence_reasoning": "This fenced shell example runs gemini with --all-files, so the skill instructs external command execution over the full repository. That can disclose private code to Gemini."
},
{
"title": "Ruby/shell backtick execution",
"description": "```bash",
"locations": [
{
"file": "SKILL.md",
"line_start": 47,
"line_end": 49
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.84,
"confidence_reasoning": "This fenced shell example invokes gemini --all-files for architecture analysis. It is a real external-command pattern with whole-repository data exposure risk."
},
{
"title": "Ruby/shell backtick execution",
"description": "```bash",
"locations": [
{
"file": "SKILL.md",
"line_start": 53,
"line_end": 55
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.84,
"confidence_reasoning": "This fenced shell example invokes gemini --all-files for feature tracing. The command can send a full repository to an external analysis service."
},
{
"title": "Ruby/shell backtick execution",
"description": "```bash",
"locations": [
{
"file": "SKILL.md",
"line_start": 59,
"line_end": 61
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.84,
"confidence_reasoning": "This fenced shell example runs gemini --all-files for quality and security scanning. The command is external and reads the complete repository scope."
},
{
"title": "Repository Data Exposure to External Gemini CLI",
"description": "The skill directs Bash to run Gemini CLI with --all-files, which can send an entire repository to an external AI service. Private source code and secrets could leave the local environment.",
"locations": [
{
"file": "SKILL.md",
"line_start": 23,
"line_end": 23
},
{
"file": "SKILL.md",
"line_start": 29,
"line_end": 29
},
{
"file": "SKILL.md",
"line_start": 41,
"line_end": 60
}
],
"review_kind": "security",
"source_category": "semantic",
"source_severity": "high",
"confidence": 0.9,
"confidence_reasoning": "The instructions explicitly combine Bash execution, Gemini CLI, and --all-files examples. This clearly creates a third-party data exposure path for full repositories."
},
{
"title": "Confirmation Bypass Encouraged",
"description": "The skill suggests --yolo to skip confirmations. This weakens safeguards around external CLI execution, broad file access, and third-party data transfer.",
"locations": [
{
"file": "SKILL.md",
"line_start": 25,
"line_end": 25
}
],
"review_kind": "security",
"source_category": "semantic",
"source_severity": "high",
"confidence": 0.88,
"confidence_reasoning": "Line 25 directly recommends the confirmation-bypass flag. The parenthetical limit to non-destructive tasks reduces but does not remove the risk."
}
],
"medium_findings": [
{
"title": "Unfiltered Output Handling",
"description": "The skill says to return Gemini output directly and without modification. Sensitive file paths, snippets, or secrets found during analysis may be returned without review.",
"locations": [
{
"file": "SKILL.md",
"line_start": 34,
"line_end": 35
},
{
"file": "SKILL.md",
"line_start": 65,
"line_end": 67
}
],
"review_kind": "security",
"source_category": "semantic",
"source_severity": "medium",
"confidence": 0.78,
"confidence_reasoning": "The file explicitly requires complete raw output and no interpretation. This is a plausible leakage path if Gemini reports sensitive repository content."
}
],
"low_findings": [],
"dangerous_patterns": [],
"files_scanned": 1,
"total_lines": 70,
"audit_model": "codex",
"audited_at": "2026-07-04T17:20:00.710Z",
"agent_auto_install_policy": "confirmation_required",
"manual_install_policy": "allowed"
},
"content": {
"user_title": "Analyze Large Codebases with Gemini CLI",
"value_statement": "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.",
"seo_keywords": [
"Claude",
"Codex",
"Claude Code",
"Gemini CLI",
"code analysis",
"large codebase",
"architecture review",
"repository scanning",
"AI code review",
"codebase mapping"
],
"actual_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."
],
"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."
],
"use_cases": [
{
"title": "Map an unfamiliar repository",
"description": "Create a high-level view of directories, components, entry points, and data flow before deeper work.",
"target_user": "Developer onboarding"
},
{
"title": "Trace a feature implementation",
"description": "Find the files, integrations, and data paths behind a specific product capability.",
"target_user": "Feature developer"
},
{
"title": "Review architecture and quality",
"description": "Ask Gemini to scan broad patterns, bottlenecks, security concerns, and design risks across a large codebase.",
"target_user": "Technical lead"
}
],
"prompt_templates": [
{
"title": "Map the repository",
"scenario": "Beginner repository orientation",
"prompt": "Use Gemini CLI to map this repository. Return the main directories, components, data flow, and entry points."
},
{
"title": "Find a pattern",
"scenario": "Focused pattern search",
"prompt": "Use Gemini CLI to identify where this pattern appears: [pattern]. Include examples, related files, and likely risks."
},
{
"title": "Trace a feature",
"scenario": "Implementation discovery",
"prompt": "Use Gemini CLI to trace [feature]. Show the involved files, control flow, data flow, and external integrations."
},
{
"title": "Assess architecture risks",
"scenario": "Advanced architecture review",
"prompt": "Use Gemini CLI to review architecture risks. Focus on coupling, performance bottlenecks, security concerns, and maintainability tradeoffs."
}
],
"output_examples": [
{
"input": "Analyze the repository architecture.",
"output": "A concise report lists main modules, entry points, data flow, and design decisions from Gemini CLI results."
},
{
"input": "Trace the authentication feature.",
"output": "The response names related files, request flow, database interactions, and integration points for review."
},
{
"input": "Scan for performance and security concerns.",
"output": "The output groups potential bottlenecks, risky patterns, and follow-up checks without modifying files."
}
],
"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."
],
"faq": [
{
"question": "Does this skill require Gemini CLI?",
"answer": "Yes. Gemini CLI must be installed and authenticated before the skill can run its documented workflow."
},
{
"question": "Does it modify code?",
"answer": "The documented workflow is analysis only. Command execution still needs care because the CLI can access project files."
},
{
"question": "Can it analyze private repositories?",
"answer": "Only if you are allowed to share the files with Gemini. Exclude secrets and sensitive code first."
},
{
"question": "Does it work with Claude Code and Codex?",
"answer": "Yes. The skill declares support for Claude, Codex, and Claude Code."
},
{
"question": "What analysis works best?",
"answer": "It fits architecture maps, pattern searches, feature tracing, and quality reviews across large repositories."
},
{
"question": "Does it validate Gemini output?",
"answer": "No. It returns raw Gemini CLI results for the user or calling agent to review."
}
]
},
"file_structure": [
{
"name": "SKILL.md",
"type": "file",
"path": "SKILL.md",
"lines": 70
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |