Auto-load git context at session start
A `SessionStart` hook can dump `git status` to a known file so Claude always knows your branch and uncommitted changes without you typing it.
- Type: Prompt
- Tags: Coding Agent Hacks, Intermediate, Claude Code
- Updated: 2026-10-01
Prompt
A `SessionStart` hook can dump `git status` to a known file so Claude always knows your branch and uncommitted changes without you typing it. Claude Code loads CLAUDE.md but doesn't know what branch you're on or what's changed since the last session. You end up typing 'check git status' every time. A `SessionStart` hook fixes this once: it captures git state on session start and on `/clear`, so you can dive straight into work. Implementation example: // .claude/settings.json { "hooks": { "SessionStart": [{ "hooks": [{ "type": "command", "command": "git status > /tmp/claude-git-context.txt && echo 'Development context loaded'" }] }] } }
More prompts
- Expense Report Automation System — Save More Time
- Meeting Scheduling Link Standardization — Save More Time
- Invoice Generation and Delivery Automation — Save More Time
- Document Template Automation Library — Save More Time
- Calendar Management Automation Rules — Save More Time
- File Organization and Naming System — Save More Time
- Recurring Payment Automation Setup — Save More Time
- Data Entry Elimination Framework — Save More Time