tree
Files
SKILL.mdagentsreferencesscripts
Install
Install the containing plugin
/plugin install shared-skills@llm-skills
Invoke this skill after installation
/shared-skills:tree
This skill is bundled inside shared-skills. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-shared-skills.
SKILL.md
name: tree description: Display directory structure in tree format. Use when the agent needs to search, filter, or transform data efficiently.
Tree
Display directory structure in tree format
Prerequisite Check
Run this before proposing tree output:
command -v tree >/dev/null 2>&1 || tree --version
If tree is missing, surface that first and fall back to find or ls -R, noting that formatting and depth controls will differ.
Quick Start
- Verify
treeis available:tree --versionorman tree - Establish the command surface:
man treeortree --help - Start with basic usage:
tree [options] [input]
Intent Router
references/install-and-setup.md— Installing treereferences/cheatsheet.md— Common options and patternsreferences/advanced-usage.md— Advanced techniquesreferences/troubleshooting.md— Common errors and solutions
Core Workflow
- Verify tree is available:
tree --version - Test with sample data first
- Validate output before batch processing
- Document exact commands for reproducibility
Quick Command Reference
tree --version # Check version
tree --help # Show help
tree [options] [input] # Basic usage
man tree # Full manual
# Show a shallow directory summary
tree -L 2 .
# Fallbacks when tree is unavailable
find . -maxdepth 2 -print
ls -R
Safety Notes
| Area | Guardrail |
|---|---|
| Input validation | Verify input data format before processing. |
| Output handling | Validate output structure. |
| Large files | Test with smaller samples first. |
Recovery note: when using find or ls -R as a fallback, describe the expected output difference up front because the user will not get tree-style indentation or the same ignore/depth behavior.
Source Policy
- Treat installed behavior and man page as truth.
Resource Index
scripts/install.sh— Install on macOS or Linux.scripts/install.ps1— Install on Windows or any platform.