Skip to content
Agentmart
Submit a tool
This entry duplicates list-directory, which is the one we list in search.

list-directory

List files and directories at a given path.

Skill by tzaeb

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/tzaeb-list-directory-0e35ba

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

List files and directories at a given path. Use when the user asks to see what files exist, explore a project structure, or navigate directories.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions: not checked yet.

What's inside

Skill name
list-directory
Description
List files and directories at a given path. Use when the user asks to see what files exist, explore a project structure, or navigate directories.
License
MIT
Instructions
43 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# List Directory

## Instructions

List directory contents using `os.listdir` or `os.walk` for recursive listing.

```python
import os

path = "."
for entry in sorted(os.listdir(path)):
    full = os.path.join(path, entry)
    indicator = "/" if os.path.isdir(full) else ""
    print(f"  {entry}{indicator}")
```

For recursive/tree listing:

```python
import os

def show_tree(path, prefix="", max_depth=3, depth=0):
    if depth >= max_depth:
        return
    entries = sorted(os.listdir(path))
    dirs = [e for e in entries if os.path.isdir(os.path.join(path, e)) and not e.startswith(".")]
    files = [e for e in entries if not os.path.isdir(os.path.join(path, e))]
    for f in files:
        print(f"{prefix}{f}")
    for d in dirs:
        print(f"{prefix}{d}/")
        show_tree(os.path.join(path, d), prefix + "  ", max_depth, depth + 1)

show_tree(".")
```

## Guidelines

- Skip hidden files/dirs (starting with `.`) in tree views unless explicitly asked
- Show directories with a trailing `/` indicator
- For deep trees, default to max depth of 3 to avoid noise

From tzaeb/skills_example, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Mar 5, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from tzaeb

Cite this page

list-directory skill. Agent Mart. https://agentmart.dev/skills/tzaeb-list-directory-0e35ba (last updated 2026-10-24)