Skip to content

chore: auto-credit Claude as co-author on every commit#30

Merged
kaiiiichen merged 1 commit intomainfrom
chore/claude-coauthor-hook
Apr 17, 2026
Merged

chore: auto-credit Claude as co-author on every commit#30
kaiiiichen merged 1 commit intomainfrom
chore/claude-coauthor-hook

Conversation

@kaiiiichen
Copy link
Copy Markdown
Owner

Summary

  • Adds .githooks/prepare-commit-msg that appends Co-authored-by: Claude <noreply@anthropic.com> via git interpret-trailers (idempotent, skips merge commits).
  • package.json postinstall runs git config core.hooksPath .githooks, so any fresh clone picks up the hook after npm install — no husky dependency.
  • AGENTS.md + .cursor/rules/git-workflow.mdc document the policy so agents also add the trailer explicitly when committing in environments where git hooks are skipped (web editor, sandboxed runs, --no-verify).

Test plan

  • Verified this very commit picked up the trailer (git log -1 shows Co-authored-by: Claude).
  • npm run lint && npm run typecheck && npm run test pass locally.
  • CI green on this PR.

Made with Cursor

Adds .githooks/prepare-commit-msg that appends a Co-authored-by trailer
for Claude via `git interpret-trailers` (safe for merge/squash, idempotent
on existing trailers). `package.json` now runs
`git config core.hooksPath .githooks` in postinstall so `npm install`
activates the hook in any fresh clone — no extra devDependency like husky.

AGENTS.md and the Cursor git-workflow rule document the policy so agents
add the trailer explicitly when committing through environments that skip
git hooks (web editors, sandboxed runs, --no-verify).

Made-with: Cursor
Co-authored-by: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kaichen.dev Ready Ready Preview, Comment Apr 17, 2026 0:27am

@kaiiiichen kaiiiichen enabled auto-merge April 17, 2026 12:27
@kaiiiichen kaiiiichen merged commit 2d89b8f into main Apr 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant