Skip to content

chore: .claude hooks (pretooluse_bash, posttooluse_writeedit, sessionstart) + settings.local.json.example#37

Merged
constk merged 1 commit into
developfrom
feat/15-claude-hooks
Apr 26, 2026
Merged

chore: .claude hooks (pretooluse_bash, posttooluse_writeedit, sessionstart) + settings.local.json.example#37
constk merged 1 commit into
developfrom
feat/15-claude-hooks

Conversation

@constk
Copy link
Copy Markdown
Owner

@constk constk commented Apr 26, 2026

Summary

  • Port the three .claude/hooks/ scripts from Teller verbatim:
    • pretooluse_bash.py — blocks git --no-verify|--no-hooks|--no-gpg-sign, scans the staged diff on git commit for AWS/sk-*/ghp_/PEM/Slack secrets, audits every Bash invocation to .claude/bash-log.txt.
    • posttooluse_writeedit.py — formatter dispatch: ruff for .py, prettier for .ts/.tsx/.js/.jsx/.json/.css/.html/.md. Swap .svelte.jsx (template is React).
    • sessionstart.py — emits # Repository context (current branch + git status --short) as additionalContext so the agent gets the same orientation a human gets from opening the terminal.
  • Port .claude/settings.local.json.example wiring all three under PreToolUse:Bash, PostToolUse:Write|Edit, and SessionStart:startup|resume.

Closes #15.

Test plan

🤖 Generated with Claude Code

…start) + settings.local.json.example (#15)

Port the three .claude/hooks/*.py scripts and settings.local.json.example
verbatim from Teller. Drop .svelte from PRETTIER_EXTENSIONS and add .jsx
(template uses React, not Svelte). Strip Teller-specific PR references in
comments. Run ruff format on the result.

.claude/bash-log.txt and .claude/settings.local.json are already in .gitignore
from #5.

Closes #15

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@constk constk merged commit 69de68f into develop Apr 26, 2026
@constk constk deleted the feat/15-claude-hooks branch April 26, 2026 10:54
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