AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Cli Bat

skill-ryankolean-summit-claude-skills-cli-bat · by ryankolean

>

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add skill-ryankolean-summit-claude-skills-cli-bat

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ryankolean-summit-claude-skills-cli-bat)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Cli Bat? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

bat — cat with Syntax Highlighting

Repo: https://github.com/sharkdp/bat

A cat clone with syntax highlighting, Git integration, line numbers, and automatic paging. Drop-in replacement for cat with a much better reading experience for source code, configs, and diffs.

When to Activate

Manual triggers:

  • "How do I use bat?"
  • "Syntax highlight a file in the terminal"
  • "Better cat / better less"
  • "View a file with line numbers"

Auto-detect triggers:

  • User wants to view source files with highlighting in the terminal
  • User is building fzf previews that need syntax highlighting
  • User wants to use bat as a pager for man pages or git diff
  • User wants to inspect non-printable characters in a file
  • User wants to view only a range of lines from a large file

Key Commands

Basic Usage

bat file.py                      # View file with syntax highlighting + line numbers
bat file1.py file2.py            # View multiple files
bat -l json file.txt             # Force language (json, python, yaml, etc.)
bat -n file.py                   # Show line numbers only (no decorations)
bat -A file.py                   # Show non-printable chars (tabs, spaces, newlines)
bat -p file.py                   # Plain output (no line numbers, no header, no pager)
bat --diff file.py               # Show only lines changed vs Git (requires git repo)
bat -r 10:50 file.py             # Show only lines 10–50
bat -r 10: file.py               # Show from line 10 to end
bat -r :50 file.py               # Show first 50 lines
bat --list-languages             # List all supported languages
bat --list-themes                # List all available themes

Output Control

bat -P file.py                   # Disable pager (print directly, like cat)
bat --paging=never file.py       # Same as -P
bat --paging=always file.py      # Always use pager even for short files
bat --wrap=never file.py         # No line wrapping (scroll horizontally)
bat --tabs 4 file.py             # Set tab width to 4 spaces
bat --style=plain file.py        # No line numbers, no Git marks, no header
bat --style=numbers,header file.py  # Only specific decorations

Theming

bat --theme=TwoDark file.py      # Use a specific theme
bat --theme=ansi file.py         # ANSI colors (good for light/dark compatibility)
bat --theme=GitHub file.py       # GitHub-style theme
BAT_THEME="TwoDark" bat file.py  # Set via env var (put in .bashrc/.zshrc)
bat --list-themes | fzf          # Interactively preview themes

Advanced Patterns

Use bat as MANPAGER

# In ~/.bashrc or ~/.zshrc:
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"

# Now man pages render with bat's syntax highlighting:
man ls
man grep

Use bat as Git Diff Pager

# Preview staged/unstaged changes with syntax highlighting:
git diff | bat --language=diff
git diff HEAD | bat -l diff --style=plain

# Set bat as the default git pager:
git config --global core.pager "bat --style=plain"
# Or just for diff:
git config --global pager.diff "bat"
git config --global pager.log "bat"

fzf Preview Integration

# Use bat for syntax-highlighted file previews in fzf:
fzf --preview 'bat --color=always {}'

# With line-range preview centered on a match (for rg output):
rg --line-number '' | fzf \
  --delimiter ':' \
  --preview 'bat --color=always --highlight-line {2} {1}' \
  --preview-window 'up,60%,border-bottom,+{2}+3/3'

# Open the selected file at the matching line in $EDITOR:
rg --line-number '' | fzf \
  --delimiter ':' \
  --preview 'bat --color=always --highlight-line {2} {1}' | \
  awk -F: '{print "+"$2" "$1}' | xargs $EDITOR

Piping from curl / Remote Files

# View an API response with JSON highlighting:
curl -s https://api.example.com/data | bat -l json

# Highlight a shell script fetched from remote:
curl -s https://raw.githubusercontent.com/.../script.sh | bat -l sh

# View a local response body saved to file:
http GET api.example.com/endpoint | bat -l json

Custom Themes

# Theme files go in bat's config dir:
bat --config-dir        # Shows path (e.g., ~/.config/bat)
mkdir -p $(bat --config-dir)/themes

# Drop .tmTheme or .sublime-color-scheme files there, then:
bat cache --build       # Rebuild theme cache

# Use your custom theme:
bat --theme=MyTheme file.py

bat Config File

# ~/.config/bat/config
--theme=TwoDark
--style=numbers,changes,header
--paging=auto
--map-syntax "*.conf:INI"
--map-syntax "*.env:Dotenv"
--map-syntax "Dockerfile*:Dockerfile"

Show Non-Printable Characters

bat -A file.txt      # Tabs shown as ^I, line endings as $, spaces as ·
bat -A *.sh          # Good for spotting Windows line endings (CRLF)

Practical Examples

Daily Workflows

# Quick syntax-highlighted view of any config:
bat ~/.ssh/config
bat /etc/hosts
bat package.json

# Preview last 20 lines of a log:
bat -r -20: app.log

# Compare two files side-by-side (combine with diff):
diff <(bat -p file1.py) <(bat -p file2.py)

# View a range and pipe to clipboard:
bat -r 10:30 -p main.py | pbcopy

Aliases (add to .bashrc/.zshrc)

alias cat='bat --paging=never'     # Replace cat with bat
alias catp='bat -p --paging=never' # bat with no decorations (truly cat-like)
alias batn='bat -n'                # Line numbers only
alias bata='bat -A'                # Show non-printable chars

Chaining with Other Skills

  • fzf (cli-fzf): Use --preview 'bat --color=always {}' to get syntax-highlighted previews inside any fzf selection UI
  • fd (cli-fd): fd -e py | xargs bat to view all Python files with highlighting; fd -e md | fzf --preview 'bat --color=always {}' for interactive selection
  • ripgrep (cli-ripgrep): Combine rg's line-number output with bat's --highlight-line for pinpoint preview of search matches
  • git: Set core.pager=bat or pager.diff=bat for syntax-highlighted git output across all git commands

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.