What is bash-rewrite?
bash-rewrite is a Claude Code mod by chami1221-eng that rewrites Bash commands that a PreToolUse guard would deny (heredoc or python -c containing backslashes, cd followed by relative file names) into an equivalent form before the guard sees. It is listed under Security and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | chami1221-eng |
| Repository | chami1221-eng/my-ai-workbench |
| Popularity | no public popularity data yet |
| Category | Security |
| Security | Review before installing (72/100) |
| Rank | #5,321 of 9,397 Claude Code mods; #606 in Security |
| License | Apache-2.0 |
| Last commit | 2026-10-15 |
| Hooks | 3 events |
| Sees | Bash calls |
| Draws on | nothing |
Is bash-rewrite safe to install?
bash-rewrite scores 72/100 on the MCPMods security check: Review before installing. Things to review: writes files or config; reads environment variables. It passed 5 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts no processes | Pass |
| Writes files or config | Review |
| Reads environment variables | Review |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Validator reported problems | Note |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.clock.now | |
$.command.register | |
$.env.get | reads env vars |
$.fs.write | writes files |
$.session.cwd | |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.ui.log | draws interface |
$.ui.toast | draws interface |
How do I install bash-rewrite?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/chami1221-eng/my-ai-workbench claude plugin validate ./my-ai-workbench/mods/bash-rewrite
- Install it. Run this in your terminal, then /reload-plugins in an open session.
git clone https://github.com/chami1221-eng/my-ai-workbench && claude --plugin-dir ./my-ai-workbench/mods/bash-rewrite
Or ask Claude to set it up
Paste this into Claude Code and it installs bash-rewrite for you:
Install the "bash-rewrite" Claude Code mod from https://github.com/chami1221-eng/my-ai-workbench/tree/main/mods/bash-rewrite. Run claude plugin validate on it first and show me what it can access before you enable it.
More from chami1221-eng/my-ai-workbench
This repository has 7 Claude Code mods on MCPMods.
- hook-daemon: Answers heavy Python command hooks (PreToolUse / PostToolUse / Stop / UserPromptSubmit) from one resident process instea (Review before installing)
- layer0-compose: Moves the top-priority rule list (Layer 0) from per-turn UserPromptSubmit injection into the system prompt, where prompt (Low risk)
- prompt-band: Shows up to three hints above the prompt: tools that have been running for a while (elapsed time), what a one-key approv (Low risk)
- secret-mask: Redacts tokens, API keys and passwords from every row that enters the conversation (tool results, hook context, input, r (Low risk)
- send-gate: Before an outbound message is drafted, scheduled or sent (email draft script, chat post, chat MCP tools), checks that it (Low risk)
- shot-peek: When Claude reads an image from the Screenshots folder, shows its file name and capture time above the prompt so you can (Low risk)