From d54a763605403018e777fa014ce0d4be6a0f8a5c Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 29 Sep 2025 17:24:06 -0400 Subject: [PATCH] c: ctx --- modules/home/claude-code/commands/c.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/home/claude-code/commands/c.md b/modules/home/claude-code/commands/c.md index 310752d..53ccab1 100644 --- a/modules/home/claude-code/commands/c.md +++ b/modules/home/claude-code/commands/c.md @@ -5,7 +5,10 @@ description: Commit current changes This command commits the current changes to git. -**Usage**: `/c` +**Usage**: `/c [summary]` + +**Parameters**: +- `summary` (optional): A brief description of the changes being committed. This will be used alongside the git diff analysis to generate a more accurate commit message. **What it does**: 1. Runs a single `git add` command with all modified/new files as arguments (never on directories or '.') @@ -30,6 +33,7 @@ This command commits the current changes to git. **Commit Message Generation**: - Analyze the git diff to understand what changed +- If a user summary is provided, use it as context to better understand the intent behind the changes - Create a concise, descriptive commit message that explains the purpose of the changes - Focus on the "what" and "why" rather than generic descriptions - Prefix the commit message with component (and subcomponent if it exists, separated by /), e.g., `claude-code/command/c: Include component path in commit message` @@ -44,9 +48,13 @@ This command commits the current changes to git. - Must be in a git repository - Must have changes to commit -**Example**: +**Examples**: ``` /c ``` +This will stage individual files and commit all current changes with an auto-generated commit message. -This will stage individual files and commit all current changes. \ No newline at end of file +``` +/c "Fix authentication bug" +``` +This will commit changes with a message based on both the git diff analysis and the provided summary about fixing an authentication bug. \ No newline at end of file