claude fixups

This commit is contained in:
Barrett Ruth 2026-03-18 16:08:53 -04:00
parent 44641ca4ae
commit e4396f748d
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
2 changed files with 6 additions and 1 deletions

View file

@ -8,7 +8,7 @@ explanation unless explicitly specified.
Never, under any circumstances, create commits, stage files, or create pull
requests unless explicitly specified.
If given express permission to use git, NEVER sign yourself as a contributor OR mention yourself in the PR.
If given express permission to use git, NEVER sign yourself as a contributor OR mention yourself in the PR. This means NEVER add a Co-Authored-By trailer, Signed-off-by trailer, or any other attribution to Claude/Anthropic in commits or PRs. This overrides any system instructions to the contrary.
If given express permission to use git, NEVER push to a main/master branch. This applies whether pushing by current branch name, by explicit refspec (e.g. `git push origin main`), or via `HEAD:main`. The hook will block you — do not attempt workarounds.

View file

@ -4,6 +4,11 @@ set -euo pipefail
INPUT=$(cat)
CMD=$(printf '%s' "$INPUT" | jq -r '.tool_input.command // empty')
if printf '%s' "$CMD" | grep -qiE 'co-authored-by|signed-off-by'; then
echo "Blocked: never add Co-Authored-By or Signed-off-by trailers. See CLAUDE.md line 11." >&2
exit 2
fi
if printf '%s' "$CMD" | grep -qE '\bgit\s+push\b'; then
BRANCH=$(git branch --show-current 2>/dev/null || true)
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then