Skip to main content

mk-git

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.

来源信息

仓库
phuc-nt/kiro-agent-kit
最近来源活动
2026年9月6日 10:01
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
10 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
mk-git
description
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.
user-invocable
true
when_to_use
Invoke for commits, PRs, branch hygiene, or release git steps.
category
dev-tools
keywords
["git","commits","staging","PR","merge","merge-pr","ci"]
argument-hint
cm|cp|pr|merge|merge-pr [args]
metadata
{"author":"my-kit","version":"1.0.0"}
# 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 ```bash git add -A && git diff --cached --stat && git diff --cached --name-only ``` ### Step 2: Security Check Scan for secrets before commit: ```bash 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 ```bash 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
在 GitHub 查看