# List Directory With Sizes

> Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.

- Skill: `xiaobai1017/list-directory-with-sizes` (Agent Skill)
- Install (CLI): `npx skillmds@latest add xiaobai1017/list-directory-with-sizes`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xiaobai1017/list-directory-with-sizes/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: xiaobai1017 (https://skillmd.com/u/xiaobai1017)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/xiaobai1017/list-directory-with-sizes

---


# List Directory with Sizes

Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.

## Purpose

This skill provides access to the MCP tool `list_directory_with_sizes`. It allows you to get a detailed listing of all files and directories in a specified path, including sizes. results clearly distinguish between files and directories with [file] and [dir] prefixes. this tool is useful for understanding directory structure and finding specific files within a directory. only works within allowed directories..

## Parameters

The tool accepts the following parameters:

### `path`
**Required**
- **Type**: `string`
- **Description**: No description provided

### `sortBy`
*Optional*
- **Type**: `string`
- **Description**: Sort entries by name or size
- **Allowed values**: name, size
- **Default**: `name`


## Usage Instructions

To use this tool:

1. **Prepare the parameters** according to the schema above
2. **Invoke the MCP tool** `list_directory_with_sizes` with the prepared parameters
3. **Process the result** returned by the tool

## Example

```json
{
  "path": "example_value",
  "sortBy": "example_value"
}
```

## Expected Output

The tool returns data with the following structure:

- **content** (`string`): No description provided


## Notes

- This skill requires an active MCP connection to the server providing the `list_directory_with_sizes` tool
- Ensure the MCP server is properly configured and running before attempting to use this tool
- Review the parameter requirements carefully to avoid errors
