科德米先生

其他 社区

技能解读

当前原文的自动摘译,尚未人工审校。

1b.检查代码审查规范

检查 git 状态后,查找此分支/票证的代码审查规范。从当前分支名称中提取票证(模式EPMCDME-XXXXX)。尝试阅读规范:如果找到规范 → MR 描述摘录:发现问题:CRITICAL 和 MAJOR 下的 - [ ] + - [x] + - [~] 计数

2. 验证 Jira Ticket(提交所需)

在任何提交之前,验证上下文中是否存在 Jira 票证:在对话历史记录中查找EPMCDME-xxx模式检查用户是否提供了票证号如果未找到票证:询问用户:“Jira 票证号 (EPMCDME-xxx) 是什么?”如果没有 Jira 票证,请勿继续提交。

3、根据用户要求进行处理

“提交更改”→ 仅提交(需要 Jira 票据):“推送更改”→ 仅推送:“创建 MR”→ 下面是完整的工作流程。

4. 创建MR工作流程

如果在main分支上:先创建功能分支:git checkout -b <type>/<description>然后继续commit/push/MR 如果MR已存在:如果不存在MR:

提交格式

由 Tekton CI 强制执行 — 无效消息将阻塞管道。正则表达式:^((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]*.*")$ 所需模式:EPMCDME-xxx: Capital sentence(描述必须以大写字母开头) 有效示例: 无效(将被 Tekton 拒绝):

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
通用
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
macOS · Linux
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# 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:
1. Create feature branch first: `git checkout -b <type>/<description>`
2. Then proceed with commit/push/MR

#### If MR already exists:
```bash
git push --set-upstream origin $(git branch --show-current)
# Inform: "Changes pushed to existing MR: <url>"
```

#### If no MR exists:
```bash
# 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):
```bash
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:

```bash
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`:
```bash
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-mr` with the MR URL returned by `glab 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**:
```bash
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):
```bash
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-profile`
- `fix/auth-timeout`
- `docs/api-guide`
- `feat/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:
```bash
# 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:
```bash
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"
```bash
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"
```bash
git add .
git commit -m "EPMCDME-789: Update user profile API"
```

### Example 3: Full MR creation
**User**: "push and create MR for EPMCDME-321"
1. Check for existing MR
2. Commit with ticket: `EPMCDME-321: Add payment gateway`
3. Push changes
4. Create MR with title: `EPMCDME-321: Add payment gateway`

### Example 4: Push to existing MR
**User**: "push my changes"
1. Check MR status
2. If exists: push to existing
3. If not: push only (no MR creation unless requested)

---
> Source: [codemie-ai/codemie-ui](https://github.com/codemie-ai/codemie-ui) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。