repo-explorer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Note: If you have
mcporter
installed locally, you should use
mcporter
to invoke the MCP tool instead of directly calling the MCP tool. The
mcporter
CLI provides a more convenient interface and better error handling.
注意:如果您本地已安装
mcporter
,应使用
mcporter
调用MCP工具,而非直接调用MCP工具。
mcporter
CLI提供了更便捷的界面和更完善的错误处理机制。

Repo Explorer via Gitee MCP

基于Gitee MCP的仓库探索工具

Quickly explore the structure and core content of a Gitee repository and generate an overview report to help get up to speed on an unfamiliar project.
快速探索Gitee仓库的结构与核心内容,并生成概览报告,帮助您快速熟悉陌生项目。

Prerequisites

前提条件

  • Gitee MCP Server configured (tools:
    get_file_content
    ,
    search_files_by_content
    ,
    list_user_repos
    )
  • User must provide: repository owner, repository name
  • Optional: specific area of interest (e.g., "I want to understand the authentication mechanism")
  • 已配置Gitee MCP Server(需用到工具:
    get_file_content
    search_files_by_content
    list_user_repos
  • 用户需提供:仓库所有者、仓库名称
  • 可选:特定关注领域(例如:“我想了解认证机制”)

Steps

操作步骤

Step 1: Fetch Key Documentation

步骤1:获取关键文档

Start by reading these files using
get_file_content
:
  1. README.md
    or
    README_CN.md
    : project introduction
  2. CONTRIBUTING.md
    : contribution guide (development conventions)
  3. CHANGELOG.md
    : change history (evolution of the project)
  4. package.json
    /
    go.mod
    /
    pom.xml
    /
    requirements.txt
    : tech stack and dependencies
使用
get_file_content
工具读取以下文件:
  1. README.md
    README_CN.md
    :项目介绍
  2. CONTRIBUTING.md
    :贡献指南(开发规范)
  3. CHANGELOG.md
    :变更历史(项目演进历程)
  4. package.json
    /
    go.mod
    /
    pom.xml
    /
    requirements.txt
    :技术栈与依赖项

Step 2: Explore Project Structure

步骤2:探索项目结构

First, use
get_file_content
with
path="/"
to get the root directory tree:
get_file_content(owner="[owner]", repo="[repo]", path="/")
This returns the top-level directory structure in a single call, providing a quick overview of the project's layout.
Then, browse key subdirectories to identify:
Common project structure patterns
  • src/
    or
    lib/
    : core source code
  • cmd/
    or
    bin/
    : CLI entry points (Go / C++ projects)
  • api/
    or
    routes/
    : API definitions
  • tests/
    or
    test/
    : test code
  • docs/
    : detailed documentation
  • scripts/
    or
    .gitee/
    or
    .github/
    : build / CI scripts
  • config/
    or
    configs/
    : configuration files
首先,使用
get_file_content
并设置
path="/"
获取根目录树:
get_file_content(owner="[owner]", repo="[repo]", path="/")
该调用会一次性返回顶层目录结构,帮助您快速了解项目布局。
随后,浏览关键子目录以识别:
常见项目结构模式
  • src/
    lib/
    :核心源代码
  • cmd/
    bin/
    :CLI入口(Go / C++项目)
  • api/
    routes/
    :API定义
  • tests/
    test/
    :测试代码
  • docs/
    :详细文档
  • scripts/
    .gitee/
    .github/
    :构建 / CI脚本
  • config/
    configs/
    :配置文件

Step 3: Analyze Core Code

步骤3:分析核心代码

Based on the project type, read key files in depth:
Web application
  • Entry file (main.go / index.js / app.py)
  • Route definition files
  • Database schema or model definitions
Library / SDK
  • Main entry file (public API entry point)
  • Core algorithm files
CLI tool
  • Command definition files
  • Configuration handling logic
Use
search_files_by_content
to locate core logic:
  • Search for
    main
    ,
    init
    ,
    Router
    , etc.
  • Search for specific keywords matching the user's area of interest
根据项目类型,深入阅读关键文件:
Web应用
  • 入口文件(main.go / index.js / app.py)
  • 路由定义文件
  • 数据库 schema 或模型定义
库 / SDK
  • 主入口文件(公开API入口)
  • 核心算法文件
CLI工具
  • 命令定义文件
  • 配置处理逻辑
使用
search_files_by_content
定位核心逻辑:
  • 搜索
    main
    init
    Router
    等关键词
  • 搜索与用户关注领域匹配的特定关键词

Step 4: Generate Repository Overview Report

步骤4:生成仓库概览报告

undefined
undefined

Repository Overview: [owner/repo]

仓库概览:[owner/repo]

About

关于项目

[One-paragraph description summarizing the project based on the README]
[基于README总结的一段项目描述]

Tech Stack

技术栈

  • Language: [primary language]
  • Framework: [main framework]
  • Storage: [database / cache]
  • Deployment: [Docker / K8s / other]
  • 编程语言:[主要语言]
  • 框架:[主框架]
  • 存储:[数据库 / 缓存]
  • 部署方式:[Docker / K8s / 其他]

Directory Structure

目录结构

[Key directory annotations] ├── src/ # Core source code ├── api/ # API definitions ├── tests/ # Tests └── docs/ # Documentation
[关键目录注释] ├── src/ # 核心源代码 ├── api/ # API定义 ├── tests/ # 测试代码 └── docs/ # 文档

Core Modules

核心模块

ModulePathResponsibility
[name][path][one-sentence description]
模块名称路径职责
[名称][路径][一句话描述]

Data Models (if applicable)

数据模型(如适用)

[Main entities and their relationships]
[主要实体及其关系]

Getting Started

快速开始

[Setup steps extracted from README / CONTRIBUTING]
```bash
[从README / CONTRIBUTING中提取的搭建步骤]
```bash

Install dependencies

安装依赖

[command]
[命令]

Start the project

启动项目

[command] ```
[command] ```

Contribution Highlights

贡献要点

[Key conventions from CONTRIBUTING.md]
[来自CONTRIBUTING.md的关键规范]

Recent Activity

近期动态

[Latest version highlights from CHANGELOG or README]
undefined
[来自CHANGELOG或README的最新版本亮点]
undefined

Step 5: Deep Dive (optional)

步骤5:深度探索(可选)

If the user has a specific area of interest, use
search_files_by_content
for targeted searches:
  • Authentication: search
    auth
    ,
    token
    ,
    permission
  • Database operations: search
    SELECT
    ,
    INSERT
    ,
    Model
  • Configuration: search
    config
    ,
    env
    ,
    ENV
如果用户有特定关注领域,使用
search_files_by_content
进行针对性搜索:
  • 认证机制:搜索
    auth
    token
    permission
  • 数据库操作:搜索
    SELECT
    INSERT
    Model
  • 配置相关:搜索
    config
    env
    ENV

Notes

注意事项

  • Prefer smaller files when reading; avoid loading very large files all at once
  • Keep the report focused and concise — do not try to cover everything
  • If the project has no README, infer its purpose from the code structure and comments
  • 读取文件时优先选择较小的文件;避免一次性加载过大的文件
  • 报告需聚焦重点、简洁明了——无需覆盖所有内容
  • 如果项目没有README,可从代码结构和注释推断其用途