AgentSkillsCN

cli-tools

在开发者终端的工作流中,用现代Rust基础的CLI工具(bat、ripgrep、fd、sd、eza)替代cat、grep、find、sed和ls,让交互体验更流畅。

SKILL.md
--- frontmatter
name: cli-tools
description: Use modern Rust-based CLI tools (bat, ripgrep, fd, sd, eza) as interactive replacements for cat, grep, find, sed, and ls in developer terminal workflows.
license: MIT
compatibility: opencode

metadata:
  audience: developers
  workflow: terminal
  maturity: stable

Modern CLI Tools

Use modern Rust-based command-line tools as ergonomic replacements for common Unix utilities when working interactively in the terminal.

This skill applies when exploring codebases, inspecting files, searching text, or navigating directories during development. It is not intended for POSIX-strict shell scripts or CI environments.

Scope and Usage

  • Interactive terminal sessions
  • Local development environments
  • Source code exploration and refactoring

Not intended for:

  • Non-interactive shell scripts
  • CI/CD pipelines
  • Environments requiring strict POSIX compatibility

Tool Mapping

LegacyModernExample UsagePrimary Benefit
catbatbat file.tsSyntax highlighting, paging
greprgrg "pattern"Fast search, respects .gitignore
findfdfd -e tsSimpler, safer defaults
sedsdsd old new fileReadable find and replace
lsezaeza -la --gitGit-aware directory listings

Examples

Search

bash
grep -R "useEffect" .

Suggested alternative:

bash
rg "useEffect"

Reason: Faster recursive search and automatic exclusion of ignored directories.


Directory listing

bash
ls -la

Suggested alternative:

bash
eza -la --git

Reason: Improved formatting with inline Git status.

Notes

  • Do not blindly alias legacy commands in shared or scripted environments.
  • Prefer explicit usage (rg, fd, eza) over global overrides.
  • Installation and environment setup are intentionally omitted from this skill.

References