/murnana-github:large-file-guardfrom murnana-github
Install a hook that blocks git commit when a non-LFS file is too large for GitHub to accept on push.
Ships in murnana-github. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Set up a PreToolUse hook in the current repository. Before Claude runs git commit, the hook checks the size of every file that would be committed and stops the commit when GitHub would reject the push. Files tracked by Git LFS are not counted, because Git stores only a small pointer for them.
Limits the hook enforces (details and sources: references/github-limits.md):
Treat $ARGUMENTS (if any) as the settings scope or limits the user wants. It does not skip the steps below.
Run git rev-parse --show-toplevel. If it fails, stop and say this is not a git repository. Work from that directory in every step below (the paths are relative to it).
Run command -v jq. The hook reads the tool input with jq. If it prints nothing, stop and tell the user to install jq first.
Glob for .claude/settings.json and .claude/settings.local.json, and Read each one that exists. Note whether a PreToolUse entry whose command contains check-git-file-size.sh is already registered.
Ask the user with one AskUserQuestion call (skip a question that $ARGUMENTS already answers):
.claude/settings.json (committed, shared with the team; recommended) or .claude/settings.local.json (this checkout only). Show the file that already has the entry, if step 3 found one, and say the install will refresh the script only.Run mkdir -p .claude/hooks, then cp ${CLAUDE_SKILL_DIR}/scripts/check-git-file-size.sh .claude/hooks/check-git-file-size.sh, then chmod +x .claude/hooks/check-git-file-size.sh. If .claude/hooks/check-git-file-size.sh already existed (step 3 Glob it too), say that it was overwritten with the bundled version.
If the entry from step 3 is already registered in the chosen file, skip to step 8.
Merge this entry into the chosen settings file with the Edit tool. Keep every existing key and hook as it is: add to an existing hooks.PreToolUse array instead of replacing it, and create the file with Write only if it does not exist.
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/check-git-file-size.sh"
}
]
}
]
}
}
For custom limits, prefix the command: GIT_FILE_SIZE_WARN_MIB=30 GIT_FILE_SIZE_BLOCK_MIB=80 "$CLAUDE_PROJECT_DIR"/.claude/hooks/check-git-file-size.sh.
Run jq empty <the settings file>. If it reports an error, fix the JSON you wrote and run it again; do not leave an invalid settings file.
Report in Japanese: the files created or changed, the active limits, and what the hook cannot see:
git commit is checked. Commits made from a terminal, an IDE or another tool are not.git add <big file> && git commit in one command is checked before the git add runs, so the file is not seen. Stage in a separate command first./hooks or restart Claude Code if the hook does not show up.The hook prints the file list and the options. Do not retry the same commit and do not bypass the hook. Ask the user with AskUserQuestion whether to track the files with Git LFS (git lfs track '<pattern>', which needs git-lfs installed), leave them out of the commit and add them to .gitignore, or split or compress them.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub murnana/murnana-claude-code-plugin --plugin murnana-github5 skills in this plugin
/stack-rebaseCascade-rebase a GitHub stack with gh stack rebase / sync, resolve conflicts, and pushOther plugins' skills for the same job