跳到正文
TakoAPI
返回技能列表

bat-cat

由 arnarsson 提供

Git & GitHub
2.5k下载量由 clawskills.sh 提供
1星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

A cat clone with syntax highlighting, line numbers, and Git integration.

描述

该技能的功能

bat is a command-line file viewer that replaces cat with syntax highlighting, line numbers, and Git change markers. It auto-detects file types, supports themes, and can display specific line ranges. Works as a drop-in cat replacement or as a terminal pager.

Unlike cat, bat adds syntax highlighting, Git change indicators, and line numbers by default, making files readable in the terminal without opening an editor.

何时使用

  • Inspecting a config file before editing it
  • Reading log files with colored syntax output
  • Previewing files inside fzf with syntax highlighting
  • Checking Git modifications while viewing a file

示例工作流

输入

User asks: show me lines 45-67 of script.py with Git changes visible

智能体
  1. 1

    Run bat with -r 45:67 to select the line range

  2. 2

    Add --diff flag to show Git modification markers

  3. 3

    bat auto-detects Python syntax from the file extension

  4. 4

    Terminal renders the output with highlighting and change markers

输出

Lines 45-67 of script.py displayed with Python syntax highlighting and Git change indicators marking added and modified lines

安装

clawhub install arnarsson/bat-cat

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接