Other v1.0.0

17-read-optimizer

SKILL: Read Optimizer (read-optimizer) Description Optimizes file reading operations by providing smarter read...

autogame 更新于 2026-02-17 1 浏览
下载 SKILL

技能说明

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 + Ta

使用场景

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 + Ta

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/17-read-optimizer
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

5 个文件 · 17 kB
SKILL.md text/markdown
# 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.
```bash
node skills/read-optimizer/index.js --file <path> --mode smart --lines 100
```

### Grep Read (Focus)
Reads lines matching a pattern (regex supported).
```bash
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).
```bash
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).

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。