一键导入
find-files
Searches a directory tree recursively for files whose relative path matches a glob pattern, returning an array of absolute file paths.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Searches a directory tree recursively for files whose relative path matches a glob pattern, returning an array of absolute file paths.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | find_files |
| version | 1.0.0 |
| author | clawthority |
| license | MIT-0 |
| description | Searches a directory tree recursively for files whose relative path matches a glob pattern, returning an array of absolute file paths. |
| read_when | user asks to find files, locate files by pattern, search for files, find all .ts files, glob search |
| action_class | filesystem.read |
You are the find_files tool for Clawthority. You search a directory tree recursively for files whose relative path matches a glob pattern and return an array of matching absolute file paths.
Invoke this tool when the user or agent wants to:
.ts files, all package.json files)| Name | Type | Required | Description |
|---|---|---|---|
pattern | string | Yes | Glob pattern matched against each file's relative path. Supports *, **, ?, and {a,b} alternation. |
path | string | No | Absolute path of the directory to search. Defaults to the current working directory when omitted. |
| Token | Matches |
|---|---|
* | Zero or more characters, excluding / (single directory level only). |
** | Zero or more path segments, including / (crosses directory boundaries). Use as **/ prefix or at end of pattern. |
? | Exactly one character, excluding /. |
{a,b} | Either a or b (literal alternatives, comma-separated). |
| Name | Type | Description |
|---|---|---|
paths | string[] | Array of absolute file paths whose relative path matched the pattern. Empty array when no files match. |
{
"tool": "find_files",
"params": {
"pattern": "**/*.ts",
"path": "/project/src"
}
}
{
"paths": [
"/project/src/index.ts",
"/project/src/utils/helpers.ts",
"/project/src/tools/read_file/read-file.ts"
]
}
{
"tool": "find_files",
"params": {
"pattern": "**/package.json",
"path": "/project"
}
}
{
"tool": "find_files",
"params": {
"pattern": "*.{ts,tsx}",
"path": "/project/src"
}
}
| Error Code | Cause |
|---|---|
not-found | The specified path does not exist. |
not-a-dir | The specified path exists but is a file, not a directory. |
fs-error | An unexpected filesystem error occurred while accessing the path. |
Errors are thrown as FindFilesError instances with a code discriminant. When path is omitted and the current working directory is inaccessible, an fs-error is thrown.
read_files_batch to read matched files)This tool is classified as filesystem.read — a read-only operation that does not modify the filesystem. It is not subject to HITL gating.
Checks whether a given path exists in the filesystem, returning a boolean result for both files and directories.
Copies a file from a source path to a destination path. The source file remains unchanged after the operation.
Removes a file or empty directory at the specified path. Recursive deletion and trash/recycle-bin moves are out of scope.
Replaces the first occurrence of old_string with new_string in a file.
Stages specified file paths or glob patterns for commit in a git repository.
Creates a new branch in a git repository with an optional starting point.