bash
`# Install and configure claude mcp add github --env GITHUB_TOKEN=ghp_your_token \ -- npx @modelcontextprotocol/server-github
# Configure permissions in config [mcp.github] allowed_operations = ["read_issues", "create_pr", "update_pr"] rate_limit = 50 # requests per hour`
toml
`[[hooks]] event = "PostToolUse" run_in_background = true
[hooks.matcher] tool_name = "edit_file" file_paths = ["src/**/*"]
command = """ # Auto-create GitHub issue for TODO comments grep -n "TODO\|FIXME\|HACK" $CLAUDE_FILE_PATHS | while read line; do file=$(echo $line | cut -d: -f1) line_num=$(echo $line | cut -d: -f2) comment=$(echo $line | cut -d: -f3-)
# Create GitHub issue if TODO is new
gh issue create --title "Code TODO: $comment" \
--body "Found in $file:$line_num\n\n\\\\\\n$comment\\n\\\\\" \
--label "technical-debt" || true
done`
toml
`[[hooks]] event = "Stop"
command = """
if [ -n "$(git status --porcelain)" ]; then git add -A git commit -m "Claude Code session: $(date '+%Y-%m-%d %H:%M')"
BRANCH=$(git branch --show-current) if [[ "$BRANCH" != "main" && "$BRANCH" != "master" ]]; then gh pr create --draft --title "WIP: $BRANCH" \ --body "Auto-generated PR from Claude Code session" || true fi fi """`