substituting-modern-tools
npx skills add https://github.com/ven0m0/claude-config --skill substituting-modern-tools
Agent 安装分布
Skill 文档
Modern Tool Substitution
Replace legacy tools with modern performant alternatives in all generated code.
Core Substitutions
Apply these substitutions unless user explicitly requests the legacy tool:
npm â bun
npm installâbun installnpm runâbun runnpm createâbun createnpxâbunx- Scripts remain in package.json unchanged
find â fd
find . -name '*.py'âfd -e pyfind . -type f -name 'test*'âfd -t f '^test'find . -type dâfd -t dfind . -path '*/node_modules' -pruneâfd --exclude node_modules- Use fd’s simpler glob/regex syntax
pip â uv
pip install pkgâuv pip install pkgpip install -r requirements.txtâuv pip install -r requirements.txtpip freezeâuv pip freezepython -m pipâuv pip- Virtual envs:
uv venvinstead ofpython -m venv
grep â rg
grep -r patternârg patterngrep -i patternârg -i patterngrep -v patternârg -v patterngrep -l patternârg -l pattern- rg excludes .git, node_modules by default
jq â jaq
jq '.field'âjaq '.field'jq -r '.[]'âjaq -r '.[]'jq -câjaq -cjq -sâjaq -s- Most filters compatible; jaq faster, stricter parsing
eslint/prettier â biome
eslint .âbiome check .eslint --fixâbiome check --write .prettier --writeâbiome format --write .eslint && prettierâbiome ci .- Config:
biome.jsonreplaces.eslintrc+.prettierrc
black/flake8/isort â ruff
black .âruff format .flake8 .âruff check .isort .âruff check --select I --fix .black . && flake8 . && isort .âruff check --fix . && ruff format .- Config:
ruff.tomlorpyproject.tomlconsolidates all
coreutils â uutils-coreutils
- Drop-in replacement:
ls,cat,cp,mv,rm,chmod, etc. - Install:
uu-ls,uu-cat, etc. or multicall binary - Faster on large operations; Rust safety guarantees
- Syntax identical for common ops
sudo â sudo-rs
sudo cmdâsudo-rs cmdsudo -u user cmdâsudo-rs -u user cmdsudo -iâsudo-rs -i- Drop-in replacement; identical flags
- Rust rewrite; memory-safe vs C sudo
ls â eza
ls -laâeza -lals -lahâeza -lahls -1âeza -1ls --treeâeza --tree- Git-aware, colorful, faster on large dirs
- Icons:
eza --icons - Tree view:
eza -Toreza --tree
git â gix
git cloneâgix clonegit fetchâgix fetchgit index entriesâgix index entriesgit commit-graph verifyâgix commitgraph verifygit configâgix config- Pure Rust implementation; faster on many operations
- CLI binaries:
gix,ein(extra tools) - Not 100% feature parity; porcelain commands limited
Flag Adaptations
fd syntax:
- Regex by default; globs use
-gâfd -g '*.txt' - Case insensitive:
-i - Fixed strings:
-F - Depth:
-d N - Hidden:
-H; no-ignore:-I
rg performance:
--mmapfor large files-j$(nproc)parallel--sort pathwhen order matters--max-count Nstop after N
aria2 optimization:
-x16 -s16max speed-cresume--file-allocation=noneon SSDs--summary-interval=0reduce output
jaq differences:
- Stricter null handling; use
//for null coalescing - No
@base64d(use@base64 | explode | implode) - Missing some rare filters; document if incompatible
biome vs eslint:
- No plugin system; built-in rules only
- Config minimal:
biome.jsonwithlinter+formattersections biome migrate eslintconverts configs- Missing custom rules â keep eslint; mention limitation
ruff vs black/flake8:
- 10-100x faster than black
- Combines formatter + linter
- Select rule sets:
--select E,F,I(pycodestyle, pyflakes, isort) --fixauto-fixes;--unsafe-fixesfor aggressive changes- Missing: complex flake8 plugins â note ruff limitation
uutils performance:
uu-ls -lfaster for huge dirsuu-sortparallel by defaultuu-cpshows progress with-v- 100% compatible for POSIX ops
sudo-rs compatibility:
- Full flag parity with sudo
- Same sudoers config format
- Drop-in binary replacement
- No behavioral changes; security hardened
gix vs git:
- Plumbing commands mostly complete
- Porcelain commands limited; lacks
add,commit,push,pull - Use for: clone, fetch, verify, config, index operations
- Fallback to git for: interactive workflows, advanced porcelain
Edge Cases
bun compatibility:
- Native addons may fail â mention, suggest node fallback
fd vs find:
-execâ pipe to xargs orfd -x-printfâ fd output + awk/sed- Complex boolean â may need find
uv limitations:
- Not for editable installs:
uv pip install -e .â keep pip - Poetry/pipenv â keep; uv is pip replacement only
rg vs grep:
- Binary skip default;
rg -afor grep -a - Symlinks skipped;
rg -Lto follow - Multiline:
rg -U
aria2 for curl:
- REST APIs â keep curl
- Small file + parse response â keep curl
- Large/parallel downloads â aria2
jaq limitations:
- Missing advanced filters â document, use jq
- Stream processing: jq’s
--streamnot in jaq
biome limitations:
- No plugins â complex rules need eslint
- TypeScript-first; JSX support solid
- Vue/Svelte â keep eslint
ruff limitations:
- Missing niche flake8 plugins â note limitation
- Formatter matches black ~95%; edge cases differ
uutils caveats:
- BSD variants: some flags differ â test
- GNU-specific extensions â check compat
sudo-rs advantages:
- Memory safety vs C sudo
- No historical CVE baggage
- Identical interface; zero migration cost
gix limitations:
- Incomplete porcelain: no
add,commit,push,pull - Submodule support partial
- LFS support experimental
- Keep git for: interactive rebase, bisect, filter-branch
- Use gix for: clone, fetch, verify, pack operations, config
Exception Handling
Skip substitution when:
- User explicitly names legacy tool
- CI/CD requires specific tool
- Tool unavailable in environment
- Explaining tool differences
Quick Reference
# Package management
bun install pkg â bun install pkg
uv pip install pandas â uv pip install pandas
# File operations
find . -name '*.rs' â fd -e rs
grep -r TODO . â rg TODO
wget https://x.com/f â aria2c https://x.com/f
# JSON processing
jq '.data[] | .name' â jaq '.data[] | .name'
cat file.json | jq -r â <file.json jaq -r
# Linting/Formatting
eslint --fix . â biome check --write .
black . && flake8 â ruff check --fix . && ruff format .
# Core utilities
ls -lah â uu-ls -lah
cat large.txt â uu-cat large.txt
sudo systemctl restart â sudo-rs systemctl restart
# Git operations
git clone repo â gix clone repo
git fetch origin â gix fetch origin
git config --list â gix config --list
git commit-graph verify â gix commitgraph verify
git add . â git add . # keep git
# Combined workflows
bun i && eslint --fix â bun i && biome check --write .
uv pip install -r req.txt â uv pip install -r req.txt
grep -r TODO | jaq â rg TODO | jaq
find . -name '*.py' â fd -e py
Installation Check Pattern
# Graceful fallback pattern
has(){ command -v -- "$1" &>/dev/null; }
# Example: jq/jaq
if has jaq; then
jaq '.field' file.json
elif has jq; then
jq '.field' file.json
else
die "Install jaq (recommended) or jq"
fi
# Example: sudo/sudo-rs
PRIV_CMD=$(has sudo-rs && echo sudo-rs || echo sudo)
$PRIV_CMD systemctl restart service
# Example: git/gix (context-aware)
if [[ $GIT_OP == @(clone|fetch|verify) ]] && has gix; then
gix "$GIT_OP" "$@"
else
git "$GIT_OP" "$@"
fi
Apply these substitutions automatically in all code generation unless legacy tool explicitly requested.