Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by Meleagris

2 days ago

In .claude/settings.json you can trigger shell commands on events like SessionStart, Stop, PreCompact, and PostToolUse [1].

I have all of them run `jj status`, because jj snapshots the working copy every time it's invoked.

You can have Claude write the hooks, but mine is:

`[[ -d .jj ]] && jj status >/dev/null 2>&1; exit 0`

[1] https://code.claude.com/docs/en/agent-sdk/hooks

0 comments

Meleagris

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities