File Reader logo

File Reader

CommunityPopular
mateaix
file_reader

读取与摘要文本类文件(txt、md、json、yaml、csv、log、代码文件等)。PDF 与 Office 文件由专用技能处理。

Overview

Publishermateaix
Repositorymateclaw
Skill namefile_reader
Stars
1.1K
Forks
337
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mateaix on GitHub. Read the source before you install it.

Installation

Install the File Reader AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mateaix/mateclaw/tree/dev/mateclaw-server/src/main/resources/skills/file_reader
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mateaix/mateclaw.git /tmp/mateclaw
mkdir -p .claude/skills
cp -r /tmp/mateclaw/mateclaw-server/src/main/resources/skills/file_reader .claude/skills/file_reader
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable File Reader in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads File Reader on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so File Reader is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

文件读取

当用户要求读取或摘要本地文本文件时使用本技能。

不在范围内: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\"")

跨平台路径注意事项

  • Windows:路径使用反斜杠 \ 或正斜杠 / 均可,但含空格时须加引号
  • macOS / Linux:使用正斜杠 /,含空格时须加引号或转义

安全规范

  • 只读取文件,不执行其内容
  • 优先读取所需的最小部分,避免加载超大文件到上下文
  • 如文件包含敏感信息(密码、密钥),提醒用户注意但不拒绝读取

Frequently asked questions

What does the File Reader AI skill do?

读取与摘要文本类文件(txt、md、json、yaml、csv、log、代码文件等)。PDF 与 Office 文件由专用技能处理。

Why use File Reader on TypingMind?

Because you install it once and use it with any model. File Reader is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install File Reader in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mateaix/mateclaw/tree/dev/mateclaw-server/src/main/resources/skills/file_reader. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use File Reader?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with File Reader?

As many as you like. As long as a model supports skills, you can use File Reader with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the File Reader AI skill free?

Yes. It is published on GitHub by mateaix under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇