agentsclimarketplace

Directory tree

Skill publisher-skill/claude-skill/skills/directory_tree

目录树生成器 - 生成美观的目录树结构,支持文件大小显示和导出From its SKILL.md

Install
npx -y skills add publisher-skill/claude-skill --skill directory_tree

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.3 KB, 333 tokens by cl100k_base, as published. Nobody here has run it

Directory Tree Skill

目录树生成器,生成美观的目录树结构。

功能特性

  • 生成目录树 - 直观的树形结构显示
  • 文件大小显示 - 显示文件和目录大小
  • 深度限制 - 限制显示深度
  • 排除模式 - 排除特定文件/目录
  • 导出功能 - 导出为文本或 Markdown

使用方法

Python API

from skills.directory_tree import DirectoryTree

tree = DirectoryTree()

# 生成目录树
tree_str = tree.generate('/path/to/folder')
print(tree_str)

# 显示文件大小
tree_str = tree.generate_with_sizes('/path/to/folder')

# 限制深度
tree_str = tree.generate('/path/to/folder', max_depth=3)

# 保存到文件
tree.save_to_file(tree_str, 'output.txt')

API 参考

DirectoryTree 类

generate(directory, max_depth=None, exclude_patterns=None, include_files=True)

生成目录树字符串

generate_with_sizes(directory, max_depth=None, exclude_patterns=None)

生成带文件大小的目录树

generate_markdown(directory, max_depth=None, exclude_patterns=None, include_files=True)

生成 Markdown 格式的目录树

save_to_file(tree_str, output_file)

保存到文件

What ships with it: 5 files

11.5 KB alongside SKILL.md, 3 of them executable

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.