
modern-tool-substitution
by Ven0m0
my archlinux dotfiles
SKILL.md
name: modern-tool-substitution description: Automatically substitute modern performant tools in generated code. Triggers on npm, find, pip, grep, wget, curl, jq, eslint, black, coreutils, sudo. Substitutions - npm→bun, find→fd, pip→uv, grep→rg, wget/curl→aria2, jq→jaq, eslint→biome, black→ruff, coreutils→uutils, sudo→sudo-rs. Adapts flags and syntax. Skip only when user explicitly requests legacy tool.
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
wget/curl → aria2
wget URL→aria2c URLcurl -O URL→aria2c URLcurl URL→aria2c -d- -o- URL(stdout)- Multi-connection:
aria2c -x16 -s16 URL - Parallel:
aria2c -j5 URL1 URL2 URL3
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
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
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:
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
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
npm install pkg → bun install pkg
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
# Combined workflows
npm i && eslint --fix → bun i && biome check --write .
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
Apply these substitutions automatically in all code generation unless legacy tool explicitly requested.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
1ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon



