Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By WithHolmv1.0.6In 1 marketplace
Stops Edit failures on tab-indented files by warning Claude when a Read, Bash or Write call would mix up tabs and spaces. Hooks run on every Read, Bash and Write call and only warn; the claude-tab-fix binary must be on your PATH.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A Claude Code hook that warns Claude about tab-indented files — preventing silent Edit failures and mixed-indentation corruption.
Claude Code's Read tool formats output as N\t<line content>, using a tab as the line-number separator. For tab-indented files this is visually identical to the file's own indentation — Claude cannot distinguish the separator tab from content tabs, so it often produces old_string with wrong indentation.
Claude Code also validates old_string against the file before calling PreToolUse hooks. This means hooks cannot fix indentation mismatches automatically — they can only warn Claude so it corrects itself.
go to the right side of this website and look for releases for a bin/exe download. download that. Save the exe in a place where it is safe from deletion, and set PATH to point to this folder.
go install github.com/WithHolm/claude-tab-fix@latest
git clone https://github.com/WithHolm/claude-tab-fix
cd claude-tab-fix
make install
Install the binary first, then install the plugin so Claude Code picks up the hook automatically:
# 1. Install the binary
go install github.com/WithHolm/claude-tab-fix@latest
# 2. Install the plugin
/plugin marketplace add WithHolm/claude-tab-fix
/plugin install claude-tab-fix@WithHolm/claude-tab-fix
The plugin registers both hooks for you — no manual config editing needed.
Install the binary, then add the hooks to your Claude Code settings.
Per-project — commit .claude/settings.json to your repo so anyone who clones it gets the hooks automatically:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "claude-tab-fix" }]
},
{
"matcher": "Write",
"hooks": [{ "type": "command", "command": "claude-tab-fix" }]
}
],
"PostToolUse": [
{
"matcher": "Read",
"hooks": [{ "type": "command", "command": "claude-tab-fix" }]
}
]
}
}
Globally — add the same block to ~/.claude/settings.json to enable it for every project on your machine.
If the binary is not on your PATH, use the full path: $(go env GOPATH)/bin/claude-tab-fix.
Add explicit deny for the different commands claude normally uses for edit in the claude settings. the file for your current porject should be in <project root>/.claude/settings.json (or settings.local.json) or in your home/.claude...
for linux the folling commands are recomended (just remove the python3 if you do any python work..)
"deny": [
"Bash(sed:*)",
"Bash(awk:*)",
"Bash(tr:*)",
"Bash(xargs:*)",
"Bash(python3:*)"
],
missing info from windows.. if anyone have any info here, please open a pr or write a issue and il add it..
when combined with the added context this tool gives ("hey claude, please remember that the read tool is kinda borked...") it forces claude to fall back into the edit path instead of using any other edit tools:

PostToolUse / Read — after every Read call on a tab-indented file, the hook injects a context note reminding Claude that the N\t line-number prefix is a separator tab, not part of the file content. Claude uses this information to construct correct old_string with proper tab indentation.
PreToolUse / Bash — before sed, awk, perl, or python commands that target a tab-indented file, the hook warns Claude to use the Edit tool instead, since shell commands bypass indentation awareness.
PreToolUse / Write — before overwriting a tab-indented file, the hook checks whether the new content uses a different indent style. If writing spaces to a tab file (or vice versa), it warns that the result will have mixed indentation and strongly suggests using Edit instead.
| Situation | Behaviour |
|---|---|
| File doesn't exist | Pass through |
| Binary file | Pass through |
| File uses spaces | Pass through (no warning needed) |
Bash on non-file-edit command (go test, etc.) | Pass through |
Write with matching indent style | Pass through |
Read on non-tab file | Pass through |
The hook fires on Read (PostToolUse), Bash, and Write (PreToolUse). A CLAUDE.md file is included in the release archive; placing it in your project root reinforces tab-awareness at session start.
make build # build ./claude-tab-fix binary
make fmt # run gofmt
make install # go install
go test ./...
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub withholm/claude-tab-fix --plugin claude-tab-fixPlugins from other owners that cover similar ground