AgentSkillsCN

manage-git

统筹Git操作与Jira工单的生命周期。处理提交、分支、PR,以及工单状态的流转。

SKILL.md
--- frontmatter
name: manage-git
description: >
  Manage git operations AND Jira ticket lifecycle.
  Handles commits, branches, PRs, and ticket state transitions.

Manage Git & Jira

Handle git operations and Jira ticket lifecycle.

When to Use

  • Start of ticket: Transition to "In Progress", create branch
  • During implementation: Create commits at checkpoints
  • End of ticket: Create PR, transition to "Ready for Review"

Required Context

  • contexts/conventions/git.md - Full git conventions

Jira Ticket Lifecycle

At Task Start

code
→ Jira MCP: Transition ticket to "In Progress"
→ Git: Create branch feat/{TICKET-ID}
→ Ledger: Create session file

At Task End

code
→ Git: Push branch, create PR
→ Jira MCP: Transition ticket to "Ready for Review"
→ Jira MCP: Add PR link as comment

Jira MCP Commands

typescript
// Transition ticket
jira.transitionIssue('TTV-1001', 'In Progress')
jira.transitionIssue('TTV-1001', 'Ready for Review')

// Add comment with PR link
jira.addComment('TTV-1001', 'PR: https://github.com/...')

Commit Message Format

code
<type>(<scope>): [<ticket>] <subject>
PartExample
typefeat, fix, chore, test, refactor
scopeevents, photos, processing
ticket[TTV-1001]
subjectadd create event command

Examples

bash
feat(events): [TTV-1001] add event creation command
fix(photos): [TTV-1023] handle missing EXIF data
test(processing): [TTV-1045] add OCR adapter tests

Branch Naming

code
<type>/<ticket>

Examples: feat/TTV-1001, fix/TTV-1023

Complete Workflow

1. Start Task

bash
# Transition Jira (via MCP)
→ Jira: TTV-1001 → "In Progress"

# Create branch
git checkout main
git pull origin main
git checkout -b feat/TTV-1001

2. During Implementation (at checkpoints)

bash
git add .
git commit -m "feat(events): [TTV-1001] add Event entity"

3. End Task

bash
# Push and create PR
git push -u origin feat/TTV-1001
# Create PR via GitHub

# Transition Jira (via MCP)
→ Jira: TTV-1001 → "Ready for Review"
→ Jira: Add comment with PR link

Checklist

  • Jira transitioned to "In Progress" at start
  • Branch name is type/TTV-XXXX
  • Commits include ticket [TTV-XXXX]
  • PR created and linked to Jira
  • Jira transitioned to "Ready for Review" at end