mcpField
F
file_reader

file_reader

github.com/agentscope-aiDocuments36.7k59 installsUpdated today
Repository

About file_reader

A skill for reading and summarizing local text-based files, intended for requests involving source text and structured data. It checks file types first and avoids dumping large files; PDFs, Office documents, media, and images are out of scope.

Key features

  1. 01Text-file reading and summarization
  2. 02File type probing
  3. 03Focused extraction for large files
  4. 04Structured data overview
  5. 05Untrusted file safety guidance

Use cases

  1. 01Summarizing a local Markdown or log file
  2. 02Reviewing key fields in JSON or YAML
  3. 03Inspecting CSV headers and sample rows

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/agentscope-ai/qwenpaw --skill file_reader

After installing, type/file_readerin Claude Code to confirm it loaded.

Details

From the project README

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:

  1. Use read_file to fetch content.
  2. Summarize key sections or show the relevant slice requested by the user.
  3. For JSON/YAML, list top-level keys and important fields.
  4. 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):

  • PDF
  • 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.

Comments

Markdown supported