file_explorer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

文件浏览器技能 (File Explorer)

File Explorer Skill

此技能专为 Alice 探索复杂项目而设计,提供比原生
ls/cat
更安全、更高效的手段。
This skill is specifically designed for Alice to explore complex projects, providing a safer and more efficient alternative to native
ls/cat
commands.

核心功能

Core Features

  • 项目树生成 (
    --tree
    )
    : 快速展示项目目录结构,支持忽略忽略文件。
  • 模糊搜索 (
    --search
    )
    : 像
    fzf
    一样根据文件名快速定位。
  • 安全读取 (
    --read
    )
    : 自动检测文件大小。如果文件过大,提供分块读取建议,防止上下文溢出。
  • Project Tree Generation (
    --tree
    )
    : Quickly display the project directory structure, with support for ignoring files specified in ignore files.
  • Fuzzy Search (
    --search
    )
    : Quickly locate files by filename, similar to
    fzf
    .
  • Safe Reading (
    --read
    )
    : Automatically detects file size. If the file is too large, provides chunked reading suggestions to prevent context overflow.

使用方法

Usage

在终端运行:
bash
undefined
Run in the terminal:
bash
undefined

查看项目树状结构 (深度默认为 2)

View project tree structure (default depth is 2)

python skills/file_explorer/explorer.py --tree --depth 3
python skills/file_explorer/explorer.py --tree --depth 3

模糊搜索包含 "config" 的文件

Fuzzy search files containing "config"

python skills/file_explorer/explorer.py --search "config"
python skills/file_explorer/explorer.py --search "config"

安全读取文件内容

Safely read file content

python skills/file_explorer/explorer.py --read "agent.py"
undefined
python skills/file_explorer/explorer.py --read "agent.py"
undefined

注意事项

Notes

Alice 已被权限锁定。此技能仅能访问项目根目录下的文件。严禁尝试访问路径外的内容。 对于 10KB 以上的文件,请优先使用
--read
以获取安全分段。
Alice has permission restrictions. This skill can only access files under the project root directory. Do not attempt to access content outside the allowed path. For files larger than 10KB, please use
--read
first to get safe segments.