file_reader SKILL.md skillA
file_reader from mateaix/mateclaw is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add mateaix/mateclaw/file_reader@v1.2.0Pins v1.2.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- mateaix/mateclaw
- Path
mateclaw-server/src/main/resources/skills/file_reader/SKILL.md- Versions recorded
- 1
- Latest version
- v1.2.0, committed Apr 23, 2026
- Size
- 2,456 bytes
- Repository stars
- 1,185
- License
- Apache-2.0
读取与摘要文本类文件(txt、md、json、yaml、csv、log、代码文件等)。PDF 与 Office 文件由专用技能处理。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 文件读取 当用户要求读取或摘要本地文本文件时使用本技能。 **不在范围内**:PDF、Word (.docx)、Excel (.xlsx)、PPT (.pptx)、图片、音视频 — 这些由专用技能处理。 ## 工作流程 ### 第一步:类型探测(可选) 不确定文件类型时,先探测: **macOS / Linux:** ``` execute_shell_command(command="file -b --mime-type \"/path/to/file\"") ``` **Windows:** ``` execute_shell_command(command="cmd /c \"echo %~x1\" & exit", timeoutSeconds=10) ``` 或直接根据扩展名判断。 ### 第二步:读取文件 ``` read_file(filePath="/absolute/or/relative/path/to/file.txt") ``` 读取特定行范围(大文件时): ``` read_file(filePath="/path/to/large.log", startLine=1, endLine=200) ``` ### 第三步:处理内容 根据文件类型采用对应策略: | 类型 | 处理方式 | |------|---------| | `.txt` / `.md` | 直接摘要或按用户需求处理 | | `.json` / `.yaml` | 先列出顶层键,再展开用户关注的字段 | | `.csv` / `.tsv` | 展示表头 + 前 5 行,再描述各列含义和数据规模 | | `.log` | 读取最后 200 行,聚焦错误/警告模式 | | 源代码 | 说明文件作用,摘要核心逻辑,不逐行复述 | ## 大文件策略 文件超过 500 行时分段读取: ``` # 先读前 100 行了解结构 read_file(filePath="/path/to/big.log", startLine=1, endLine=100) # 再读末尾 200 行看最新内容 read_file(filePath="/path/to/big.log", startLine=-200) ``` 日志文件也可用系统命令读取末尾: **macOS / Linux:** ``` execute_shell_command(command="tail -n 200 \"/path/to/file.log\"") ``` **Windows:** ``` execute_shell_command(command="powershell Get-Content -Tail 200 \"/path/to/file.log\"") …
Read the whole file at its exact version.
How to install
mdr add mateaix/mateclaw/file_reader@sha256:e876c30cdfa22532The line at the top of this page pins the label v1.2.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_m2ihoooupze2shzt)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Apr 23, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (2456 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
mateaix/mateclaw · 1,185 stars · license Apache-2.0 · pushed 2026-11-05 · branch dev
API
GET https://markdownregistry.com/api/v1/artifacts/art_m2ihoooupze2shzt GET https://markdownregistry.com/api/v1/resolve?ref=mateaix/mateclaw/file_reader GET https://markdownregistry.com/api/v1/blob/e876c30cdfa225327300abab56dfbe2cf4488a6d9b5873f561b46fd0beb883f5
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.