Use when unsure about command syntax, options, or behavior, or when the user asks to "check the man page", "look up the manual", or "what does [command] do". Consult system man pages for accurate, version-specific documentation.
Consult system man pages for accurate command syntax and behavior when you're unsure about options or the user asks to check documentation. Use `mancat` to search keywords or fetch specific sections like SYNOPSIS or OPTIONS, avoiding full page dumps.
/plugin marketplace add pproenca/dot-claude-old/plugin install shell@dot-claudeThis skill is limited to using the following tools:
mancat.shConsult system manual pages for accurate command documentation. Prefer man pages over training data when precision matters.
CRITICAL: Never run bare man <command> - it opens an interactive pager that hangs.
Follow these rules to avoid flooding your context window:
mancat -k <keyword>mancat tool strips formatting codes; raw control characters are handledWhen you don't know which command to use:
# CLAUDE_PLUGIN_ROOT is set automatically by Claude Code plugins
MANCAT="${CLAUDE_PLUGIN_ROOT}/skills/man/mancat.sh"
"$MANCAT" -k compress # Returns: gzip, bzip2, tar, zip with descriptions
"$MANCAT" -k "file system"
When you know the command but need exact argument order:
"$MANCAT" -s SYNOPSIS tar
# Output: tar [-] A --catenate --concatenate | c --create | d --diff ...
When you need to understand a specific option:
"$MANCAT" -s OPTIONS tar
# Or for a specific flag:
"$MANCAT" tar | grep -A5 -- '-z'
# Use the mancat helper (recommended)
"${CLAUDE_PLUGIN_ROOT}/skills/man/mancat.sh" ls
# Or pipe through col -b
man ls | col -b
Use the included mancat.sh for convenient non-interactive access:
MANCAT="${CLAUDE_PLUGIN_ROOT}/skills/man/mancat.sh"
"$MANCAT" ls # Full man page, clean output
"$MANCAT" passwd 5 # Section 5 (file formats)
"$MANCAT" -s OPTIONS tar # Extract just OPTIONS section
"$MANCAT" -k compress # Search descriptions (apropos)
Use these raw patterns when mancat.sh is unavailable or when piping to tools like grep/sed:
man <command> | col -b
The col -b filter strips backspace formatting codes, producing clean plain text.
Alternatives:
PAGER=cat man <command> # Force no pager (may include escape codes)
man <command> | cat # Simple but less clean on some systems
Full man pages waste context. Use targeted extraction with grep/sed:
man tar | col -b | grep -A5 -- '-z'
man curl | col -b | grep -A8 -- '--data'
# SYNOPSIS section
man ls | col -b | sed -n '/^SYNOPSIS/,/^[A-Z]/p' | head -20
# OPTIONS section (first 50 lines)
man curl | col -b | sed -n '/^OPTIONS/,/^[A-Z]/p' | head -50
# EXAMPLES section
man rsync | col -b | sed -n '/^EXAMPLES/,/^[A-Z]/p'
Always limit long pages:
man bash | col -b | head -100
man git-rebase | col -b | head -150
man -k <keyword> # Search names and descriptions
man -k compress | head -10 # Find compression tools
man -k "file system" # Search phrase
man -f tar
# tar (1) - manipulate tape archives
man -w grep >/dev/null 2>&1 && echo "has man page"
man -w ls
# /usr/share/man/man1/ls.1
| Section | Content |
|---|---|
| 1 | User commands |
| 2 | System calls |
| 3 | Library functions |
| 4 | Special files (/dev) |
| 5 | File formats (/etc/passwd) |
| 6 | Games |
| 7 | Miscellaneous (protocols, conventions) |
| 8 | System administration commands |
Specify section when a name exists in multiple:
man 1 printf | col -b # Shell command
man 3 printf | col -b # C library function
man 5 crontab | col -b # File format
man 8 cron | col -b # Daemon
SYNOPSIS - Command syntax. [] = optional, ... = repeatable.
OPTIONS - Flag descriptions with exact syntax.
EXAMPLES - Working command examples (not all pages have these).
SEE ALSO - Related commands worth checking.
ls, find, tar) - Options vary by OSman 5 sudoers) - Syntax documentationman git-rebase) - Full option referenceman curl, man ssh) - Protocol-specific flags