mk-git
Kit skill git (full text inlined from .claude/skills/git/SKILL.md). Relative paths it mentions (references/, scripts/, bin/, assets/) resolve from .claude/skills/git/. Where it says to invoke another /mk-* skill, read .kiro/skills/<that-skill>/SKILL.md.
Argument hint: cm|cp|pr|merge|merge-pr [args]
Request / arguments: $ARGUMENTS
Git Operations
Default (No Arguments)
If invoked without arguments, use AskUserQuestion to present available git operations:
| Operation |
Description |
cm |
Stage files & create commits |
cp |
Stage files, create commits and push |
pr |
Create Pull Request |
merge |
Merge branches |
merge-pr |
Review, label, merge PRs, then watch/fix CI |
Present as options via AskUserQuestion with header "Git Operation", question "What would you like to do?".
Execute git workflows via git-manager subagent to isolate verbose output.
Activate mk-context-engineering skill.
IMPORTANT:
- Sacrifice grammar for the sake of concision.
- Ensure token efficiency while maintaining high quality.
- Pass these rules to subagents.
Arguments
cm: Stage files & create commits
cp: Stage files, create commits and push
pr: Create Pull Request [to-branch] [from-branch]
to-branch: Target branch (default: main)
from-branch: Source branch (default: current branch)
merge: Merge [to-branch] [from-branch]
to-branch: Target branch (default: main)
from-branch: Source branch (default: current branch)
merge-pr: Review, label, merge, and post-merge verify PRs
- Usage:
/mk-git merge-pr <PR numbers or URLs>
- Accepts one or more PR numbers or GitHub PR URLs
- Runs
/mk-review-pr <PR> --fix --reply before any label or merge
- Adds label
ready to ship only after review/fix/reply reports the PR is merge-ready
- Merges only reviewed-and-ready PRs, then watches target-branch CI to success
Quick Reference
| Task |
Reference |
| Commit |
references/workflow-commit.md |
| Push |
references/workflow-push.md |
| Pull Request |
references/workflow-pr.md |
| Merge |
references/workflow-merge.md |
| Merge PRs |
references/workflow-merge-pr.md |
| Standards |
references/commit-standards.md |
| Safety |
references/safety-protocols.md |
| Branches |
references/branch-management.md |
| GitHub CLI |
references/gh-cli-guide.md |
Core Workflow
Step 1: Stage + Analyze
git add -A && git diff --cached --stat && git diff --cached --name-only
Step 2: Security Check
Scan for secrets before commit:
git diff --cached | grep -iE "(api[_-]?key|token|password|secret|credential)"
If secrets found: STOP, warn user, suggest .gitignore.
Step 3: Split Decision
NOTE:
- Search for related issues on GitHub and add to body.
- Only use
feat, fix, or perf prefixes for files in .claude directory (do not use docs).
Split commits if:
- Different types mixed (feat + fix, code + docs)
- Multiple scopes (auth + payments)
- Config/deps + code mixed
- FILES > 10 unrelated
Single commit if:
- Same type/scope, FILES ≤ 3, LINES ≤ 50
Step 4: Commit
git commit -m "type(scope): description"
Output Format
✓ staged: N files (+X/-Y lines)
✓ security: passed
✓ commit: HASH type(scope): description
✓ pushed: yes/no
Error Handling
| Error |
Action |
| Secrets detected |
Block commit, show files |
| No changes |
Exit cleanly |
| Push rejected |
Suggest git pull --rebase |
| Merge conflicts |
Suggest manual resolution |
References
references/workflow-commit.md - Commit workflow with split logic
references/workflow-push.md - Push workflow with error handling
references/workflow-pr.md - PR creation with remote diff analysis
references/workflow-merge.md - Branch merge workflow
references/workflow-merge-pr.md - PR review, ready label, merge, and CI convergence workflow
references/commit-standards.md - Conventional commit format rules
references/safety-protocols.md - Secret detection, branch protection
references/branch-management.md - Naming, lifecycle, strategies
references/gh-cli-guide.md - GitHub CLI commands reference
1---2name: mk-git-23description: Manage git commits, pushes, PRs, branch merges, and PR review-and-merge automation. Use for commit, push, PR creation, PR merge, CI follow-up, and secret scanning.4---5# mk-git67Kit skill `git` (full text inlined from `.claude/skills/git/SKILL.md`). Relative paths it mentions (`references/`, `scripts/`, `bin/`, `assets/`) resolve from `.claude/skills/git/`. Where it says to invoke another `/mk-*` skill, read `.kiro/skills/<that-skill>/SKILL.md`.89Argument hint: `cm|cp|pr|merge|merge-pr [args]`1011Request / arguments: $ARGUMENTS1213---1415# Git Operations1617## Default (No Arguments)1819If invoked without arguments, use `AskUserQuestion` to present available git operations:2021| Operation | Description |22|-----------|-------------|23| `cm` | Stage files & create commits |24| `cp` | Stage files, create commits and push |25| `pr` | Create Pull Request |26| `merge` | Merge branches |27| `merge-pr` | Review, label, merge PRs, then watch/fix CI |2829Present as options via `AskUserQuestion` with header "Git Operation", question "What would you like to do?".3031Execute git workflows via `git-manager` subagent to isolate verbose output.32Activate `mk-context-engineering` skill.3334**IMPORTANT:**35- Sacrifice grammar for the sake of concision.36- Ensure token efficiency while maintaining high quality.37- Pass these rules to subagents.3839## Arguments40- `cm`: Stage files & create commits41- `cp`: Stage files, create commits and push42- `pr`: Create Pull Request [to-branch] [from-branch]43 - `to-branch`: Target branch (default: main)44 - `from-branch`: Source branch (default: current branch)45- `merge`: Merge [to-branch] [from-branch]46 - `to-branch`: Target branch (default: main)47 - `from-branch`: Source branch (default: current branch)48- `merge-pr`: Review, label, merge, and post-merge verify PRs49 - Usage: `/mk-git merge-pr <PR numbers or URLs>`50 - Accepts one or more PR numbers or GitHub PR URLs51 - Runs `/mk-review-pr <PR> --fix --reply` before any label or merge52 - Adds label `ready to ship` only after review/fix/reply reports the PR is merge-ready53 - Merges only reviewed-and-ready PRs, then watches target-branch CI to success5455## Quick Reference5657| Task | Reference |58|------|-----------|59| Commit | `references/workflow-commit.md` |60| Push | `references/workflow-push.md` |61| Pull Request | `references/workflow-pr.md` |62| Merge | `references/workflow-merge.md` |63| Merge PRs | `references/workflow-merge-pr.md` |64| Standards | `references/commit-standards.md` |65| Safety | `references/safety-protocols.md` |66| Branches | `references/branch-management.md` |67| GitHub CLI | `references/gh-cli-guide.md` |6869## Core Workflow7071### Step 1: Stage + Analyze72```bash73git add -A && git diff --cached --stat && git diff --cached --name-only74```7576### Step 2: Security Check77Scan for secrets before commit:78```bash79git diff --cached | grep -iE "(api[_-]?key|token|password|secret|credential)"80```81**If secrets found:** STOP, warn user, suggest `.gitignore`.8283### Step 3: Split Decision8485**NOTE:**86- Search for related issues on GitHub and add to body.87- Only use `feat`, `fix`, or `perf` prefixes for files in `.claude` directory (do not use `docs`).8889**Split commits if:**90- Different types mixed (feat + fix, code + docs)91- Multiple scopes (auth + payments)92- Config/deps + code mixed93- FILES > 10 unrelated9495**Single commit if:**96- Same type/scope, FILES ≤ 3, LINES ≤ 509798### Step 4: Commit99```bash100git commit -m "type(scope): description"101```102103## Output Format104```105✓ staged: N files (+X/-Y lines)106✓ security: passed107✓ commit: HASH type(scope): description108✓ pushed: yes/no109```110111## Error Handling112113| Error | Action |114|-------|--------|115| Secrets detected | Block commit, show files |116| No changes | Exit cleanly |117| Push rejected | Suggest `git pull --rebase` |118| Merge conflicts | Suggest manual resolution |119120## References121122- `references/workflow-commit.md` - Commit workflow with split logic123- `references/workflow-push.md` - Push workflow with error handling124- `references/workflow-pr.md` - PR creation with remote diff analysis125- `references/workflow-merge.md` - Branch merge workflow126- `references/workflow-merge-pr.md` - PR review, ready label, merge, and CI convergence workflow127- `references/commit-standards.md` - Conventional commit format rules128- `references/safety-protocols.md` - Secret detection, branch protection129- `references/branch-management.md` - Naming, lifecycle, strategies130- `references/gh-cli-guide.md` - GitHub CLI commands reference