less
Files
SKILL.mdagentsreferencesscripts
Install
Install the containing plugin
/plugin install shared-skills@llm-skills
Invoke this skill after installation
/shared-skills:less
This skill is bundled inside shared-skills. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-shared-skills.
SKILL.md
name: less description: Paginate and search text files interactively. Use when the agent needs to search, filter, or transform data efficiently.
Less
Paginate and search text files interactively
Prerequisite Check
Run this before choosing an interactive pager workflow:
command -v less >/dev/null 2>&1 || less --version
If less is missing, switch to non-interactive fallbacks such as head, tail, or sed -n, and note that search/navigation will be more limited.
Quick Start
- Verify
lessis available:less --versionorman less - Establish the command surface:
man lessorless --help - Start with basic usage:
less [options] [input]
Intent Router
references/install-and-setup.md— Installing lessreferences/cheatsheet.md— Common options and patternsreferences/advanced-usage.md— Advanced techniquesreferences/troubleshooting.md— Common errors and solutions
Core Workflow
- Verify less is available:
less --version - Test with sample data first
- Validate output before batch processing
- Document exact commands for reproducibility
Quick Command Reference
less --version # Check version
less --help # Show help
less [options] [input] # Basic usage
man less # Full manual
# Open a file with line numbers and quit if it fits on one screen
less -N -F build.log
# Fallbacks when less is unavailable
head -n 40 build.log
sed -n '120,180p' build.log
tail -n 40 build.log
Safety Notes
| Area | Guardrail |
|---|---|
| Input validation | Verify input data format before processing. |
| Output handling | Validate output structure. |
| Large files | Test with smaller samples first. |
Recovery note: when less is unavailable, explain that paging/search commands like /pattern and n will not work. Use sed -n for exact ranges and grep -n to locate lines first.
Source Policy
- Treat installed behavior and man page as truth.
Resource Index
scripts/install.sh— Install on macOS or Linux.scripts/install.ps1— Install on Windows or any platform.