Header Command
Generates mandatory branch header with full git status, PR inference, and API usage stats.
/plugin marketplace add jleechanorg/claude-commands/plugin install claude-commands@claude-commands-marketplaceWhen this command is invoked, YOU (Claude) must execute these steps immediately: This is NOT documentation - these are COMMANDS to execute right now. Use TodoWrite to track progress through multi-phase workflows.
Action Steps:
Best Practice: Use /header before ending responses to:
Automated Memory Aid:
6. The single command $(git rev-parse --show-toplevel)/.claude/hooks/git-header.sh provides complete context
7. Shows git status + intelligently finds relevant PRs
8. No need to remember multiple separate commands
9. Consistent, reliable output every time
10. Perfect for developing muscle memory
Integration: 11. End every response with the header (one simple command) 12. Use when switching branches or tasks 13. Make it a habit: "content first, header last"
Purpose: Generate and display the mandatory branch header for CLAUDE.md compliance with full git status and intelligent PR inference
Usage: /header or /usage
Action: Execute single script to show git status and generate the required branch header with API usage statistics
Single Command: $(git rev-parse --show-toplevel)/.claude/hooks/git-header.sh --with-api
This script automatically:
git status output for complete repository contextBenefits:
git status output shows working directory stateShows complete repository context followed by the mandatory header format:
=== Git Status ===
On branch dev1754541036
Your branch is ahead of 'origin/main' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes to working directory)
modified: .claude/hooks/git-header.sh
no changes added to commit (use "git add -a" to commit all changes, or "git add <file>..." to update what will be committed)
[Local: <branch> | Remote: <upstream> | PR: <number> <url>]
[API: <remaining>/<limit> requests (<percentage>% remaining) | Reset: <time>]
Examples:
[Local: main | Remote: origin/main | PR: none][API: 49/50 requests (98% remaining) | Reset: 15:08:12][Local: feature-x | Remote: origin/main | PR: #123 https://github.com/user/repo/pull/123][Local: dev-branch (ahead 2) | Remote: origin/main | PR: (related to #456 https://github.com/user/repo/pull/456)][API: 25/50 requests (50% remaining) | Reset: 08:30:45]This command helps fulfill the 🚨 CRITICAL requirement in CLAUDE.md that EVERY response must end with the branch header. The enhanced output provides essential context about:
Using this command makes compliance easier, provides complete repository context, and helps maintain the required workflow discipline.