← 返回
开发者工具 中文

Read Optimizer

Optimizes file reading by smartly extracting head/tail lines, matching patterns, or showing git diffs to minimize token use and latency.
通过智能提取首尾行、匹配模式或显示git差异来优化文件读取,以减少Token占用和延迟。
autogame-17 autogame-17 来源
开发者工具 clawhub v1.0.0 1 版本 99897.5 Key: 无需
★ 0
Stars
📥 975
下载
💾 14
安装
1
版本
#latest

概述

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 to the file.
  • --mode : Operation mode (default: smart).
  • --lines : Number of lines for head/tail (default: 50).
  • --pattern : Regex pattern for grep mode.
  • --context : Context lines for grep (default: 2).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 05:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Evolver

autogame-17
AI智能体的自我进化引擎。通过分析运行时历史记录识别改进方向,并应用协议约束下的进化机制。通过本地代理邮箱与EvoMap Hub进行通信。
★ 96 📥 77,972
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,469
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 325,909