Codemie 代码审查
- 作者仓库星标 0
- 作者仓库 skills-registry
GitLab Merge Request Workflow
Instructions
1. Check Current State
Always start by checking git status:
# Current branch
git branch --show-current
# Uncommitted changes
git status --short
# Existing MR for current branch
glab mr list --source-branch=$(git branch --show-current) 2>/dev/null || echo "No MR"
1b. Check for Code Review Spec
After checking git state, look for a code review spec for this branch/ticket.
Extract ticket from current branch name (pattern EPMCDME-XXXXX).
Try to read the spec:
Read: .codemie/reviews/<TICKET>/review.md
# Fallback (if no ticket found):
Read: .codemie/reviews/<branch-name>/review.md
If spec is found → extract for MR description:
- Issues found: count of
- [ ]+- [x]+- [~]under CRITICAL and MAJOR - Issues fixed: count of
- [x]items - Issues rejected: count of
- [~]items with justifications - Clean: if no issues were found at all
Keep this data — it will be injected into the MR description in Step 4.
2. Validate Jira Ticket (Required for Commits)
Before any commit, verify Jira ticket exists in context:
- Look for
EPMCDME-xxxpattern in conversation history - Check if user provided ticket number
- If no ticket found: Ask user: "What is the Jira ticket number (EPMCDME-xxx)?"
Do NOT proceed with commit without Jira ticket.
3. Handle Based on User Request
"commit changes" → Commit only (requires Jira ticket):
git add .
git commit -m "EPMCDME-xxx: Action and message"
"push changes" → Push only:
git push --set-upstream origin $(git branch --show-current)
"create MR" → Full workflow below.
4. Create MR Workflow
If on main branch:
- Create feature branch first:
git checkout -b <type>/<description> - Then proceed with commit/push/MR
If MR already exists:
git push --set-upstream origin $(git branch --show-current)
# Inform: "Changes pushed to existing MR: <url>"
If no MR exists:
# Push changes
git push --set-upstream origin $(git branch --show-current)
Build the MR title from the Jira ticket and a concise description of the work done (read commit history since main if needed to understand what was implemented):
git log main..HEAD --oneline
Title rules:
- Pattern:
EPMCDME-xxx: <Short description starting with capital letter> - Max ~70 characters
- Describe the feature/fix, not the process ("Add SharePoint datasource support", not "Implement EPMCDME-123")
Build the description — always include Summary and Changes. If a code review spec was found in Step 1b, include the Code Review section:
glab mr create \
--title "EPMCDME-xxx: <Short feature description>" \
--description "## Summary
[2-4 sentence overview of what was implemented and why]
## Changes
- [Key change 1]
- [Key change 2]
## Code Review
<!-- Include ONLY if review spec was found in Step 1b -->
AI code review completed (AI-Code-Review marker in commit history).
- Issues found: <N critical, N major> / No issues found (clean)
- Issues fixed: <N> / N/A
- Issues rejected: <N with justification> / N/A
:white_check_mark: Reviewed and approved by AI Code Reviewer
## Checklist
- [ ] Self-reviewed
- [ ] Manual testing performed
- [ ] Documentation updated (if needed)
- [ ] No breaking changes (or documented)"
If no review spec was found → omit the ## Code Review section entirely from the description.
After MR is created, immediately approve it using the MR IID returned by glab mr create:
glab mr approve <MR_IID>
This adds the AI reviewer's +1 to the MR. If glab mr approve fails (e.g., self-approval not allowed on this GitLab instance), inform the user but do not treat it as a blocking error.
After the MR is created, hand off to the babysit-mr skill to monitor it:
- Invoke
babysit-mrwith the MR URL returned byglab mr create - It will watch for CI failures, reviewer comments, and merge conflicts, fixing them autonomously until the MR merges
Commit Format
Enforced by Tekton CI — invalid messages will block the pipeline.
Regex: ^((EPMCDME)-(?!0+)\d+:\s[A-Z][a-z]*.*|Generate release notes for version \d+\.\d+\.\d+|Revert "(EPMCDME|AMNAAIRN)-(?!0+)\d+:\s[A-Z][a-z]*.*")$
Required Pattern: EPMCDME-xxx: Capital sentence (description must start with uppercase letter)
Valid examples:
git commit -m "EPMCDME-123: Add new documentation"
git commit -m "EPMCDME-456: Fix authentication bug"
git commit -m "Generate release notes for version 1.2.3"
git commit -m "Revert \"EPMCDME-123: Fix authentication bug\""
Invalid (will be rejected by Tekton):
git commit -m "Add new feature" # Missing ticket
git commit -m "feat: add feature" # Wrong format
git commit -m "EPMCDME-123 add feature" # Missing colon
git commit -m "EPMCDME-123: fix bug" # Lowercase first letter
git commit -m "EPMCDME-0: Fix bug" # Zero ticket ID not allowed
Branch Format
Pattern: <type>/<description> (Jira ticket optional)
Examples:
feat/add-user-profilefix/auth-timeoutdocs/api-guidefeat/EPMCDME-123-user-settings(ticket optional but allowed)
MR Title Format
Pattern: EPMCDME-xxx: Brief description
Always start with Jira ticket number.
Troubleshooting
Error: "glab: command not found"
Solution: Install GitLab CLI:
# macOS
brew install glab
# Linux
snap install glab
# Or download from: https://gitlab.com/gitlab-org/cli
Error: No Jira ticket in context
Action: Ask user: "What is the Jira ticket number (EPMCDME-xxx) for this commit?"
- Wait for user response
- Validate format matches
EPMCDME-\d+ - Then proceed with commit
Error: Already on main branch
Solution: Create feature branch first:
git checkout -b <type>/<short-description>
Error: No changes to commit
Solution: Check git status - nothing to commit or changes already staged.
MR already exists
Action: Just push updates to existing MR, don't create new one.
Examples
Example 1: User provides ticket upfront
User: "commit these auth changes for EPMCDME-456"
git add .
git commit -m "EPMCDME-456: Fix OAuth2 token refresh"
Example 2: No ticket in context
User: "commit the changes" Claude: "What is the Jira ticket number (EPMCDME-xxx) for this commit?" User: "EPMCDME-789"
git add .
git commit -m "EPMCDME-789: Update user profile API"
Example 3: Full MR creation
User: "push and create MR for EPMCDME-321"
- Check for existing MR
- Commit with ticket:
EPMCDME-321: Add payment gateway - Push changes
- Create MR with title:
EPMCDME-321: Add payment gateway
Example 4: Push to existing MR
User: "push my changes"
- Check MR status
- If exists: push to existing
- If not: push only (no MR creation unless requested)
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: codemie-ai/codemie-ui — distributed by TomeVault.
- 流狐分类
- 通用
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Instructions
Always start by checking git status:
After checking git state, look for a code review spec for this branch/ticket. Extract ticket from current branch name (pattern EPMCDME-XXXXX). Try to read the spec:
Before any commit, verify Jira ticket exists in context: Look for EPMCDME-xxx pattern in conversation history Check if user provided ticket number
"commit changes" → Commit only (requires Jira ticket): "push changes" → Push only: "create MR" → Full workflow below.
If on main branch: Create feature branch first: git checkout -b <type>/<description> Then proceed with commit/push/MR
# GitLab Merge Request Workflow
## Instructions
### 1. Check Current State
Always start by checking git status:
```bash
# Current branch
git branch --show-current
# Uncommitted changes
git status --short
# Existing MR for current branch
glab mr list --source-branch=$(git branch --show-current) 2>/dev/null || echo "No MR"
```
### 1b. Check for Code Review Spec
After checking git state, look for a code review spec for this branch/ticket.
Extract ticket from current branch name (pattern `EPMCDME-XXXXX`).
Try to read the spec:
```
Read: .codemie/reviews/<TICKET>/review.md
# Fallback (if no ticket found):
Read: .codemie/reviews/<branch-name>/review.md
```
If spec is found → extract for MR description:
- **Issues found**: count of `- [ ]` + `- [x]` + `- [~]` under CRITICAL and MAJOR
- **Issues fixed**: count of `- [x]` items
- **Issues rejected**: count of `- [~]` items with justifications
- **Clean**: if no issues were found at all
Keep this data — it will be injected into the MR description in Step 4.
### 2. Validate Jira Ticket (Required for Commits)
**Before any commit**, verify Jira ticket exists in context:
- Look for `EPMCDME-xxx` pattern in conversation history
- Check if user provided ticket number
- **If no ticket found**: Ask user: "What is the Jira ticket number (EPMCDME-xxx)?"
**Do NOT proceed with commit without Jira ticket.**
### 3. Handle Based on User Request
**"commit changes"** → Commit only (requires Jira ticket):
```bash
git add .
git commit -m "EPMCDME-xxx: Action and message"
```
**"push changes"** → Push only:
```bash
git push --set-upstream origin $(git branch --show-current)
```
**"create MR"** → Full workflow below.
### 4. Create MR Workflow
#### If on `main` branch:
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Instructions → 1. Check Current State → 1b. Check for Code Review Spec → 2. Validate Jira Ticket (Required for Commits) → 3. Handle Based on User Request → 4. Create MR Workflow
要点 -> Issues found · Issues fixed · Issues rejected · Clean · Before any commit · If no ticket found · Do NOT proceed with commit without Jira ticket. · "commit changes"
文件/命令 -> EPMCDME-XXXXX · - [ ] · - [x] · - [~] · EPMCDME-xxx · main · git checkout -b <type>/<description> · EPMCDME-xxx: <Short description starting with capital letter>
内容 SHA-256 -> 6f3a74bd5013
方法与流程
适用与边界
原文中的明确线索
EPMCDME-XXXXX、- [ ]、- [x]、- [~]、EPMCDME-xxx、main、git checkout -b <type>/<description>、EPMCDME-xxx: <Short description starting with capital letter>