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.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "wc-lines-tool" with this command: npx skills add dinghaibin/wc-lines-tool

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\nline2\nline3"

# 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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

X Analytics CLI

X (Twitter) analytics and data retrieval via x-analytics-cli. Use when the user wants to search tweets, count tweet volumes, look up user profiles, get tweet...

Registry SourceRecently Updated
Coding

BimDown

A bridge between AI and building data. Read & create BIM exactly like writing code. Execute architectural design, or just model your own house!

Registry SourceRecently Updated
Coding

OpenCode Game Builder

Spawn OpenCode as an ACP (Agent Client Protocol) subagent for complex coding tasks. Use when building games, web apps, multi-file projects, or when the user...

Registry SourceRecently Updated
Coding

X Ads CLI

X Ads data analysis and reporting via x-ads-cli. Use when the user wants to check X/Twitter ad performance, pull campaign/line item/promoted tweet stats, exp...

Registry SourceRecently Updated