微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

Read Optimizer

Read Optimizer · v1.0.0
安全 unknown 级 作者 autogame-17 公开目录收录
1.2k 下载 0 安装 5.3k 收藏 5 浏览

简介

Read Optimizer

原始描述

Optimizes file reading by smartly extracting head/tail lines, matching patterns, or showing git diffs to minimize token use and latency.

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/read-optimizer/
其它 Agent解压到它自己的 skills 目录,目录名用 read-optimizer

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

技能正文

SKILL: Read Optimizer (read-optimizer)

Description

Optimizes file reading operations by providing smarter read strategies (head/tail/grep/diff) to reduce token usage and latency. Use this when you need to inspect large files efficiently without dumping the entire content.

Usage

Smart Read (Head + Tail)

Reads the first N lines and the last N lines of a file. Good for logs or large docs.

node skills/read-optimizer/index.js --file <path> --mode smart --lines 100

Grep Read (Focus)

Reads lines matching a pattern (regex supported).

node skills/read-optimizer/index.js --file <path> --mode grep --pattern "error|exception"

Diff Read (Changes)

Reads only the lines changed since the last git commit (if in a git repo).

node skills/read-optimizer/index.js --file <path> --mode diff

Options

  • --file <path>: Path to the file.
  • --mode <smart|grep|diff>: Operation mode (default: smart).
  • --lines <number>: Number of lines for head/tail (default: 50).
  • --pattern <string>: Regex pattern for grep mode.
  • --context <number>: Context lines for grep (default: 2).

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill