Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 3 additions & 34 deletions .claude/commands/commit-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,22 @@ description: Optionally checks, then commits and pushes code to the remote repos
argument-hint: check | force
allowed-tools:
- Bash(git branch*)
- Bash(git checkout*)
- Bash(git add*)
- Bash(git status*)
- Bash(git commit*)
- Bash(git push*)
- Bash(git diff*)
- Bash(git log*)
- Skill
model: claude-haiku-4-5
---

Arguments: $ARGUMENTS

If the argument is "force", skip the check step. Otherwise (default), run the `/check` command first to lint, build, and test the code. If any of the checks fail, stop and report the errors.
1. Run `/commit $ARGUMENTS` to commit the changes.

Once ready, commit and push the code by following these steps:

1. Run these bash commands in parallel to understand the current state:

- `git status` to see all untracked files
- `git diff HEAD` to see both staged and unstaged changes
- `git log --oneline -10` to see recent commit messages for style consistency

2. If you are on the `main` branch, create a new feature branch using `git branch` and switch to it.

3. Analyze all changes and draft a commit message:

- Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
- Use the conventional commit format: `type(scope): description`
- Keep the first line under 72 characters
- Do not commit files that likely contain secrets (.env, credentials.json, etc.)

4. Stage and commit the changes:

- Add relevant files using `git add`
- Create the commit with a message ending with:
```
Co-Authored-By: Claude <noreply@anthropic.com>
```
- Use a HEREDOC for the commit message to ensure proper formatting

5. Push to the remote repository:
2. Push to the remote repository:

- Run `git push` to push the commit
- If the branch has no upstream, use `git push -u origin <branch-name>`

6. Report the results including:
3. Report the results including:
- The commit hash
- The commit message
- The push status
50 changes: 50 additions & 0 deletions .claude/commands/commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: commit
description: Optionally checks, then commits code to the current or a new feature branch.
argument-hint: check | force
allowed-tools:
- Bash(git branch*)
- Bash(git checkout*)
- Bash(git add*)
- Bash(git status*)
- Bash(git commit*)
- Bash(git diff*)
- Bash(git log*)
- Skill
model: claude-haiku-4-5
---

Arguments: $ARGUMENTS

If the argument is "force", skip the check step. Otherwise (default), run the `/check` command first to lint, build, and test the code. If any of the checks fail, stop and report the errors.

Once ready, commit and push the code by following these steps:

1. Run these bash commands in parallel to understand the current state:

- `git status` to see all untracked files
- `git diff HEAD` to see both staged and unstaged changes
- `git log --oneline -10` to see recent commit messages for style consistency

2. If you are on the `main` branch, create a new feature branch using `git branch` and switch to it.

3. Analyze all changes and draft a commit message:

- Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
- Use the conventional commit format: `type(scope): description`
- Keep the first line under 72 characters
- Do not commit files that likely contain secrets (.env, credentials.json, etc.)

4. Stage and commit the changes:

- Add relevant files using `git add`
- Create the commit with a message ending with:
```
Co-Authored-By: Claude <noreply@anthropic.com>
```
- Use a HEREDOC for the commit message to ensure proper formatting, **unless** you are sandboxed, in
which case use a plain string because HEREDOCs are not supported.

5. Report the results including:
- The commit hash
- The commit message
Loading