From 949d97dd3142d52a4590a7cd5b7998c51feeabda Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 29 Sep 2025 17:16:43 -0400 Subject: [PATCH] Enhance /c command documentation with commit message generation guidelines --- modules/home/claude-code/commands/c.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/home/claude-code/commands/c.md b/modules/home/claude-code/commands/c.md index 7606f5d..7f91722 100644 --- a/modules/home/claude-code/commands/c.md +++ b/modules/home/claude-code/commands/c.md @@ -23,9 +23,20 @@ This command commits the current changes to git. **Workflow**: 1. Check git status to identify modified and new files 2. Add all files in a single command using `git add ...` -3. Prompt for commit message or use a descriptive default -4. Run `git commit` with the message -5. Confirm successful commit +3. Analyze git diff to understand the changes made +4. Generate a meaningful commit message based on the actual changes +5. Run `git commit` with the generated message +6. Confirm successful commit + +**Commit Message Generation**: +- Analyze the git diff to understand what changed +- Create a concise, descriptive commit message that explains the purpose of the changes +- Focus on the "what" and "why" rather than generic descriptions +- Examples of good vs bad messages: + - Good: "Add tmux configuration with custom key bindings" + - Bad: "Update home configuration" + - Good: "Fix broken SSH agent forwarding in development environment" + - Bad: "Update configuration files" **Prerequisites**: - Must be in a git repository