repo-analyze

repo-analyze is a command for Claude Code from virgoC0der/awesome-claude-code. It costs 0 tokens per session (537 once invoked), scanned A, original, MIT.

A repository-analysis command that combines a large-context scan with detailed review of a codebase.

In plain words
What is it for?
Use it to map a repository’s technologies and components, find circular dependencies and tight coupling, and produce deeper quality and performance findings.
Why use it?
It gives a broader view of project structure while also checking code quality, dependencies, complexity, duplication, and performance risks.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Gemini CLI.

Good fit Use it to map a repository’s technologies and components, find circular dependencies and tight coupling, and produce deeper quality and performance findings.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/virgoc0der/awesome-claude-code/repo-analyze
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/virgoC0der/awesome-claude-code

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for repo-analyze

README.md
[![agentmods](https://agentmods.dev/badge/commands/virgoc0der/awesome-claude-code/repo-analyze/github.svg)](https://agentmods.dev/commands/virgoc0der/awesome-claude-code/repo-analyze)
Your own site
<a href="https://agentmods.dev/commands/virgoc0der/awesome-claude-code/repo-analyze"><img src="https://agentmods.dev/badge/commands/virgoc0der/awesome-claude-code/repo-analyze/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for repo-analyze

Your own site · 80×15
<a href="https://agentmods.dev/commands/virgoc0der/awesome-claude-code/repo-analyze"><img src="https://agentmods.dev/badge/commands/virgoc0der/awesome-claude-code/repo-analyze.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 537 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00537
Opus 5 $0.00000 $0.00269
Sonnet 5 $0.00000 $0.00107
Haiku 4.5 $0.00000 $0.00054

Measured 9d ago against content hash 3b64ca9f84eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

repo-analyze scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/repo-analyze.md · 65 lines

What it actually says

Analyze a code repository using Gemini CLI collaboration to leverage Gemini's large context window and Claude's detailed analysis capabilities.

Analysis Type: $ARGUMENTS (project, gitignored)

  1. Environment Setup:

    • Verify Gemini CLI is available (npm install -g @google/gemini-cli if missing)
    • Validate repository path exists
    • Create output directory structure for results
    • Record analysis metadata (timestamp, tools, versions)
  2. Gemini Global Analysis (Phase 1):

    • IMPORTANT: executing each step in this phase by using gemini -p
    • Execute comprehensive architecture scan using gemini -p
    • Analyze project structure and organization
    • Identify technology stack and dependencies
    • Map core components and their relationships
    • Detect circular dependencies and coupling issues
    • Generate JSON output for structured analysis
  3. Detailed Code Analysis (Phase 2):

    • Review Gemini's global analysis results
    • Perform deep code quality assessment:
      • Cyclomatic complexity evaluation
      • Cognitive complexity and readability
      • Code duplication detection
      • Naming conventions and consistency
    • Identify performance bottlenecks:
      • Algorithmic complexity issues
      • N+1 query problems
      • Memory leak risks
      • Concurrency and race conditions
    • Security vulnerability scanning:
      • Input validation gaps (SQL injection, XSS, path traversal)
      • Authentication and authorization issues
      • Hardcoded credentials detection
      • Sensitive data exposure risks
  4. Documentation Generation (Phase 3):

    • Create API documentation with usage examples
    • Generate architecture documentation with Mermaid diagrams
    • Produce developer guide covering:
      • Environment setup
      • Project structure explanation
      • Development workflow
      • Common tasks and debugging
      • Performance optimization tips
  5. Report Compilation (Phase 4):

    • Generate comprehensive analysis report including:
      • Executive summary with key findings
      • Code quality metrics table
      • Security assessment with prioritized issues
      • Performance analysis and recommendations
      • Action plan (P0: critical, P1: short-term, P2: long-term)
    • Create interactive HTML dashboard with visualizations
    • Organize all outputs in structured directory
  6. Advanced Options:

    • Batch processing mode for large repositories (>100k files)
    • Incremental analysis for changed files only
    • Custom analysis type combinations

Output structure saved to timestamped directory with subdirectories: raw_data/, reports/, documentation/, metrics/

Focus on actionable insights and prioritize findings by severity. Ask for clarification if repository scope or analysis depth is unclear.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 65 lines · 0 tokens per session scan A 3b64ca9f84eb

Subscribe to this mod's changes

repo-analyze is a command published in the GitHub repository virgoC0der/awesome-claude-code (1 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 537 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.