Skip to content

Commit 7143108

Browse files
committed
Add explicit fix-ci-commit command for clearer git commit instructions
- Create new slash command specifically for when branch already exists - Makes it crystal clear that Bash tool must be used for git commands - Update workflow to use the new command
1 parent 130eff6 commit 7143108

4 files changed

Lines changed: 117 additions & 5 deletions

File tree

.claude/commands/fix-ci-commit.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
description: Fix CI failures and commit changes (for use when branch already exists)
3+
allowed_tools: "Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite"
4+
---
5+
6+
# Fix CI Failures and Commit
7+
8+
You are on a branch that was created to fix CI failures. Your task is to fix the issues and commit the changes.
9+
10+
## CI Failure Information
11+
12+
$ARGUMENTS
13+
14+
## Your Tasks
15+
16+
1. **Analyze the failures** - Understand what went wrong from the logs
17+
2. **Fix the issues** - Make the necessary code changes
18+
3. **Commit your fixes** - Use git to commit all changes
19+
20+
## Step-by-Step Instructions
21+
22+
### 1. Fix the Issues
23+
24+
Based on the error logs:
25+
- Fix syntax errors
26+
- Fix formatting issues
27+
- Fix test failures
28+
- Fix any other CI problems
29+
30+
### 2. Commit Your Changes (REQUIRED)
31+
32+
After fixing ALL issues, you MUST:
33+
34+
```bash
35+
# Stage all changes
36+
git add -A
37+
38+
# Commit with descriptive message
39+
git commit -m "Fix CI failures
40+
41+
- Fixed syntax errors
42+
- Fixed formatting issues
43+
- Fixed test failures
44+
[List actual fixes made]"
45+
```
46+
47+
**IMPORTANT**: You MUST use the Bash tool to run the git add and git commit commands above. The workflow expects you to commit your changes.
48+
49+
### 3. Verify (Optional)
50+
51+
If possible, run verification commands:
52+
- `bun run format:check` for formatting
53+
- `bun test` for tests
54+
- `bun run typecheck` for TypeScript
55+
56+
Begin by analyzing the failure logs and then fix the issues.

.claude/commands/fix-ci.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ Requirements:
4242

4343
## Step 4: Commit Changes
4444

45-
After applying fixes:
46-
1. Stage all modified files with `git add -A` or `git add .`
47-
2. Commit with a descriptive message using `git commit -m "Fix CI failures: <description>"`
45+
After applying ALL fixes, use the Bash tool to:
46+
1. Run: `git add -A` to stage all modified files
47+
2. Run: `git commit -m "Fix CI failures: <description>"` to commit the changes
4848
3. Include details about which CI jobs/tests were fixed in the commit message
49-
4. Important: Always commit your changes even if you're already on a branch
49+
4. Important: You MUST use the Bash tool to run these git commands to commit your changes
5050

5151
## Step 5: Verify Fixes Locally
5252

.github/workflows/auto-fix-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
uses: km-anthropic/claude-code-action@v1-dev
8181
with:
8282
prompt: |
83-
/fix-ci Failed CI Run: ${{ fromJSON(steps.failure_details.outputs.result).runUrl }}
83+
/fix-ci-commit Failed CI Run: ${{ fromJSON(steps.failure_details.outputs.result).runUrl }}
8484
Failed Jobs: ${{ join(fromJSON(steps.failure_details.outputs.result).failedJobs, ', ') }}
8585
8686
Error logs:

slash-commands/fix-ci-commit.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
description: Fix CI failures and commit changes (for use when branch already exists)
3+
allowed_tools: "Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite"
4+
---
5+
6+
# Fix CI Failures and Commit
7+
8+
You are on a branch that was created to fix CI failures. Your task is to fix the issues and commit the changes.
9+
10+
## CI Failure Information
11+
12+
$ARGUMENTS
13+
14+
## Your Tasks
15+
16+
1. **Analyze the failures** - Understand what went wrong from the logs
17+
2. **Fix the issues** - Make the necessary code changes
18+
3. **Commit your fixes** - Use git to commit all changes
19+
20+
## Step-by-Step Instructions
21+
22+
### 1. Fix the Issues
23+
24+
Based on the error logs:
25+
- Fix syntax errors
26+
- Fix formatting issues
27+
- Fix test failures
28+
- Fix any other CI problems
29+
30+
### 2. Commit Your Changes (REQUIRED)
31+
32+
After fixing ALL issues, you MUST:
33+
34+
```bash
35+
# Stage all changes
36+
git add -A
37+
38+
# Commit with descriptive message
39+
git commit -m "Fix CI failures
40+
41+
- Fixed syntax errors
42+
- Fixed formatting issues
43+
- Fixed test failures
44+
[List actual fixes made]"
45+
```
46+
47+
**IMPORTANT**: You MUST use the Bash tool to run the git add and git commit commands above. The workflow expects you to commit your changes.
48+
49+
### 3. Verify (Optional)
50+
51+
If possible, run verification commands:
52+
- `bun run format:check` for formatting
53+
- `bun test` for tests
54+
- `bun run typecheck` for TypeScript
55+
56+
Begin by analyzing the failure logs and then fix the issues.

0 commit comments

Comments
 (0)