file_reader

file_reader is a skill for Claude Code, Codex from mateaix/mateclaw. It costs 36 tokens per session (697 once invoked), scanned A, original, Apache-2.0.

A guide for reading and summarising local text-based files, including plain text, Markdown, JSON, YAML, CSV, logs, and source code. PDF and Office files are outside its stated scope.

In plain words
What is it for?
Use it when you need to read, inspect, or summarise local text files, configuration data, logs, or code.
Why use it?
It gives large or unfamiliar text files a consistent reading process and focuses summaries on structure, important lines, errors, or core logic.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when you need to read, inspect, or summarise local text files, configuration data, logs, or code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mateaix/mateclaw/file_reader
About the project

MateClaw is a pluggable agent runtime that coordinates AI agents, tools, conversations, memory, and workflows. It is designed for personal and multi-user AI assistants, including agents used through chat platforms. Catalogue add-ons provide skills for extending its agent workflows.

mateaix/mateclaw · 1,218 stars · on GitHub · claw.mate.vip

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mateaix/mateclaw --skill file_reader
Clone the repo
git clone --depth 1 https://github.com/mateaix/mateclaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for file_reader

README.md
[![agentmods](https://agentmods.dev/badge/skills/mateaix/mateclaw/file_reader/github.svg)](https://agentmods.dev/skills/mateaix/mateclaw/file_reader)
Your own site
<a href="https://agentmods.dev/skills/mateaix/mateclaw/file_reader"><img src="https://agentmods.dev/badge/skills/mateaix/mateclaw/file_reader/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for file_reader

Your own site · 80×15
<a href="https://agentmods.dev/skills/mateaix/mateclaw/file_reader"><img src="https://agentmods.dev/badge/skills/mateaix/mateclaw/file_reader.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 697 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00697
Opus 5.5 $0.00014 $0.00279
Sonnet 5.5 $0.00007 $0.00139
Haiku 4.5 $0.00004 $0.00070

Measured 3mo ago against content hash e876c30cdfa2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

file_reader scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

mateclaw-server/src/main/resources/skills/file_reader/SKILL.md · 91 lines

What it actually 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\"")

跨平台路径注意事项

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

安全规范

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

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 91 lines · 36 tokens per session scan A e876c30cdfa2

Subscribe to this mod's changes

file_reader is a skill published in the GitHub repository mateaix/mateclaw (1,218 stars, last pushed today), licensed Apache-2.0. It adds 36 tokens to every session and 697 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

file_reader compared with skills from other repositories

file_reader next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
file_readermateaix/mateclawSkill1.2ktodayApache-2.0A36Claude Code, Codex
appjd-opensource/JoySafeterSkill3181mo agoApache-2.0A0Claude Code, Codex
openclaw-security-checkerjd-opensource/JoySafeterSkill3181mo agoApache-2.0A39Claude Code, Codex
pentest-whitebox-code-reviewjd-opensource/JoySafeterSkill3181mo agoApache-2.0A36Claude Code, Codex
pentest-api-deepjd-opensource/JoySafeterSkill3181mo agoApache-2.0A43Claude Code, Codex
pentest-business-logicjd-opensource/JoySafeterSkill3181mo agoApache-2.0A34Claude Code, Codex
seclens-enterprise-webjd-opensource/JoySafeterSkill3181mo agoApache-2.0A23Claude Code, Codex