一键导入
tree-context
Use a compact project tree index to reduce unnecessary repository-wide Grep/Glob scans in Claude Code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use a compact project tree index to reduce unnecessary repository-wide Grep/Glob scans in Claude Code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | tree-context |
| description | Use a compact project tree index to reduce unnecessary repository-wide Grep/Glob scans in Claude Code. |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Grep, Glob, Edit, MultiEdit, Write |
Task: $ARGUMENTS
Use the compact project tree index before exploring the repository. This Skill helps Claude find likely files and directories faster while avoiding unnecessary repository-wide searches.
Run compact context selection for this task:
python3 .claude/scripts/tree_context.py select --prompt "$ARGUMENTS"
If python3 is unavailable, use:
python .claude/scripts/tree_context.py select --prompt "$ARGUMENTS"
Read candidate files from the selected context first.
If Grep is necessary, scope it to candidate directories or clearly relevant directories.
Avoid repository-wide Grep / Glob unless the selected context has no useful candidates.
Avoid generated, dependency, build, binary, cache, and log files unless explicitly required.
When creating, deleting, or moving files, rely on the PostToolUse hook to refresh the tree index.
If the index may be stale, rebuild it manually:
python3 .claude/scripts/tree_context.py build
Keep the response compact and prioritize:
Do not paste large logs or entire files. Summarize and cite file paths instead.