Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计异常

filesystem文件系统管理

Agent Skill

filesystem 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,028

周安装

42

GitHub Stars

216

下载量

329
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:filesystem(文件系统管理)
来源仓库:https://github.com/mathews-tom/armory
仓库路径:skills/filesystem
安装命令:
npx skills add https://github.com/mathews-tom/armory --skill filesystem
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mathews-tom/armory --skill filesystem

简介

filesystem 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于文件系统管理和本地资源查找场景。
  • 通过 npx skills add 命令从 GitHub 仓库安装并使用该技能。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网或文件读写操作。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

Filesystem

All file and directory operations use Claude Code's built-in tools. No MCP server needed — native tools are faster, more capable, and cost zero context tokens when idle.

Quick Reference

Filesystem MCP ToolReplacementNotes
read_file(path)Read toolSupports line offset and limit
read_multiple_files(paths)Multiple parallel Read callsFaster than sequential MCP calls
write_file(path, content)Write toolOverwrites entire file
edit_file(path, edits)Edit toolExact string replacement; surgical edits
list_directory(path)Glob or Bash lsGlob for patterns, ls for simple listing
directory_tree(path)Bash fd or Glob **/*fd is fastest; Glob for pattern filtering
search_files(pattern, path)Grep toolFull regex, file type filters, context lines
create_directory(path)Bash mkdir -p-p creates intermediate directories
move_file(src, dst)Bash mvAlso handles renames
get_file_info(path)Bash stat or Bash ls -laSize, permissions, timestamps
list_allowed_directoriesN/AClaude Code operates in the working directory; no sandbox restrictions

Reading Files

Read a Single File

Use the Read tool with an absolute path:

Read: /path/to/file.py

For large files, use offset and limit to read specific sections:

Read: /path/to/file.py (offset: 100, limit: 50)

This reads 50 lines starting from line 100. Use this for files with thousands of lines to avoid flooding context.

Read Multiple Files in Parallel

Issue multiple Read calls in a single response. Claude Code executes them concurrently:

Read: /path/to/file1.py
Read: /path/to/file2.py
Read: /path/to/file3.py

Parallel reads are faster than the MCP's read_multiple_files which serialized internally.

Read Images and PDFs

The Read tool handles binary formats:

  • Images (PNG, JPG, SVG): displayed visually
  • PDFs: extracted text; use pages: "1-5" for large documents (max 20 pages per call)

Writing and Editing Files

Write a New File

Use the Write tool to create a file or overwrite an existing one:

Write: /path/to/new-file.py
Content: <full file content>

The Write tool requires reading the file first if it already exists. For new files, write directly.

Edit an Existing File

Use the Edit tool for surgical modifications — replace exact string matches:

Edit: /path/to/file.py
old_string: "def old_function():"
new_string: "def new_function():"

The Edit tool fails if old_string is not unique in the file. Provide enough surrounding context to make the match unique, or use replace_all: true for find-and-replace across the entire file.

Prefer Edit over Write for existing files. Edit preserves everything outside the changed region and shows a clear diff. Write replaces the entire file.


Finding Files

By Name Pattern (Glob)

Glob: **/*.py           → all Python files recursively
Glob: src/**/*.ts       → TypeScript files under src/
Glob: *.md              → Markdown files in current directory
Glob: **/test_*.py      → test files anywhere in the tree

Results are sorted by modification time (most recent first).

By Content (Grep)

Grep: pattern="def process_data" type="py"
Grep: pattern="TODO|FIXME" glob="*.py"
Grep: pattern="class.*Controller" output_mode="content" -C=2
Grep ParameterPurpose
patternRegex pattern to match
typeFile type filter (py, js, ts, rust, go, etc.)
globGlob pattern filter (*.tsx, src/**/*.py)
output_modefiles_with_matches (default), content, count
-C, -A, -BContext lines: around, after, before matches
-iCase-insensitive search

Directory Listing

Simple listing:

ls -la /path/to/directory

Recursive tree with fd:

fd . /path/to/directory --type f

Tree with depth limit:

fd . /path/to/directory --type f --max-depth 2

Filter by extension:

fd -e py /path/to/directory

File Operations

Create Directory

mkdir -p /path/to/new/directory

The -p flag creates all intermediate directories. Always verify the parent path exists first with ls.

Move / Rename

mv /path/to/source.py /path/to/destination.py

Rename a file (same directory):

mv /path/to/old-name.py /path/to/new-name.py

Move a directory:

mv /path/to/source-dir /path/to/destination-dir

Copy

cp /path/to/source.py /path/to/destination.py
cp -r /path/to/source-dir /path/to/destination-dir

Delete

rm /path/to/file.py
rm -r /path/to/directory

Always confirm with the user before deleting files or directories.

File Metadata

stat /path/to/file.py
ls -la /path/to/file.py
wc -l /path/to/file.py
CommandReturns
statSize, permissions, timestamps, inode
ls -laPermissions, owner, size, modification date
wc -lLine count
fileMIME type detection

Common Workflows

Find and Replace Across Files

# Find all files containing the old string
Grep: pattern="old_function_name" type="py" output_mode="files_with_matches"

# Then Edit each file
Edit: /path/to/file1.py (old_string → new_string, replace_all: true)
Edit: /path/to/file2.py (old_string → new_string, replace_all: true)

Explore an Unfamiliar Codebase

  1. Check project structure: fd. --type f --max-depth 2
  2. Read configuration: Read: package.json or Read: pyproject.toml
  3. Find entry points: Grep: pattern="def main|if __name__" type="py"
  4. Read key files identified above

Find Large Files

fd --type f --exec stat -f '%z %N' {} \; | sort -rn | head -20

Error Handling

ErrorCauseResolution
Read: file not foundPath incorrect or file deletedVerify with ls or Glob
Edit: old_string not uniqueMultiple matches in the fileAdd more surrounding context to make it unique
Edit: old_string not foundContent changed since last readRe-read the file, then retry with current content
Write: file not read firstAttempting to overwrite without readingRead the file first, then Write
Permission deniedInsufficient OS permissionsCheck with ls -la; use chmod if appropriate
Glob: no files foundPattern too restrictiveBroaden the pattern; check path spelling

Limitations

  • Read returns up to 2000 lines by default. Use offset/limit for larger files.
  • Read truncates lines longer than 2000 characters.
  • Edit requires exact string matching — whitespace and indentation must match precisely.
  • Write overwrites the entire file. No append mode. To append, read first, then write the combined content.
  • Glob only matches files, not directories. Use Bash ls or fd to list directories.
  • PDF reading is limited to 20 pages per call. Specify page ranges for large documents.

Calibration Rules

  1. Read before Edit. Always read a file before editing it. The Edit tool enforces this.
  2. Edit over Write for existing files. Edit is surgical and shows diffs. Write is a full replacement — use it only for new files or complete rewrites.
  3. Glob over Bash for file search. Glob is optimized for pattern matching. Only fall back to fd or find for queries Glob cannot express (size filters, date filters).
  4. Grep over Bash for content search. Grep is optimized for ripgrep-based search with proper permissions. Never use grep or rg via Bash.
  5. Parallel reads for multiple files. Issue all Read calls in a single response for concurrent execution.
  6. Always use absolute paths. Claude Code tools require absolute paths. Never pass relative paths to Read, Write, or Edit.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.37%
按下载量换算110

Claude

28.65%
按下载量换算94

Cursor

18.67%
按下载量换算61

Gemini CLI

9.45%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills