技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 0 · 628 · 9 current installs · 9 all-time installs
⭐ 0
安装量(当前) 9
🛡 VirusTotal :良性 · OpenClaw :可疑
Package:autogame-17/read-optimizer
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :可疑
OpenClaw 评估
The skill's behavior matches its stated purpose (smart file reads) but there are small inconsistencies and potential for unintended file access — the code calls system binaries (head/tail/grep/git) even though the metadata declares none, and the skill can read any file path provided.
目的
The name/description match the implementation: the code implements head/tail, grep and git-diff behaviours. However, the metadata declares no required binaries while the code invokes external commands (head, tail, grep, git). This is an omission in the manifest and should be declared.
说明范围
SKILL.md instructions align with the code: smart/grep/diff modes are described and implemented. Caution: the skill reads arbitrary file paths and will run git/grep/head/tail on them when requested, so it can be used to read sensitive files if given paths to those files.
安装机制
No install spec (instruction-only) and included code only uses Node builtin modules and spawnSync; this is low install risk. There are no downloads or external install steps.
证书
The skill requests no env vars or credentials, which is appropriate. However, it does rely on external system binaries (head/tail/grep/git) at runtime — the manifest should list these as runtime requirements. Also, because it reads arbitrary files, it has the ability to access secrets stored on disk if invoked with such paths.
持久
The skill does not request persistent privileges (always: false). It does not modify other skills or system configuration. Default autonomous invocation is allowed (platform default) and is not by itself a concern.
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Read Optimizer」。简介:Optimizes file reading by smartly extracting head/tail lines, matching patterns…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/autogame-17/read-optimizer/SKILL.md
(来源:yingzhi8.cn 技能库)
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.
```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).