mcpField
1
1k-git-workflow

1k-git-workflow

github.com/onekeyhqDevelopment2.5k70 installsUpdated today
Repository

About 1k-git-workflow

A OneKey Git workflow skill for contributors, covering branch management, commit and PR naming, and commands for pushing and rebasing. It also documents required pre-commit checks and project-specific branch rules.

Key features

  1. 01Branch creation and naming rules
  2. 02Conventional Commit format
  3. 03PR title conventions
  4. 04Push and rebase commands
  5. 05Mandatory pre-commit checks

Use cases

  1. 01Creating a feature or fix branch
  2. 02Formatting commits and PR titles
  3. 03Updating a branch from x before review

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/onekeyhq/app-monorepo --skill 1k-git-workflow

After installing, type/1k-git-workflowin Claude Code to confirm it loaded.

Details

From the project README

OneKey Git Usage Guidelines

Branch Management

  • Main branch: x - This is the primary development branch
  • Workflow: x → create feature branch → develop → PR back to x
  • Do not use onekey, master, or main as the base branch - always use x
  • NEVER work directly on the x branch → ALWAYS create feature branches

Branch Naming

  • Feature branches: feat/description or feature/description
  • Bug fixes: fix/description
  • Refactoring: refactor/description

Commit Message Format

Use Conventional Commits format:

  • feat: - New features
  • fix: - Bug fixes
  • refactor: - Code refactoring
  • perf: / optimize: - Performance improvements
  • chore: - Build, version, or non-code changes
  • docs: - Documentation only

Format: type: short description

  • Use lowercase
  • Keep first line under 72 characters
  • Include issue number if applicable: fix: resolve login bug OK-12345

IMPORTANT - Claude Code commits:

  • Do NOT include "Generated with Claude Code" link
  • Do NOT include "Co-Authored-By: Claude" signature
  • Commit message should be indistinguishable from human-written commits

PR Naming Convention

Follow the same format as commit messages:

  • feat: add dark mode support
  • fix: resolve authentication timeout issue
  • refactor: simplify payment processing logic

Common Git Commands

Creating a Feature Branch
git checkout x
git pull origin x
git checkout -b feat/my-new-feature
Committing Changes

Option 1: Use /commit command (Recommended)

/commit

The /commit command automatically runs pre-commit checks (yarn lint:staged and yarn tsc:staged) and creates a well-formatted commit message.

Option 2: Manual commit with pre-checks

# Stage your changes
git add .

# Run pre-commit checks (MANDATORY)
yarn lint:staged
yarn tsc:staged

# If checks pass, commit
git commit -m "feat: add user profile page"

IMPORTANT:

  • NEVER commit code that fails linting or TypeScript compilation
  • Pre-commit checks are mandatory as specified in CLAUDE.md
  • The /commit command handles this automatically
Pushing and Creating PR
git push -u origin feat/my-new-feature
# Then create PR via GitHub UI or gh CLI
Rebasing on Latest x
git fetch origin
git rebase origin/x

Comments

Markdown supported