Weir — AI skill for Claude Code
Claude Code wrote grep 4,575 times and rg zero times across 25,216 Bash calls in one user’s transcripts.
How to install Weir
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open justinstimatze/weir and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Weir does
Claude Code wrote `grep` 4,575 times and `rg` zero times across 25,216 Bash calls in one user’s transcripts. weir is the hook that fixes that — tells the model what shell tools you actually have, suggests rewrites for the antipattern cluster, refuses to run the unambiguously-broken ones (`cat FILE | grep`, `which CMD`).
Alternatives in AI
- Xerj — Local-first search engine and MCP server for AI agents 12.5k ★
- Om Humanize — Voice-calibrated editing — makes Claude-drafted text sound like you wrote it, not like AI wrote it 4.6k ★
- Agmsg — Cross-vendor messaging for CLI AI coding agents — let Claude Code, Codex, Gemini & Copilot talk to each other 1.5k ★
README
weir
A barrier across a stream that's also the standard instrument for measuring its flow rate.
weir is a Claude Code addon that closes a specific gap: the model writes shell pipelines fluently, but reaches for a 1995 toolbox.
The thesis
Mining one user's JSONL session transcripts across dozens of project directories (the sanitized aggregate is in [`internal/measure/baseline.json`](internal/measure/baseline.json)):
- 25,216 Bash invocations
- 49.7% contain a top-level pipe — the model writes pipelines constantly
- 0 of those calls reached for
rg,fd,bat,sd,mlr,eza, or any other modern alternative — not "underused", never reached for - A handful of antipatterns recur in volume — counts from the embedded baseline:
grep | head(810),ls | grep(225), UUOC variantscat FILE | tool(~120 across head/grep/tail/jq/wc),grep | wc -l(99),awk | awk(38),find ... -exec ... \;(13). A separate pass-A discovery on the same corpus (data/mine_extra.py) addedwhich CMD(~179),find | xargswithout-print0(~61), andls | wc -l(~152).
The model's pipeline *shapes* are fine. What's broken is which binaries it reaches for inside each shape, and a small cluster of stereotyped antipatterns.
What weir does
Three layers, registered as Claude Code hooks. All fail-open; bypass with `WEIR_SUGGEST_SKIP=1` / `WEIR_SKIP=1`.
Layer 1 — Capability manifest (SessionStart)
At the start of every session, weir probes `$PATH` for ~30 modern shell tools, emits a JSON manifest, and injects it into the model's context as `additionalContext`. The model now knows what's reachable on *this* host instead of defaulting to coreutils.
`sd` is deliberately not in this catalog. It was recommended over `sed` through v0.1.11, but three field-reported sightings of the same replacement-string footgun — the third one a detection bug in the block rule meant to have already closed it — settled the question: the failure mode recurs faster tha
Related Skills
AI Agent Guardrails Windows Guide
Verified guide: a global guardrail that blocks catastrophic shell commands from AI agents on Windows (Claude C
Harness Scouter
Scores a Claude Code harness from the transcripts already on your machine: 6 stats of what your agent actually
Codecrafters Claude Code Python
A minimal LLM coding agent in ~280 lines of Python — Read/Write/Edit/Bash/Glob/Grep tools with an agent loop.
10d10s Bonus Ultimate Subs Maker
Claude Code skill - Hebrew subtitles that are in sync and spelled right: Whisper (ivrit.ai model) times every
Squeez
Hook-based token compressor for 5 AI CLI hosts (Claude Code, Copilot CLI, OpenCode, Gemini CLI, Codex CLI). Up
Line Edit
Familiar: Mechanical pass: AI tells, house rules, exact fixes
Related Agents
Code Audit Maintainer Shell
Maintainer-only audit of framework bash and the bats suites guarding it: quoting/portability correctness, a sh
Detrope
Edit writing to strip out AI-generated tells (em-dash abuse, "It's not X—it's Y", "delve", bold-first bullets,
Transcript Miner
Use when mining Claude Code transcripts for friction — where the tooling was wrong — at the end of a work stre