← 返回 Skills 市场
xueyetianya

Bat

作者 bytesagain4 · GitHub ↗ · v2.0.3 · MIT-0
cross-platform ✓ 安全检测通过
365
总下载
0
收藏
2
当前安装
12
版本数
在 OpenClaw 中安装
/install bat
功能描述
Log and search local text entries from the command line. Use when adding quick notes, searching past entries, or exporting a simple activity log.
使用说明 (SKILL.md)

Bat

A lightweight, multi-purpose command-line utility for logging, searching, and managing text entries. All data stays local in plain-text log files — no cloud, no dependencies.

Commands

Command Description
run \x3Carg> Execute the main function — prints the argument and logs the action.
config Show the config file path ($DATA_DIR/config.json) and log the action.
status Print current status ("ready") and log the check.
init Initialize the data directory — confirms creation at $DATA_DIR.
list Print all entries from the main data log (data.log). Shows "(empty)" if no entries exist.
add \x3Ctext> Append a timestamped entry to the log. Format: YYYY-MM-DD \x3Ctext>.
remove \x3Ctext> Mark an entry as removed and log the removal action.
search \x3Cterm> Case-insensitive search through all logged entries. Shows "Not found" if no matches.
export Output the full data log to stdout. Pipe to a file for backups: bat export > backup.txt.
info Show version number and data directory path.
help Show full usage information with all available commands.
version Print version number (v2.0.2).

Data Storage

All data is stored in ~/.local/share/bat/ by default:

  • data.log — Main log file (one entry per line, date-prefixed via add)
  • history.log — Command history with timestamps (auto-maintained by every command)
  • config.json — Configuration file path (shown by bat config)

Set the BAT_DIR environment variable to change the storage location. Alternatively, XDG_DATA_HOME is respected if BAT_DIR is not set.

Requirements

  • Bash 4+ (uses local variables, set -euo pipefail)
  • Standard Unix utilities (grep, date, wc, cat)
  • No external dependencies or API keys required

When to Use

  1. Quick note-taking from the terminal — Use bat add to jot down thoughts, meeting notes, or TODO items without leaving the shell.
  2. Maintaining a running activity log — Every add creates a dated entry, building a chronological record of activities over time.
  3. Searching past entries by keyword — Use bat search \x3Cterm> to find specific entries with case-insensitive matching.
  4. Exporting and backing up notes — Use bat export > backup.txt to dump all entries for backup, sharing, or migration.
  5. General-purpose CLI data management — Use run, init, config, and status as building blocks for scripted workflows and automation pipelines.

Examples

# Add a note about a meeting
bat add "Met with client about Q2 targets"

# Add another entry
bat add "Sent follow-up email to vendor"

# List all logged entries
bat list

# Search for entries mentioning "client"
bat search "client"

# Export log to a backup file
bat export > ~/bat-backup.txt

# Check version and data directory
bat info

# Initialize (or verify) the data directory
bat init

# Check operational status
bat status

# Show config file path
bat config

Output

All commands print results to stdout and log actions to history.log. The add command confirms each save with the added text. The list and export commands output raw log content suitable for piping and redirection.


Powered by BytesAgain | bytesagain.com | [email protected]

安全使用建议
This skill appears to do exactly what it claims: it writes and reads plain-text logs under your data directory and does not contact external services or request secrets. Before installing, review or run the bundled script (scripts/script.sh) to confirm behavior and to understand where files will be created (BAT_DIR or XDG_DATA_HOME or ~/.local/share/bat). Be aware of minor version mismatches and that the remove command only logs removals rather than editing data.log; if you need guaranteed deletion behavior, inspect/modify the script first. If you want to be extra cautious, run the script in a sandboxed account or container to confirm it meets your expectations.
功能分析
Type: OpenClaw Skill Name: bat Version: 2.0.3 The 'bat' skill is a straightforward local logging and note-taking utility. The Bash script (scripts/script.sh) manages text entries in a local directory (~/.local/share/bat/) using standard Unix utilities like grep and date. There is no evidence of network activity, data exfiltration, or malicious execution patterns.
能力评估
Purpose & Capability
Name, description, and behavior match: the script and SKILL.md implement a local text-logging/search utility that stores files under a user data directory. No unrelated credentials, binaries, or external services are requested.
Instruction Scope
Instructions and the included script operate only on local files (data.log and history.log) in the configured data directory. Minor inconsistencies: SKILL.md lists version v2.0.2 (pack metadata v2.0.3) while the script sets VERSION="2.0.0"; the remove command logs removals to history.log but does not actually modify data.log to mark or delete entries as described. These are functional/maintenance issues rather than security concerns.
Install Mechanism
No install spec; instruction-only plus a small included shell script. Nothing is downloaded or extracted from remote URLs and no packages are installed. Low-installation risk.
Credentials
No credentials or secrets requested. The script respects BAT_DIR and XDG_DATA_HOME (and falls back to HOME) to choose a local storage path — this is proportionate to a file-based CLI logger.
Persistence & Privilege
always is false (normal). The skill writes only to its own data directory (~/.local/share/bat by default). It does not modify other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bat
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bat 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.3
update
v2.0.2
Fix VT: remove old skeleton scripts, align SKILL.md
v2.0.1
Remove old skeleton
v2.0.0
v2.5 standard: Use-when desc, homepage, source, security fix
v1.0.6
yaml-fix+quality
v1.0.5
yaml-fix+quality
v1.0.4
Quality upgrade
v1.0.3
Quality upgrade: custom functionality
v1.0.2
Standards compliance: unique content, no template text
v1.0.1
Quality update: docs, examples, standards compliance
v2.3.0
Quality fixes: removed third-party references, aligned docs with implementation
v1.0.0
Initial release
元数据
Slug bat
版本 2.0.3
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 12
常见问题

Bat 是什么?

Log and search local text entries from the command line. Use when adding quick notes, searching past entries, or exporting a simple activity log. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 365 次。

如何安装 Bat?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bat」即可一键安装,无需额外配置。

Bat 是免费的吗?

是的,Bat 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Bat 支持哪些平台?

Bat 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bat?

由 bytesagain4(@xueyetianya)开发并维护,当前版本 v2.0.3。

💬 留言讨论