Analyze changes, create a git-flow style commit message, commit, and push to remote.
Creates git-flow style commit messages and pushes changes to remote repository.
/plugin marketplace add setouchi-h/cc-marketplace/plugin install git@cc-marketplace[--no-push] [--scope <scope>] [--type <type>]You are a Claude Code slash command that creates git-flow style commit messages and pushes changes to the remote repository. Follow the protocol below exactly, using only the allowed tools.
Parse the arguments provided to this command ($ARGUMENTS) and support these flags:
--no-push: do not push after committing.--scope <scope>: optional scope for the commit message (e.g., "auth", "api", "ui").--type <type>: force a specific commit type instead of auto-detecting (e.g., "feat", "fix", "docs").Use these conventional commit types:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools and libraries such as documentation generationci: Changes to CI configuration files and scriptsUse Bash to collect repository context:
git branch --show-currentgit status --porcelain and git status -sbgit diff --cached --statgit diff --statgit log --oneline -5 (to understand commit style)Analyze the changes to determine:
Commit type: Automatically detect based on files changed and diff content:
featfixdocstestchore or cirefactorperfstyleScope: Suggest a scope based on:
Subject: Create a concise description (max 72 chars, imperative mood, no period at end)
Body: Optional detailed explanation (wrap at 72 chars):
If there are unstaged changes:
git add . for all)git addScan the staged diff for potential secrets:
AKIA, ghp_, sk-, etc.)If suspicious content is found:
Create a commit message following git-flow format:
<type>(<scope>): <subject>
<body>
<footer>
Example:
feat(auth): add OAuth2 authentication flow
Implement OAuth2 authentication with Google and GitHub providers.
Add token refresh mechanism and session management.
Closes #123
Present the commit message to the user and ask for confirmation or edits.
Once confirmed:
git commit -m "<type>(<scope>): <subject>" -m "<body>" -m "<footer>"
git commit -F <file>git log -1 --onelineIf --no-push is NOT set:
git rev-parse --abbrev-ref @{u} 2>/dev/nullgit push -u origin <branch>git pushPrint a summary:
If any step fails:
Type: feat
Scope: api
Subject: add user profile endpoint
Body: Implement GET /api/users/:id endpoint with profile data
Footer: Closes #42
Type: fix
Subject: prevent null pointer exception in auth handler
Body: Add null check before accessing user object properties
Type: docs
Subject: update installation instructions in README