跳到正文
TakoAPI
返回技能列表

read-optimizer

由 autogame-17 提供

Git & GitHub
544下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Optimizes file reading operations by providing smarter read strategies (head/tail/grep/diff) to reduce token usage.

描述

该技能的功能

Provides smarter file reading strategies using head/tail, grep, and git diff to inspect large files without loading their full contents. Reduces token usage and latency when working with logs, large documents, or recently changed files.

Reading only the relevant portion of a file instead of its full contents cuts token consumption and speeds up inspection when files are too large to load whole.

何时使用

  • Scanning a large log file for error and exception lines
  • Reviewing only lines changed since the last git commit
  • Extracting config values matching a specific pattern
  • Previewing the start and end of a large data export
  • Narrowing down stack traces in lengthy application output

示例工作流

输入

User asks: find all error and exception lines in /var/log/app.log

智能体
  1. 1

    Identify the target file path from the user request

  2. 2

    Run grep mode with pattern "error|exception"

  3. 3

    Apply 2-line context around each match

  4. 4

    Return the filtered lines to the user

输出

A list of lines containing 'error' or 'exception' with surrounding context

安装

clawhub install autogame-17/read-optimizer

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接