← 返回 Skills 市场
tyronecoh

File Management

作者 TyroneMok · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
474
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install file-management
功能描述
Perform safe file and directory operations on Unix systems using built-in tools for listing, searching, reading, organizing, and managing without external bi...
使用说明 (SKILL.md)

File Management

Safe filesystem operations using only pre-installed system tools. No external dependencies, no network access, no install.

Core Principle

Safety first — always confirm destructive operations before executing.

  • mv, cp, rm are irreversible without a backup
  • Prefer ls -la before touching anything
  • For deletions, prefer trash (macOS) or rm as last resort

Built-in Tools Only

Guaranteed on all Unix/macOS

Tool Purpose Notes
ls List files All Unix ✅
find Search files All Unix ✅
grep Search file contents All Unix ✅
cat / head / tail Read files All Unix ✅
mv Move / rename Write ⚠️
cp Copy files Write ⚠️
mkdir Create directories Write ⚠️
rm Delete files Write ⚠️ last resort
stat File metadata All Unix ✅
du Disk usage All Unix ✅
tar Archive files All Unix ✅
xattr Extended attributes macOS ✅

macOS-specific (pre-installed)

Tool Purpose Notes
trash Move to Trash (recoverable) macOS ✅ preferred
pbcopy / pbpaste Clipboard macOS ✅
mdls Spotlight metadata macOS ✅
mdutil Spotlight index macOS ✅

Optional tools (may not be installed)

These are helpful but NOT guaranteed. Check with which \x3Ctool> before using:

  • tree — directory tree view (install: brew install tree)
  • rg (ripgrep) — faster grep (install: brew install ripgrep)
  • fd — faster find (install: brew install fd)
  • dust — better du (install: brew install dust)
  • bat — better cat (install: brew install bat)

Common Patterns

List Directory Contents

# Basic listing
ls -la /path/to/dir

# Human-readable sizes, newest first
ls -lahF /path/to/dir | sort -k5 -rh

# Recursive depth
find /path -maxdepth 2 -type f

# Show hidden files
ls -la /path/to/dir

Search for Files by Name

# Find by name pattern
find /path -name "*.txt" -type f

# Case-insensitive
find /path -iname "readme*"

# Modified in last N days
find /path -name "*.md" -mtime -7

# By size
find /path -size +100M

Search File Contents

# Grep with context
grep -rn "search_term" /path

# Case-insensitive
grep -ri "search_term" /path

# Only filenames with matches
grep -rl "search_term" /path

Disk Usage Analysis

# Total size of directory
du -sh /path/to/dir

# Per-subdirectory breakdown
du -h --max-depth=1 /path | sort -rh

# Find largest files (recursive)
find /path -type f -exec du -h {} + | sort -rh | head -20

Move / Copy / Delete

# Move (rename)
mv source.txt /new/path/

# Copy (recursive for directories)
cp -r /source/dir /dest/dir

# Delete — ALWAYS confirm first
# Preferred on macOS (goes to Trash):
trash /path/to/file.txt
# Or rm as last resort:
rm /path/to/file.txt

Batch Rename (pure bash)

# Rename all .txt to .md in current directory
for f in *.txt; do mv "$f" "${f%.txt}.md"; done

# Replace spaces with underscores
for f in *\ *; do mv "$f" "${f// /_}"; done

Archive & Compress

# Create tar.gz
tar -czvf archive.tar.gz /path

# Extract
tar -xzvf archive.tar.gz

# Create zip
zip -r archive.zip /path

# Extract zip
unzip archive.zip

Permission Model

Read-only operations — safe to execute without asking: ls, find, grep, cat, head, tail, du, stat, file, mdls

Write operations — always confirm before executing: mv, cp, mkdir, trash, rm, zip, tar

For destructive operations:

  1. Show what will be affected first
  2. Ask for confirmation with exact command
  3. Prefer trash over rm on macOS

Anti-Patterns (Never Do)

  • rm -rf / or any recursive delete without confirming
  • chmod -R 777 or permission changes that break security
  • ❌ Executing downloaded scripts directly without review
  • ❌ Accessing paths outside user's home without asking
  • sudo operations unless explicitly requested

Quick Reference

# Where am I?
pwd

# What's in current directory?
ls -la

# Find all PDFs larger than 10MB
find ~ -name "*.pdf" -size +10M

# How much space is used?
du -sh ~/Library

# Search for TODO in code files
grep -rn --include="*.py" "TODO" ~/code/
安全使用建议
This skill is coherent for local file tasks and does not request credentials or installs, but it will run shell commands that can read or (with confirmation) modify or delete files. Only install/use it if you trust the skill and the agent: (1) test it on non-sensitive directories first, (2) avoid asking it to search entire home or system paths if you have secrets there, (3) always review any proposed destructive commands before approving, and (4) do not run the agent/skill with elevated privileges (sudo) unless absolutely necessary. Also note the skill has no published homepage/source — if provenance matters, prefer a skill with clear authorship.
能力评估
Purpose & Capability
Name/description match the actual instructions: SKILL.md gives step-by-step use of standard Unix/macOS utilities for listing, searching, reading, organizing, archiving and deleting files. It requests no unrelated binaries, env vars, or installs. One minor provenance note: the skill's source/homepage is unknown, but that does not create a mismatch between purpose and capabilities.
Instruction Scope
Instructions are narrowly scoped to filesystem operations and explicitly separate read-only vs write/destructive actions, with guidance to confirm destructive steps. However, the skill will run shell commands that read arbitrary paths (e.g., find ~ -name ...), which can surface sensitive files; SKILL.md does not specify how discovered data should be handled or whether results may be transmitted. This is expected for a file-management skill but is a privacy consideration.
Install Mechanism
Instruction-only skill with no install spec and no code files — lowest-risk install posture. It only relies on builtin tools and suggests optional third-party tools with explicit 'check which' guidance.
Credentials
The skill requires no environment variables or credentials, which is appropriate. Be aware that its normal operations involve reading the user's filesystem (including home) — the skill does not request secrets but may reveal them if you ask it to search broad paths.
Persistence & Privilege
always: false and no install/write behavior; the skill does not request persistent or elevated privileges. Note that model-invocation is allowed (the platform default) so the agent could call the skill autonomously; that is normal and not by itself a problem.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install file-management
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /file-management 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Fixed: removed external tool claims, clarified optional tools, fixed typo
v1.0.1
Added tags
v1.0.0
Initial release: safe filesystem operations using built-in Unix tools only
元数据
Slug file-management
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

File Management 是什么?

Perform safe file and directory operations on Unix systems using built-in tools for listing, searching, reading, organizing, and managing without external bi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 474 次。

如何安装 File Management?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install file-management」即可一键安装,无需额外配置。

File Management 是免费的吗?

是的,File Management 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

File Management 支持哪些平台?

File Management 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 File Management?

由 TyroneMok(@tyronecoh)开发并维护,当前版本 v1.0.2。

💬 留言讨论