file-reader
GitHub用于读取、预览和总结本地文本文件(如代码、配置、日志、数据及纯文本)。通过类型检测选择工具,支持大文件分段读取与摘要生成。不处理PDF、图片等多媒体格式。
触发场景
安装
npx skills add ymx10086/ResearchClaw --skill file-reader -g -y
SKILL.md
Frontmatter
{
"name": "file-reader",
"emoji": "📄",
"requires": [],
"description": "Read, preview, and summarize text-based files — source code, configs, logs, data files, and plain text documents. Use when the user asks to read, inspect, or summarize local .txt, .md, .json, .yaml, .csv, .log, or source code files."
}
File Reader Toolbox
Use this skill when the user asks to read or summarize local text-based files. PDFs, Office documents, images, audio, and video are out of scope for this skill and should be handled by their dedicated skills/tools.
Quick Type Check
Use a type probe before reading:
file -b --mime-type "/path/to/file"
If the file is large, avoid dumping the whole content; extract a small, relevant portion and summarize.
Text-Based Files (use read_file)
Preferred for: .txt, .md, .json, .yaml/.yml, .csv/.tsv, .log, .sql, ini, toml, py, js, html, xml source code.
Steps:
- Use
read_fileto fetch content. - Summarize key sections or show the relevant slice requested by the user.
- For JSON/YAML, list top-level keys and important fields.
- For CSV/TSV, show header + first few rows, then summarize columns.
Large Logs
If the file is huge, use a tail window:
tail -n 200 "/path/to/file.log"
Summarize the last errors/warnings and notable patterns.
Out of Scope
Do not handle the following in this skill (they are covered by other skills):
- Office (docx/xlsx/pptx)
- Images
- Audio/Video
Safety and Behavior
- Never execute untrusted files.
- Prefer reading the smallest portion necessary.
- If a tool is missing, explain the limitation and ask the user for an alternate format.
版本历史
- 1baaa92 当前 2026-07-25 05:32


