text

Analyze text files with bash utilities for statistics, pattern searches, and word frequencies.

609|42|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/vercel-labs/bash-tool --skill text
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: text
Source: https://github.com/vercel-labs/bash-tool/tree/main/examples/skills-tool/skills/text
Command: npx skills add https://github.com/vercel-labs/bash-tool --skill text

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a set of Bash-based text processing tools to analyze and transform plain text files, helping you extract insights directly in the terminal.

Core Features & Use Cases

  • Statistics: Compute lines, words, and characters; display first/last lines.
  • Pattern Search: Find patterns with optional context and simple counts.
  • Extraction: Extract specific line ranges or sections using line numbers or pattern boundaries.
  • Word Frequency: Count and rank word frequencies in a file for quick content analysis.

Quick Start

Use the following commands to quickly analyze a file:

  • Get file statistics: bash /skills/text/scripts/stats.sh document.txt
  • Search for a pattern with line context: bash /skills/text/scripts/search.sh log.txt "ERROR" --context 2
  • Extract lines 10-20: bash /skills/text/scripts/extract.sh file.txt --lines 10-20
  • Show word frequencies: bash /skills/text/scripts/wordfreq.sh article.txt --top 10

Frequently Asked Questions about text

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I count lines, words, and characters in a text file?

Text file statistics like line counts, word counts, and character totals can be computed using bash utilities. This Skill provides a stats script that uses standard Unix tools to display these metrics plus first and last lines from any document.

How do I search for patterns in log files with surrounding context?

Pattern search in text files works by matching strings and displaying matching lines with optional context. This Skill's search script finds patterns like ERROR or WARNING in logs and shows adjacent lines to help diagnose issues.

Can I extract specific line ranges from a large text file?

Extracting line ranges from text files is possible using line numbers or pattern boundaries. This Skill provides extraction scripts that pull targeted sections without loading entire files into memory.

What's the best way to analyze word frequency in a document?

Word frequency analysis identifies the most common terms in text by counting occurrences and ranking them. This Skill includes a wordfreq script that counts and sorts word frequencies, letting you quickly understand content themes.

Do I need specialized tools to process plain text files in the terminal?

Text processing in the terminal requires only standard Unix utilities like grep, sed, awk, and wc—no additional software. This Skill bundles bash scripts that combine these tools to handle statistics, searching, extraction, and frequency analysis.