← 返回 Skills 市场
18
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install wc-lines-tool
功能描述
Count lines, blank lines, code lines, and comment lines in text files. Useful for code statistics, log file sizing, and document analysis.
使用说明 (SKILL.md)
WC Lines Tool — Line Counting Utility
Count lines in text input with smart detection of blank lines, code lines, comment lines, and non-empty content. Ideal for codebases, log analysis, and document statistics.
Quick Start
# Count lines in a string
wc-lines-tool "line1\
line2\
line3"
# Count lines from stdin
cat README.md | wc-lines-tool
# Count lines in a file
wc-lines-tool --file log.txt
Usage
wc-lines-tool [TEXT] [OPTIONS]
wc-lines-tool --file FILE [OPTIONS]
Options:
--file FILE Read from file instead of argument
--non-blank Count only non-empty lines
--blank Count only blank/empty lines
--code Count lines likely containing code (non-comment, non-blank)
--max N Report if line count exceeds N (exit 1 if over)
--min N Report if line count is below N (exit 1 if under)
--json Output as structured JSON
Examples
# Total line count
wc-lines-tool --file server.log
# Non-blank lines only
wc-lines-tool --file app.py --non-blank
# Blank line count
wc-lines-tool --file main.go --blank
# Check log file size threshold (alert if > 10000 lines)
wc-lines-tool --file errors.log --max 10000
# Machine-readable output
wc-lines-tool --file data.csv --json
Features
- Line counting — total, blank, non-blank, code
- File, stdin, and argument input — flexible sources
- Threshold alerts — --min/--max with exit codes for CI/CD
- JSON output — pipeline-friendly
- Fast — handles large files efficiently
- UTF-8 safe — handles arbitrary encodings
安全使用建议
This appears safe to use for basic line counting, but it may not work as documented because the included script only reads stdin and lacks the advertised command-line options.
能力评估
Purpose & Capability
The stated purpose is coherent and low-risk, but the included script only counts stdin lines and does not implement the documented --file, --json, --blank, --code, --min, or --max options.
Instruction Scope
Instructions are limited to user-directed line-counting examples for provided text, stdin, or selected files.
Install Mechanism
There is no install spec and no declared wc-lines-tool binary, so the documented command may not be available as written; this is a functionality/provenance limitation rather than a security concern.
Credentials
Reading text or a user-selected file is proportionate for a line-counting tool, and no credentials, environment variables, network access, or broad filesystem access are requested.
Persistence & Privilege
No persistence, background execution, privilege escalation, account access, or local state modification is shown.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install wc-lines-tool - 安装完成后,直接呼叫该 Skill 的名称或使用
/wc-lines-tool触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
常见问题
Wc Lines Tool 是什么?
Count lines, blank lines, code lines, and comment lines in text files. Useful for code statistics, log file sizing, and document analysis. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 18 次。
如何安装 Wc Lines Tool?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install wc-lines-tool」即可一键安装,无需额外配置。
Wc Lines Tool 是免费的吗?
是的,Wc Lines Tool 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Wc Lines Tool 支持哪些平台?
Wc Lines Tool 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Wc Lines Tool?
由 BIN(@dinghaibin)开发并维护,当前版本 v1.0.0。
推荐 Skills