Git & Ship — Quản lý code và deploy

Quản lý git workflow, tạo worktree cho parallel development, và ship code lên production.
Cập nhật bộ claudekit mới: Thêm /land-and-deploy (merge → deploy), /canary (post-deploy monitoring), /setup-deploy (config deploy platform), /ghpm (GitHub project management), /ship official|beta (tagged releases). Xem cấu trúc skill mới để biết đầy đủ.

Cú pháp


Bảng tham chiếu nhanh


/git — Git operations

Hỗ trợ conventional commits tự động:
Commit format tự động:

/worktree — Parallel development

Cho phép chạy nhiều session Claude Code song song trên các bản sao riêng biệt của repo. Mỗi worktree có folder + branch riêng, không đụng nhau.

Cách dùng

Lifecycle

  • Không có thay đổi → worktree + branch tự xóa khi thoát
  • Có thay đổi → Claude hỏi giữ lại hay xóa

File .worktreeinclude

Tạo ở root project, liệt kê file gitignored muốn copy vào worktree:

Use case cho project

Mỗi session làm việc độc lập, không sợ conflict. Rất hữu ích khi cần chạy nhiều task song song trên cùng repo!
Best practices:
  • Đặt tên worktree theo branch convention: feat-*, fix-*, hotfix-*
  • Tạo .worktreeinclude nếu project dùng .env
  • Dùng worktree khi cần chạy 2+ tasks song song trên cùng repo
  • Không dùng worktree cho task nhỏ chỉ cần 1 session

/ship — Ship pipeline với release tags

Full pipeline từ feature branch đến production với semantic versioning tags:
1

Bước 1: Merge main

Pull latest từ main/staging, resolve conflicts nếu có.
2

Bước 2: Test

Chạy full test suite — phải PASS 100%.
3

Bước 3: Review diff

Review toàn bộ changes so với base branch.
4

Bước 4: Commit + Push

Commit final, push lên remote.
5

Bước 5: Create Release

Tạo semantic version tag (v1.2.3 hoặc v1.2.3-beta.1).
6

Bước 6: Create PR + Merge

Tạo PR, merge tới main khi approved.

/land-and-deploy — Merge + Deploy + Monitor

Full pipeline từ PR merge đến production deployment:
1

Bước 1: Merge PR

Merge feature branch → main (or staging).
2

Bước 2: Run CI/CD

Chạy full CI pipeline (tests, build, lint).
3

Bước 3: Deploy

Deploy to staging/production (auto-detect platform).
4

Bước 4: Health Check

Verify critical endpoints alive + responding.
5

Bước 5: Monitor

Watch error logs, performance metrics, user issues.

/canary — Post-deploy monitoring

Monitoring sau deploy, detect issues early:
Checks:
  • Error rate (target: < 0.1%)
  • Performance metrics (latency, throughput)
  • Critical endpoint status
  • User-facing issues
  • Rollback trigger if needed

/setup-deploy — Config deploy platform

Cấu hình platform deploy cho project (chỉ cần 1 lần):
Supports:
  • Vercel (Next.js, SvelteKit, static)
  • Netlify (static, serverless functions)
  • Fly.io (Docker)
  • Railway (containers, databases)
  • AWS (ECS, Lambda)
  • GitHub Pages (static)

/ghpm — GitHub project management

Quản lý issues, PRs, project board, labels:
Features:
  • Auto-label issues theo title/description
  • Move issues on project board (backlog → in progress → done)
  • Create milestones + track progress
  • Handoff status tracking
  • Assign reviewers tự động

Branch naming convention


Khi nào dùng / không dùng


Chi tiết lệnh Git & Ship (Accordion)

Prefix: /ship officialFull pipeline với semantic versioning tag (v1.2.3):
Output:
  • Created tag: v1.2.3
  • Merged to main
  • GitHub release page created
Khi dùng: Ready-for-production release.
Prefix: /ship betaFull pipeline với beta tag (v1.2.3-beta.1):
Output:
  • Created tag: v1.2.3-beta.1
  • Merged to develop/staging
  • GitHub pre-release page
Khi dùng: Feature flags, experimental releases, early testing.
Prefix: /land-and-deployFull pipeline: merge PR → CI/CD → deploy → monitor:
Steps:
  1. Merge PR tới main
  2. Run full CI (tests, build, typecheck)
  3. Deploy to production
  4. Health check (endpoints, error rate)
  5. Monitor logs + metrics
Output: Deployment success + health report.Khi dùng: After PR approval, ready to go live.
Prefix: /canaryMonitor deployment health after ship:
Checks:
  • Error rate < 0.1%?
  • Latency within SLA?
  • Critical endpoints responding?
  • User-facing errors detected?
Output: Health report + auto-rollback decision if needed.Khi dùng: After deployment, verify stability before clearing.
Prefix: /setup-deployFirst-time setup for deployment platform:
Detects + configures:
  • Vercel (Next.js, SvelteKit)
  • Netlify (static, serverless)
  • Fly.io (Docker containers)
  • Railway (managed containers)
  • AWS (ECS, Lambda, CodeDeploy)
  • GitHub Pages (static hosting)
Output: Configured .env, CI/CD files, deploy scripts.Khi dùng: New project, migrate to new platform, first-time ship.
Prefix: /ghpmOrganize GitHub issues, PRs, project board:
Actions:
  • Auto-label issues by type (bug, feature, enhancement)
  • Move issues on kanban board
  • Create milestones + track velocity
  • Assign reviewers for PRs
  • Track handoff status
  • Generate project summary
Output: Updated GitHub project board + labels + assignments.Khi dùng: Organize team workflow, track sprint progress, handoff coordination.
Prefix: /worktree (already documented above, included for completeness)Create isolated git worktree for parallel development:
Benefits:
  • Multiple Claude Code sessions on same repo
  • Independent branches, no conflicts
  • Automatic cleanup when done
Khi dùng: Multiple tasks in parallel, monorepo development.